Definition

SPDY is a protocol developed by Google to increase the speed and efficiency of delivering web content. SPDY modifies parts of the HyperText Transfer Protocol (HTTP) to improve web performance.

Graphic for SPDY by MaxCDN.

Overview

HTTP, while powerful, can’t keep up with the demands of today’s dynamic and responsive websites. Some of HTTP’s limitations, such as only being able to download one resource at a time, make it difficult to scale large websites to serve an ever-increasing user base.

SPDY is a solution designed to solve some of HTTP’s larger issues. SPDY optimizes HTTP traffic as it’s sent over the Internet, resulting in a 28 – 64% speedup for some of the world’s top websites.

Update: In 2016 Google is replacing SPDY support for HTTP/2, the next evolution of HTTP that was approved by the Internet Engineering Task Force in February 2015.

How SPDY Works

SPDY works alongside HTTP by modifying web traffic as it leaves the server. When a user connects to a website, an HTTP session is created to control the flow of information. SPDY modifies data as it’s passed through a session, optimizing bandwidth usage to create a faster user experience.

HTTP Problems that SPDY Solves

SPDY attempts to solve several issues with HTTP. Some of the more prominent issues with HTTP include:

  • Single request per connection. HTTP can only fetch one resource at a time, leading to delays and underutilized bandwidth. SPDY allows for many concurrent downloads.
  • Client-initiated requests. HTTP requires the user to request content from a server before it can be delivered. With SPDY, the server can “push” data to the client without having to wait for a request, making it possible to load web content before it’s needed.
  • Redundant headers. HTTP headers define the behavior of an HTTP transaction. In some cases, the same headers are repeated over the course of a session. SPDY removes unnecessary headers to reduce the amount of bandwidth required.
  • Uncompressed data. Compression, which shrinks the size of data during delivery, is optional for HTTP. SPDY forces compression for all communications including headers.

Example of SPDY

Say a user accesses a website with SPDY enabled. Based on the headers sent from the browser, the server can determine whether or not the browser supports SPDY. If so, the server modifies HTTP traffic as it’s transmitted to include the performance optimizations introduced by SPDY. If not, then regular HTTP traffic is sent to the browser.

SPDY is supported by most modern browsers including Google Chrome, Internet Explorer 11, Firefox from version 11, Opera from version 12.10, Safari from version 8, and Amazon Silk. Commercial web hosts and CDNs have started implementing SPDY for their customers’ websites, promoting faster deployment of SPDY across the web.

Benefits of SPDY

SPDY provides a substantial number of benefits for a relatively small investment.

  • Users see faster load times and lower bandwidth usage. Bandwidth is utilized more intelligently, allowing users to stretch data caps while experiencing improved performance.
  • Enterprises see higher customer satisfaction. Web pages load faster, resulting in a better user experience.
  • Enterprises also see lower bandwidth costs. SPDY optimizes traffic before it leaves the server, allowing enterprises to utilize more of their network without having to upgrade their hardware.

Enabling SPDY

Almost all web servers that use SPDY use Nginx. Enabling SPDY on Nginx requires the SPDY module to be downloaded or built. Detailed instructions can be found here. Once the SPDY module is available, administrators can enable it by adding “spdy” to the end of the listen directive.

For Apache, Google provides the mod_spdy module. Apache automatically begins using SPDY as soon as it’s installed.

Conclusion

Speeding up the web has been a goal of researches for over a decade. Approaches such as SCTP, SST, and MUX have attempted to solve some of the latency problems inherent in transmitting data. SPDY differs in its ability to address problems with HTTP itself, resulting in a faster, more responsive web without having to change web applications.

When page load times can be transparently reduced by 64%, it’s easy to see how SPDY can shape the future of the web.

  • kamal namdeo

    Very nice article, got to know about SPDY which boosts performance by 64% at max, Great!

  • Ashok Kumar

    Very useful article.