How HTTP evolved from HTTP/1.1 to HTTP/2 and HTTP/3 QUIC
Compare HTTP/1.1, HTTP/2 multiplexing with HPACK, and UDP-based HTTP/3 over QUIC, including HOL blocking, curl checks, and production rollout trade-offs.
As web pages grew heavier and mobile networks became the default, HTTP evolved from sequential text over TCP to binary multiplexing, and finally to UDP-based QUIC. This post compares how HTTP/1.1, HTTP/2, and HTTP/3 tackle Head-of-Line (HOL) blocking, how to verify negotiation with
curl, and where each protocol trips up in production.
Standards reference: RFC 9110–9114 (HTTP/1.1–3), RFC 9000 (QUIC), Nginx 1.25+ / curl 8.x.
HTTP/1.1 Keep-Alive and application-level HOL blocking
HTTP/1.1 made persistent connections (Keep-Alive) the default so browsers wouldn’t pay a fresh TCP handshake on every asset. Even so, HTTP/1.1 messages are plain text without stream identifiers, which forces the server to return responses in the exact order requests arrived.
HTTP pipelining tried to send multiple requests back-to-back without waiting, but one slow response at the front of the queue still stalled every response behind it—Application-level Head-of-Line (HOL) Blocking. Combined with broken proxy support, browsers disabled pipelining altogether.
To work around sequential delivery, browsers opened up to 6 parallel TCP connections per origin, and teams invented domain sharding (splitting assets across static1, static2, static3) at the cost of extra DNS lookups and TLS handshakes. On top of that, every single request resent uncompressed plaintext headers like Cookie and User-Agent, wasting bandwidth on repetitive metadata.
HTTP/2 binary framing and TCP-level HOL blocking
HTTP/2 (RFC 9113) replaced plaintext messages with a binary framing layer. Each request and response splits into HEADERS and DATA frames tagged with a unique Stream ID. Because frames can interleave arbitrarily over a single TCP connection, multiplexing solved application-level HOL blocking and made domain sharding unnecessary.
For header overhead, HTTP/2 introduced HPACK compression. Sixty-one common headers map to a static index table, custom headers and auth tokens get cached in a per-connection dynamic table, and string literals use Huffman encoding.
Look one layer down at the transport stack, though, and a major bottleneck remains: HTTP/2 still runs over a single TCP byte stream. TCP guarantees ordered delivery across the entire connection, not per HTTP/2 stream. If just 1–2% packet loss drops a single TCP segment belonging to Stream 1, the OS kernel holds back cleanly received segments for Streams 3 and 5 until the missing segment retransmits. Removing application-level HOL blocking exposed TCP-level HOL blocking, which can make HTTP/2 perform worse than HTTP/1.1 on lossy cellular networks.
How HTTP/3 and QUIC redesign the transport layer
Extending TCP directly is notoriously slow because middleboxes—corporate firewalls, NAT routers, and load balancers—drop packets with unfamiliar TCP options, a problem known as protocol ossification. Instead of fighting TCP middleboxes, the IETF built QUIC (RFC 9000) in user space on top of UDP, implementing its own reliability, congestion control, and encryption, with HTTP/3 (RFC 9114) layered above it.
flowchart TD
H1["HTTP/1.1 (TCP)<br/>Text · Sequential responses"]
B1["Bottleneck: App-level HOL blocking<br/>Repeated headers · 6-conn cap"]
H2["HTTP/2 (TCP + TLS)<br/>Binary multiplexing · HPACK"]
B2["Bottleneck: TCP packet loss<br/>stalls all streams together"]
H3["HTTP/3 (QUIC / UDP + TLS 1.3)<br/>Independent streams · 1-RTT/0-RTT · CID"]
H1 --> B1
B1 -->|"Add binary framing"| H2
H2 --> B2
B2 -->|"Move transport to UDP"| H3
QUIC brings three structural upgrades:
- Integrated TLS 1.3 handshake: By merging transport and cryptographic handshakes, QUIC establishes new encrypted connections in 1-RTT, and reconnects with cached session tickets in 0-RTT. (For how TLS 1.3 itself trims handshake round trips, see TLS 1.3 handshake and certificate chain validation.)
- Independent streams and QPACK: Each QUIC stream handles its own loss recovery, so a dropped packet in Stream 1 never blocks Stream 3. Header compression switched from HPACK to QPACK, removing cross-stream ordering dependencies in the dynamic table.
- Connection migration via Connection ID (CID): TCP binds sessions to a 4-tuple
(src IP, src port, dst IP, dst port), so switching from Wi-Fi to 5G drops active connections. QUIC identifies sessions with a Connection ID, keeping active transfers alive across IP changes.
| Dimension | HTTP/1.1 | HTTP/2 | HTTP/3 (QUIC) |
|---|---|---|---|
| Transport | TCP | TCP | UDP (QUIC reliability built in) |
| Multiplexing | None (multiple connections) | Single TCP connection | Independent QUIC streams |
| Header compression | None | HPACK | QPACK |
| HTTPS handshake | TCP 1 + TLS 1–2 RTT | TCP 1 + TLS 1–2 RTT | Initial 1-RTT / Resume 0-RTT |
| HOL blocking | App + TCP layers | TCP layer remains | Eliminated at transport layer |
| Network switching | Connection drops | Connection drops | Survives via Connection ID |
Verifying protocol negotiation with Nginx and curl
HTTP/2 is negotiated during the TLS handshake via the ALPN extension (h2). HTTP/3 typically bootstraps via an Alt-Svc response header sent over HTTP/2, telling the browser to upgrade subsequent requests to UDP port 443. Nginx 1.25+ supports both protocols natively:
1
2
3
4
5
6
7
8
9
10
11
12
13
# /etc/nginx/conf.d/api.conf
server {
listen 443 quic reuseport;
listen 443 ssl;
http2 on;
server_name api.example.com;
ssl_certificate /etc/letsencrypt/live/api.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.example.com/privkey.pem;
ssl_protocols TLSv1.3;
add_header Alt-Svc 'h3=":$server_port"; ma=86400' always;
}
You can verify both protocol negotiation and per-phase timing directly with curl (version 8.x built with HTTP/3 support):
1
2
3
4
5
6
7
# 1. Verify HTTP/2 response and Alt-Svc advertisement header
curl -sI --http2 https://cloudflare.com | grep -iE "^HTTP/|alt-svc"
# 2. Force HTTP/3 and measure connect, TLS, and TTFB timings
curl -sS -o /dev/null --http3-only \
-w "proto=%{http_version} connect=%{time_connect}s tls=%{time_appconnect}s ttfb=%{time_starttransfer}s\n" \
https://cloudflare.com
Production trade-offs and when not to use HTTP/2 or HTTP/3
Protocol upgrades aren’t free, and forcing the newest version everywhere causes real outages if your infrastructure isn’t ready.
Warning: Many corporate firewalls and public Wi-Fi networks block or throttle UDP port 443. Never deploy HTTP/3 alone—always serve TCP 443 (HTTP/2) alongside it and rely on
Alt-Svcfor automatic fallback.
Watch out for three operational pitfalls:
- 0-RTT replay attacks: Early data sent during a 0-RTT handshake arrives before the server finishes verifying the client, meaning an attacker can capture and replay those packets. Restrict 0-RTT strictly to safe, idempotent methods (
GET,HEAD) and never allow it on state-changingPOSTendpoints like checkout or payments. - L4 load balancing breaks internal HTTP/2: Because HTTP/2 multiplexes thousands of requests over one long-lived TCP connection, a connection-level L4 load balancer (such as AWS NLB or
kube-proxy) pins all traffic to the original backend pods even after autoscaling adds new ones. If you use HTTP/2 or gRPC between internal microservices, put an L7 proxy like Envoy in front or configure client-side load balancing. - Higher CPU cost for QUIC on the origin: User-space UDP encryption and packet pacing currently consume more CPU per gigabit than kernel-offloaded TCP+TLS. On low-loss datacenter LANs between internal services, HTTP/3 rarely beats HTTP/2—keep HTTP/3 at the CDN or edge tier where mobile packet loss actually hurts users.
Before enabling HTTP/2 or HTTP/3 in production, check these points:
- Keep TCP 443 (HTTP/2) active whenever advertising HTTP/3 via
Alt-Svcso UDP-blocked clients fall back cleanly. - Disable 0-RTT early data on non-idempotent routes (or leave
ssl_early_data offunless you have anti-replay tokens). - Use L7 load balancing (not L4) for internal HTTP/2 and gRPC services so autoscaling distributes requests evenly.
- Verify both
Alt-Svcheaders and--http3-onlytimings from outside your corporate network usingcurl.