HTTP & Browsers Part III: SPDY & HTTP 2.0

Prev Next

HTTP has not evolved as much since 1999, yet modern browsers have implemented many new techniques for web pages to load quicker. HTTP 2.0, is a newer version that was released in May 2015. It is meant to overcome the limits of both HTTP 1.0 and 1.1’s ability to handle multiple requests on a single new TCP connection without causing any major congestion. HTTP 2.0 is designed to process multiple page requests via a single connection to the server, easing the load on the server and the network connecting it. There are several techniques that HTTP 2.0 implements while maintaining full backward compatibility with HTTP 1.1.

The past HTTP predecessor allowed HTTP Pipelining, in which multiple HTTP requests are sent on a single TCP connection without waiting for the corresponding responses. This mechanism alone will not improve loading time since any delays will affect the entire stream. A common cause of delay is Head-of-Line blocking limits when a line of packets is held up by the first packet.

To overcome the limits of the HTTP connection, Google developed its own networking protocol, SPDY, which will be used as a base for developing HTTP 2.0. It is an HTTP compatible protocol supported in Chrome, IE, Opera, Firefox, and Amazon Silk browsers. SPDY modifies the way HTTP requests and responses are sent over the connection. Here are some of the techniques that they combine for improving the web page loading time:

  • Multiplexing – No limit on the number of requests that can be issued concurrently over a single SPDY connection.
  • Asynchronous connection - after the connection has been established, SPDY employs an optional asynchronous connection which is synchronized by a special signal along with the transmission medium. When sending nonessential resources, it makes sense to use this connection because it does not add round-trip latency to the connection startup.
  • Prioritization - Control which resources to be delivered first and avoid the problems of congesting the network channel with non-critical resources.
  • Compressed Headers - The size of the HTTP header is enormous so by compressing them, you save a significant amount of latency and bandwidth. It reduced ~88% in the size of request headers & ~85% in the size of response headers.
  • Server Push – The server makes an assumption by pushing content directly to the client without the client asking for it. This mechanism saves 1 round trip for network connection
  • Server Hint - The server makes an assumption and just sends the URL of the content to minimize any waste of bandwidth.
  • Recommending the use of Encryption such as TLS

Microsoft has developed its own approach to improve HTTP connection. They believe that HTTP should be optimized for browsers, applications that access webpages and services, and mobile devices.

HTTP 2.0 adds support for multiplexing across asynchronous connections, header compression, request-response pipelining, and other features that could improve performance without affecting the semantics of HTTP 1.1.  It adopts techniques from Google’s SPDY and is considered its successor.

For further information, feel free to read the recently published first draft of HTTP/2.0 implementable:

http://tools.ietf.org/html/draft-ietf-httpbis-http2-04

Other articles in this series:

Part 1: HTTP & Browsers: HTTP Overview

Part 2: HTTP & Browsers: Speed Enhancements