8. HTTP/1.1 → HTTP/2 → HTTP/3
One-liner. Each version attacks head-of-line blocking at a different layer.
Memorize
- HTTP/1.1: one request in flight per connection (pipelining is rarely used) → browsers open ~6 connections per host.
- HTTP/2: binary framing, multiplexing over one TCP connection, HPACK header compression, server push (deprecated in practice).
- HTTP/2's weakness: TCP head-of-line blocking — one lost packet stalls all streams.
- HTTP/3: HTTP semantics over QUIC; independent streams, 0-RTT, connection migration.
- Caching:
Cache-Control,ETag/If-None-Match(304),Last-Modified,Vary. - Compression: gzip/brotli for text; don't double-compress images.
- Status classes: 2xx success, 3xx redirect (cacheable semantics matter), 4xx client, 5xx server/upstream.
Trap. Enabling HTTP/2 and expecting no head-of-line blocking — TCP still couples the streams. Do this. Use HTTP/3 where the network allows UDP, with HTTP/2 as fallback.
Check
Why does HTTP/3 improve on HTTP/2 under packet loss?
Why
HTTP/2 multiplexes inside TCP, whose in-order delivery couples all streams; QUIC recovers per stream.