Velocity 2015: HTTP2, the current situation
HTTP/2 (aka H/2) was discussed at a number of sessions at Velocity 2015 in Amsterdam. Here are a few nuggets about this new version of HTTP.
Google, an engine with a purpose for this new protocol
We all know that Google is working hard (and generating work) on the ecosystem in improving the performance of web sites. According to the US business giant, the point is not to make us faster profits with faster sites, but rather to grab our web pages faster in as many ways. This is why site performance has been integrated into Google ranking algorithms with SpeedIndex: basically, the faster the site, the better it is referenced in the search engine. This is how Google keeps us on our toes…
Now what exactly is HTTP/2?
H/2 is an evolution from HTTP1.1 (standardized in 1997), an application protocol built on TCP and used in the majority of exchanges of web content.
Nowadays, HTTP1.1 is no longer a very high performing protocol because web page design has changed a great deal, particularly in terms of the number of objects (100 on average in a web page). This is why for the past few years internet browsers have been using more and more connections to web servers to handle requests in parallel and thus receive content more quickly. The problem is that each time a connection is made, it requires a three-way handshake which takes all the longer the farther the site is from the user (latency). This is even truer of mobile networks.
Fig 1. TCP Three Way HandShake
How Google does it?
They developed a first experimental protocol, SPDDY, integrated into Chrome and then the IETF included it in H/2 specifications. H/2 was subsequently officially published as RFC 7540 in May 2015.
One of the main benefits of H/2 is that it allows multiplexing of HTTP requests within a connection.
Fig 2. Principle of multiplexing
In addition to multiplexing, a technique for compressing HTTP headers (where there is a lot of redundancy) has been implemented. This is HPACK which was selected over Zlib type compression most notably for security reasons.
Beyond questions of performance, H/2 is also very interesting because it allows server push, unlike HTTP1.1 where content was determined by the client’s initiative.
The H/2 specification does not require that content be encrypted. However some implementations within browsers (Chrome and Firefox mainly) will support H/2 only over TLS. The web will therefore be more and more encrypted because of this. Does H/2 really improve the performance of web services? According to Google, which measures its own services, the benefit will be loading speeds between 23% and 45% faster
How extensively is H/2 supported?
Below are listed all of the servers that support H/2.
Fig 3. Servers supporting H/2 (source: https://istlsfastyet.com/)
Now let’s take a look at CDNs:
Fig 4. CDNs supporting H/2 (source: https://istlsfastyet.com/)
Lastly, to look at the browser side:
Fig 5. Browsers supporting H/2 (source CanIUse)
H/2 is transparent for internet sites that were not specifically designed to use it.
As of Octobre 2015 1.8% of internet sites were H/2 compatible, according to W3Techs.
Some sites that use H/2: