HTTP/2

HTTP was originally proposed by Tim Berners-Lee, the pioneer of the World Wide Web who designed the application protocol with simplicity in mind to perform high-level data communication functions between Web-servers and clients.

The first documented version of HTTP was released in 1991 as HTTP0.9, which later led to the official introduction and recognition of HTTP1.0 in 1996. HTTP1.1 followed in 1997 and has since received little iterative improvements.

In February 2015, the Internet Engineering Task Force (IETF) HTTP Working Group revised HTTP and developed the second major version of the application protocol in the form of HTTP/2. In May 2015, the HTTP/2 implementation specification was officially standardized in response to Google’s HTTP-compatible SPDY protocol.

Why do we need HTTP/2?

HTTP 0.9 - Initial version of the protocol was introduced in 1991. Required a new TCP connection per request. Only the GET method is supported.

HTTP 1.0 - Improved version with POST, HEAD methods for transferring more rich content. New header fields are introduced to identify the request (ex: Content-Length). Still uses a connection per request.

HTTP1.1 - New methods like PUSH, DELETE, and OPTIONS are added. Keep alive (persistent) connections became the default. Improved latency.

HTTP 1.1 Challenges

When loading web pages with multiple resources, browsers will send parallel requests to reduce the latency. But this needs more resources since it needs to create new connections and latency will be affected, even though there are hacks like HTTP pipelining by sending multiple requests through the same TCP connection asynchronously. But in this case, the server will respond synchronously and reduce the latency and block the application if one of the resources slows down to respond.

How HTTP/2 addresses the challenges of HTTP/1.1

The major design goals of the HTTP/2 protocol were to address the issues which were present in the HTTP/1.1 protocol.

In addition to addressing these challenges, HTTP/2 has introduced several new features which were not there in the HTTP/1.1 and will improve the performance of the web.

What is new in HTTP/2

Similarities with HTTP1.x and SPDY

Underlying application semantics of HTTP including HTTP status codes, URIs, methodologies, and header files remain the same in the latest iteration of the HTTP/2. HTTP/2 is based on SPDY; Google’s alternative to HTTP1.x. Real differences lie in the mechanisms used to process client-server requests. The following chart identifies a few areas of similarities and improvements among HTTP1.x, SPDY, and HTTP/2,

HTTP1.x SPDY HTTP2
SSL not required but recommended. SSL required. SSL not required but recommended.
Slow encryption. Fast encryption. Even faster encryption.
One client-server request per TCP connection. Multiple client-server requests per TCP connection. Occurs on a single host at a time. Multi-host multiplexing. Occurs on multiple hosts at a single instant.
No header compression. Header compression introduced. Header compression using improved algorithms that improve performance as well as security.
No stream prioritization. Stream prioritization introduced. Improved stream prioritization mechanisms used

How do I use HTTP/2?

Almost all browsers already support HTTP/2 in their most current release, and current data shows that over 50% of users are on HTTP/2-capable browsers already. On the server, IIS running on Windows 10 or Windows Server 2016 supports HTTP/2. IIS currently supports HTTP/2 only over TLS. When making an HTTPS connection to a web server running IIS on Windows 10, HTTP/2 is used if the client and server both support it.

Follow these simple steps to set up HTTP/2 for your website.

Step 1

Step 2

Make sure the underlying network infrastructure including server software support HTTP/2. Nginx servers support HTTP/2 natively whereas Apache added native support in October 2015 (in 2.4) which means apache servers might require additional modules to enable data communication using HTTP/2 browser support.

Step 3

Update, configure and test your servers to support HTTP/2.