HTTP/1.1 vs HTTP/2 vs HTTP/3
HTTP/1.1 is text + one request per connection. HTTP/2 is binary + multiplexing over TCP. HTTP/3 is HTTP/2 over QUIC, killing head-of-line blocking.
The 30-second pitch
- HTTP/1.1 (1997): text protocol, one request per TCP connection at a time. Pipelining barely works. Browsers open 6 connections per origin to fake concurrency.
- HTTP/2 (2015): binary framing, multiplexed streams over one TCP connection, header compression (HPACK), server push.
- HTTP/3 (2022): same semantics as HTTP/2 but over QUIC (UDP-based) instead of TCP. Solves TCP head-of-line blocking.
What changed and why
HTTP/1.1's biggest problem: head-of-line blocking at the request level. Request 2 waits for request 1's response. Browsers worked around this by opening up to 6 parallel TCP connections per origin, each with its own handshake cost.
HTTP/2 fixed application-level HoL by multiplexing many logical streams onto one TCP connection. Each request gets a stream ID; frames from different streams interleave. One connection, many parallel requests.
HTTP/2 left transport-level HoL unsolved: TCP delivers bytes in order, so one lost packet stalls every stream until retransmit arrives.
HTTP/3 fixed transport HoL by switching from TCP to QUIC. QUIC tracks sequence numbers per stream, so loss on stream 3 does not stall streams 1 and 2.
When each wins
- HTTP/1.1: simple, debuggable, still the lingua franca. Use for low-volume APIs and tools.
- HTTP/2: best on fast, low-loss networks. Multiplexing dominates. Most modern web apps.
- HTTP/3: best on mobile and lossy networks. 0-RTT resumption. Better connection migration.
Server push and why it died
HTTP/2 introduced server push: server sends resources before the client asks. Sounds great, used poorly in practice (cache busting, over-pushing). Chrome removed support in 2022. Use <link rel="preload"> or 103 Early Hints instead.
Numbers that matter
- HTTP/1.1 cold start over HTTPS: 3 RTTs (TCP + TLS + request). On 100 ms RTT, 300 ms before first byte.
- HTTP/2 cold start: same, but subsequent requests are free.
- HTTP/3 cold start: 1 RTT (QUIC bundles TLS). 0 RTT on resume.
- HPACK compression: 80-90% reduction on typical request headers.
Learn more
- Paper
- PaperRFC 9113: HTTP/2IETF
- PaperRFC 9114: HTTP/3IETF
- DocsHigh Performance Browser NetworkingIlya Grigorik