Overview and History
HTTP was introduced in 1990s as a way of allowing browsers to request information from the servers that host websites. But its age is starting to show and a new version of the protocol is here to speed up the internet and it’s called HTTP2. It was developed by a group of HTTP implementers, users, network operators and HTTP experts. A large number of people have contributed to the effort, but the most active participants include engineers from Firefox, Chrome, Twitter, Microsoft’s HTTP stack, Curl and Akamai as well as a number of HTTP implementers in languages like Python, Ruby and NodeJS. After years of development, HTTP2 has been formally approved as a way of faster, more secure web browsing in near future. It is a big upgrade since it brings faster loading times and more security options for web users. It helps handling simultaneous requests without bogging down servers.
The Base: SPDY
HTTP2 is based on a protocol made by Google, called SPDY that does not replace HTTP but modifies the way HTTP requests and responses are sent over the wire. SPDY works like a tunnel for the HTTP and HTTPS protocols. When sent over SPDY, HTTP requests are processed, tokenized, simplified and compressed. SPDY has been actually speeding up the internet for many years for users without them even knowing it. HTTP2 and SPDY both help with making browsing move quicker by streamlining the way that browsers make requests to the servers, allowing them to ask for a number of things at once.
Key Differences between HTTP and HTTP2: Binary and Textual
The key difference between HTTP and HTTP2 is that HTTP2 is a binary protocol which means that it is more efficient to parse, more compact on the wire and much less error-prone. As opposed to HTTP, which is a textual protocol. Also, HTTP2 is fully multiplexed, whereas HTTP is ordered and blocking. It can therefore use one connection for parallelism. HTTP2 uses header compression to reduce overhead and it also allows servers to push responses proactively into client caches. HTTP2 will bring the technologies that allow the protocol to work to everyone, over time.
The Evolution of HTTP2 Protocol
HTTP2 has evolved incorporating several improvements in the process that bring many benefits such as:
• multiplexing and concurrency: several requests can be sent over the same TCP connection and responses can be received out of order, eliminating the need for multiple connections between client and server
• stream dependencies: client can indicate to the server which resources are more important than others
• header compression: HTTP header size is reduced
• server push: server can send resources the client has not yet requested
HTTP2 in Practice
Now what this means in practice is that you will not need to change your websites or applications to ensure they continue to work properly. Not only will your application code and HTTP APIs continue to work uninterrupted, but your application will also likely perform without frictions and consume fewer resources on both client and server. Organizations such as Akamai are working continuously on optimizing differently for HTTP and HTTP2 connections as browsers and other clients make the transition over the next several years. Akamai and leading browsers intend to stop supporting SPDY when HTTP2 is ready to take its place. As it becomes more prevalent, the organisations looking to benefit from the security and performance features of HTTP2 should start thinking about how they are to fully capitalise on these new capabilities. Such considerations include encrypting, optimizing the TCP layer, undoing HTTP best practices, deciding what and when to push. Basically, applications running over HTTP2 are likely to experience improvance in performance and secure connections. If applications are to take advantage of HTTP2, they are to balance performance and utility.
The HTTP2 standard has been approved as of February 2015 and most of the leading browsers already support it. You can enable HTTP2 today without any changes on the origin infrastructure of your website. It is improving page load time, for example, from 9.07 sec with HTTP, and 7.06 sec with SPDY, down to 4.27 sec with HTTP2. These are only some of the improvements you can expect with the upgraded version of the protocol. Both SPDY and HTTP2 provide numerous benefits to website owners. Without support for HTTP2 or SPDY on the browser side, the connection can only be established via HTTP, which usually means higher page load times and reduced experience. Most users don’t even consider the protocols that underpin the web anymore, but they are really affecting everyone that goes online. The update to a protocol will eventually bring with it a global internet that’s more robust, more secure, and faster. The impact is big and the sooner you grasp the possibilities that come with it, the better.