Photo by Guillaume Jaillet on Unsplash
HTTP/3 - A Game changer for web performance?
2 min read
HTTP/3 has arrived, and it can have a significant impact on how people interact with your website.
In general, the more resources your site necessitates, the greater the performance boost you'll see.
Key difference HTTP/1 vs HTTP/2 vs HTTP/3
HTTP/1 - One File at a Time
HTTP/2 - Partial Multiplexing
HTTP/3 - True Multiplexing and QUIC
Multiplexing was a significant improvement in HTTP/2. By switching to multiplexed file downloads, it resolved application-level head-of-line blocking issues. In other words, a client could request all 10 files at once and begin downloading them all concurrently over a single TCP connection.
Unfortunately, HTTP/2 still suffers from head-of-line blocking, albeit at a lower layer. TCP becomes the weakest link in the chain. Any data stream that loses a packet must wait for that packet to be retransmitted before proceeding.
The primary distinction between HTTP/2 and HTTP/3 is the transport protocol used. Instead of TCP, HTTP/3 utilises a new protocol known as QUIC.
Now what is QUIC?
A general-purpose transport protocol designed to address HTTP/2's head-of-line blocking issues with TCP. It enables the creation of a series of stateful streams (similar to TCP) over UDP.
The QUIC transport protocol includes stream multiplexing and per-stream flow control, which is similar to the HTTP/2 framing layer. QUIC has the ability to improve HTTP performance when compared to a TCP mapping by providing reliability at the stream level and congestion control across the entire connection.
Why is HTTP/3 so Much Faster?
- Because HTTP/3 is truly multiplexed, there is no Head-of-line blocking anywhere on the stack.
- HTTP/3 also supports O-RTT QUIC connections, which reduces the number of round trips.
Can we use HTTP/3 today?
- LiteSpeed Web Server (and OpenLiteSpeed) supports HTTP/3 draft 32.
- The Caddy web server has experimental support for HTTP/3 as of 2.0 beta.
- Nginx support for HTTP/3 is being worked on. A technology preview of nginx with HTTP/3 support was released in June 2020.
- Cloudflare distributes a patch for Nginx that integrates the quiche HTTP/3 library into it.
Google and Facebook, for instance, already provide their traffic using HTTP/3. For current browsers, Google.com is exclusively provided via HTTP/3.
As the HTTP/3 gets closer to completion, it may be time to consider enabling it for your website.