HTTP Evolution: from 1.1 to HTTP/3
HTTP Evolution: from 1.1 to HTTP/3
Hypertext Transfer Protocol (HTTP) is the foundation of data exchange on the Web. Understanding its evolution is key to optimizing web performance.
ποΈ HTTP/1.1 (The Standard)
Released in 1997, it introduced persistent connections (Keep-Alive) but suffered from a major flaw: Head-of-Line Blocking (HOLB).
- The Problem: Only one request can be processed at a time over a single TCP connection. If the first request is slow, all subsequent requests are stuck.
- Hack Workaround: Browsers opened 6-8 parallel connections per domain to speed up loading.
π HTTP/2 (The Efficiency Jump)
Released in 2015, based on Googleβs SPDY protocol. It focused on making communication more efficient over a single connection.
Key Features:
- Binary Framing: Messages are broken into small binary frames, which are easier to parse.
- Multiplexing: Multiple requests and responses can be sent simultaneously over a single TCP connection, solving HOLB at the HTTP level.
- Header Compression (HPACK): Reduces the size of redundant headers (like User-Agent).
- Server Push: The server can send resources (like CSS/JS) before the client even asks for them.
β‘ HTTP/3 (The Speed of Light)
Released in 2022, HTTP/3 replaces TCP with QUIC (Quick UDP Internet Connections).
Why the change?
While HTTP/2 solved HOLB at the application layer, it still suffered from it at the transport (TCP) layer. If one TCP packet is lost, the entire connection waits for a retransmission.
Key Features:
- UDP-Based: Uses QUIC to provide reliable delivery over UDP.
- Zero RTT Handshake: Combines connection setup and security (TLS 1.3) into one step, significantly reducing latency.
- Connection Migration: Your connection doesnβt drop when switching from Wi-Fi to 5G (IP addresses change, but QUIC connection IDs remain).
π Summary Comparison
| Feature | HTTP/1.1 | HTTP/2 | HTTP/3 |
|---|---|---|---|
| Transport | TCP | TCP | UDP (QUIC) |
| Format | Textual | Binary | Binary |
| Multiplexing | No | Yes | Yes |
| Security | Optional (HTTPS) | Required (de facto) | Built-in (TLS 1.3) |
| HOLB | Application Level | Transport Level | Solved |
π‘ Engineering Takeaway
For modern high-performance systems, ensure your servers and CDNs support HTTP/3. It dramatically improves performance on unstable networks (mobile) and reduces the βTime to First Byteβ (TTFB).