HTTP has served as the internet’s underlying protocol since its inception in 1991, so why do we need HTTP 2? The answer is simple, HTTP has its limitations. What was fine in 1997 when the current version of HTTP was released, is not sufficiently adaptable for today’s high bandwidth resource intensive web apps.
The web has grown exponentially over the past two decades, with billions of users now accessing the internet each day, using any number of devices, from smart TVs to internet connected toasters.
The web is now creaking under the strain of the limitations imposed on it by HTTP. To solve these problems it became clear that a new protocol was required to streamline the process of data transmission between domains.
The problem with HTTP/1.1
The biggest problem with HTTP 1 is the fact that it is limited to processing a single request per TCP connection, this forces the browser to use multiple TCP connections for each HTTP request. While that worked fine when the web was in its infancy, it creates network congestion today.
Think of it this way, if you walk into a McDonald’s restaurant to order a meal, you don’t order the meal one item at a time, you order the whole meal with one simple request. This is no accident, McDonald’s know it is easier and faster to serve meals this way than ordering each item separately.
There is another problem with creating multiple HTTP requests, it creates a lot of duplicate data on the network. Each HTTP request contains header and footer information which is used to tell the host where the request came from and where it needs to go. With multiple HTTP requests this information is duplicated hundreds if not thousands of times.
Wouldn’t it be better to combine multiple requests into a single call that only requires a single footer and header?
How HTTP/2 solves the problem
That is essentially what HTTP/2 does. It combines multiple HTTP requests into a single request thereby speeding up web page load times and reducing the need for clumsy optimisations such as image spriting, resource merging and domain sharing.
The advantages for users are clear, faster page load speeds and higher performance benefits everyone, but it is network managers and ISPs that stand to benefit the most. HTTP 2 reduces server load, meaning less resources are required to serve the same amount of assets.
Fewer HTTP requests and their subsequent headers, means a significant reduction of bandwidth across the webs underlying infrastructure, this is important as bandwidth hogs such as Netflix, Amazon Prime and YouTube become more popular with users.
Multiplexed streaming takes performance to a different level
But it doesn’t end there, network technologies have moved on a lot since 1997 when HTTP 1.1 was introduced. Today’s networks are capable of sending multiplex streams (sending multiple signals of information over a network at the same time) while HTTP 1.1 is not.
HTTP/2 can take advantage of this technology by transmitting data in multiple streams via a single TCP connection. The streams are then split at the receiving end into individual streams in a process called demultiplexing.
This further reduces network overheads, increasing the performance of web servers and speeding up the apps that run on them. It also reduces the OpEx and CapEx of running such services which ultimately makes them cheaper for consumers.
HTTP/2 is more secure as well
HTTP/2 goes beyond increased server performance by applying compression in the header metadata, which obscures vital information making it much more resilient against attacks from hackers.
HTTP/2 also allows full support for encryption and implements an updated version of Transport Layer Security (TLS) which replaces Secure Socket Layer (SSL), to provide increased data protection for users.
Why implement HTTP/2?
In a crowded online world where companies are finding it difficult to rank websites using traditional SEO techniques, companies need to think smarter about how they tackle SEO going forward, this includes optimising the infrastructure your website is built on.
Google in particular is a big believer in HTTP/2, having written the SPDY protocol which HTTP/2 builds upon. With Google favouring websites that deliver an exceptional user experience, it is clear that website owners and developers need to start taking the underlying infrastructure their website is built on more seriously.
By building your website on HTTP/2 server side infrastructure, you are future proofing your website using the latest technology. The end result is a faster browsing experience for your customers, but don’t forget you will benefit from reduced CapEx and OpEx from your infrastructure provider as well.