HTTP/2 - What Does It Mean for a CDN?
KeyCDN announced the support of SPDY in 2014 which was a great improvement in terms of speed but the update of Google to drop SPDY introduces the start of the next big protocol change. This post gives some insight of the transition from SPDY to its successor HTTP/2.
The technology of SPDY is certainly not a dead end. It is the core of HTTP/2 and eliminates limitations in the SPDY draft.
What is HTTP/2?
HTTP/2, originally named HTTP 2.0, is a new version of HTTP. The specification has been finalized and approved by the Internet Engineering Task Force (IETF). Right now, 5% of Google's traffic is delivered over HTTP/2, and all of the major browsers are planning to support it by early 2016. At KeyCDN, we will be adopting HTTP/2 on our servers later this year, when browser support will be stronger.
HTTP 1.1 has been serving us well since 1997, but today its limitations are slowing down the web.
Under the weight of this overhead, HTTP 1.1 is showing its age.
In order to address the shortcomings of the old standard, many different organizations and companies have spent a lot of time trying to develop a replacement. One of these replacements was a protocol called SPDY, developed by Google. SPDY (pronounced "speedy"), has picked up a lot of support from the major web browsers and web servers, and we are currently using it to accelerate the delivery of resources for our clients.
SPDY aimed to increase the speed of websites by up to 55% - in most tests, it achieves an improvement of at least 27%, even on sites which have already been optimized for speed.
HTTP/2 is based on SPDY, with some improvements which make it even faster and more secure.
Why should we care about HTTP/2?
The main advantage of HTTP/2 (and SPDY before it) is the speed increase and reduces additional round trip times (RTT). It can make your web site load much faster without any manual optimization.
The same could be said of SPDY, but it has some limitations of its own:
- It was not universally supported - it was an open source solution, but it wasn't a web standard. HTTP/2, however, is a full web standard by the IETF, and servers and browsers are expected to comply fully.
- It required everything to be sent over a secure HTTPS connection. This isn't a barrier for larger ecommerce firms, but it did prevent smaller sites from benefiting, as there are many basic hosting accounts that do not include an SSL certificate.
- HTTP/2 supports multi-host multiplexing which further reduces RTTs. SPDY only supports single-host multiplexing.
HTTP/2 does away with these limitations, which is why Google themselves plan to drop support for SPDY and adopt to the latest standard.
Downfalls of HTTP/1.1
- Larger HTTP request headers, no header compression.
- People are forced to use domain sharding and concatenation to keep up.
- Browsers tend to use 4-8 connections, more are needed.
- One client-server request per TCP connection.
Performance is important
Performance optimization is extremely important these days. For mobile devices, the inefficiencies of HTTP are compounded by the difficulties inherent to 3G networks, which compound the time penalty of many requests to the same server. Because HTTP/2 is designed to specifically address this issue, you can expect to see a huge boost in your site's performance on smartphones and tablets.
Users demand a faster web experience, which has resulted in the emergence of performance optimization as a discipline in web development. As the most popular websites have become faster and faster, less optimized sites are beginning to stick out like a sore thumb. Google is beginning to take page speed into consideration as a ranking factor; they have a vested interest in serving results which please customers, and people don't like slow sites.
The importance of HTTP/2 to a CDN
As a content delivery network, our job is to speed up the delivery of resources over the web. Part of that job is making it faster for each packet of data to reach its final destination by hosting the content close to the end user. HTTP 1.1 is a limitation that CDNs have had to work around for too long. With SPDY, we began to see the light at the end of the tunnel.
HTTP/2 is a big step forward for the whole industry. It will allow us to offer an even faster experience for our users and clients, without them having to make any changes at their end. In fact, the job is about to become easier for web developers as complex methods such as sharding become less important.
As a CDN serving many clients, securing our servers against attack is very important. The new standard is more secure than SPDY, as it uses a fixed Huffman code-based algorithm (HPACK) to compress HTTP headers. SPDY uses a less secure stream-based compression, so this change will make our infrastructure even more secure. HTTP/2 allows to "push" resources to the browser, anticipating the files which will be requested before the browser even asks for them.
For web users, you can expect to see a noticeable boost in performance in all of the websites supporting HTTP/2. This is why we at KeyCDN are taking HTTP/2 very seriously. We launched HTTP/2 support for all customers on October 15th, 2015.