Forum Moderators: phranque

Message Too Old, No Replies

I wanna go fast: HTTPS' massive speed advantage

         

bakedjake

6:44 pm on Jul 21, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If you wanna go fast, serve content over HTTPS using HTTP/2.


[troyhunt.com...]

NickMNS

7:04 pm on Jul 21, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Great, so I wanna go fast! What is involved with making the switch to HTTP/2?

bakedjake

11:43 pm on Jul 21, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Depends on your server platform, but it's a fairly easy configuration file change for both Apache and nginx. With nginx, you just need to add "http2" to your listen ssl directive. You may have to recompile if your version wasn't built with HTTP2 support included.

Another approach mentioned in the article is to just stick an HTTP2-talking CDN in front of your site. That's just as effective!

keyplyr

12:51 am on Jul 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So although HTTP/2 allows only one TCP connection, through parallelisation multiple files can be requested which reduces overhead and improves speed.

tangor

3:53 am on Jul 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How much faster, and if it's that good, why isn't it standard by now?

keyplyr

4:08 am on Jul 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You could think of parallelisation as all files fulfilled asynchronous. Actual speed benefit would of course depend on architechture.

robzilla

9:43 pm on Jul 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another approach mentioned in the article is to just stick an HTTP2-talking CDN in front of your site. That's just as effective!

It's effective in enabling HTTP/2, but serving dynamic content through a CDN tends to be slower because the CDN needs to fetch the file from your server before it can serve it to the end-user. The pros may still outweigh the cons, the only way to know for sure (and to see how much faster it is) is to test it.

Classically, it's Microsoft holding things back. HTTP/2 is only supported in IE 10 and newer, but only on Windows 10.

How much faster, and if it's that good, why isn't it standard by now?

It is the new standard. But the "old" standard still works, so many people can't be bothered to upgrade, or they don't know how. Going HTTPS is often the first hurdle. Primarily, though, I think most sites are hosted on shared platforms where they depend on the web host to enable HTTP/2, and it's going to take years for them to catch on.

ergophobe

9:56 pm on Jul 24, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> why isn't it standard by now?

For high-availability sites, I believe it becoming not just the standard, but the norm.

Google has now dropped SPDY in favor of HTTPS2. [webmasterworld.com...]

Meanwhile, Cloudflare has made it into a pushbutton thing and they are encouraging Cloudflare users to switch - [cloudflare.com...]

Facebook has been using SPDY since about 2012 and it is part of their Proxygen library. They're not quite there with HTTP/2 in Proxygen, but they are working on it and the Facebook site itself supports HTTP/2. [code.facebook.com...]

So do Twitter, Wikipedia, Instagram, Wordpress.com

Exceptions among the biggest sites would be Amazon, LinkedIn, Baidu, Reddit, Stackoverflow.com. Note that some of these do not have a pressing need to support HTTP/2 because they currently are running on SPDY (e.g. Reddit) so they don't get the advantages they would if they were on HTTP/1.1

You can test to your heart's content here [tools.keycdn.com...]

And SPDY support: [spdycheck.org...]

Webwork

1:18 pm on Jul 26, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Re: Apache (2.4) - I'm just now reading about HTTP2 [httpd.apache.org ]

Apache Module mod_http2
Available Languages: en
Description:Support for the HTTP/2 transport layer
Status:Extension
Module Identifier:http2_module
Source File:mod_http2.c
Compatibility:Available in version 2.4.17 and later
Summary: This module provides HTTP/2 (RFC 7540) support for the Apache HTTP Server.

This module relies on libnghttp2 to provide the core http/2 engine.

Warning: This module is experimental. Its behaviors, directives, and defaults are subject to more change from release to release relative to other standard modules. Users are encouraged to consult the "CHANGES" file for potential updates.
You must enable HTTP/2 via Protocols in order to use the functionality described in this document. The HTTP/2 protocol does not require the use of encryption so two schemes are available: h2 (HTTP/2 over TLS) and h2c (HTTP/2 over TCP).

ergophobe

2:38 pm on Jul 26, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>>The HTTP/2 protocol does not require the use of encryption

Yes, but no browser supports HTTP/2 over an unencrypted connection, so HTTP/2 unencrypted is pointless for serving web pages to browsers (might have other applications if you are building your own user agent).

keyplyr

7:51 pm on Jul 26, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I tested a competitor's site with the tool above and the result said his server did support HTTP/2.

His site is HTTPS but extremely slow loading despite this. I guess it is possible he is not set up to take advantage of HTTP/2 or more likely, because of other poor webmastering, his pages are beyond the help of this protocol.

NickMNS

8:24 pm on Jul 26, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Does HTTP2 resolve issues such as render blocking CSS?

Also I tried to setup async loading of external js scripts (not on HTTP2), but ran in to a problem with loading sequence, where when using async for jquery it was not always loaded first. Is this addressed in HTTP2 or will a workaround be required for the loading jQuery?