HTTP/1.1 — what senior engineers still need
- Request/response over TCP: methods, status codes, headers, body.
- Persistent connections (keep-alive) — reuse TCP for multiple requests; avoids handshake tax.
- Pipelining — largely failed in practice; browsers opened parallel connections instead (typically 6 per host) — domain sharding was a hack to raise parallelism.
- Head-of-line blocking — one slow response blocks the next on the same connection.
Know idempotency: GET/PUT/DELETE vs POST; matters for retries and 0-RTT.
HTTP/2 — multiplexing on one TCP connection
- Binary framing — streams multiplexed on a single connection.
- HPACK header compression.
- Server push — mostly fell out of favor; know it existed.
The catch: TCP HOL blocking still applies — one lost packet stalls all streams on that connection. HTTP/2 fixed HTTP/1 connection limits, not TCP loss behavior.
HTTP/3 & QUIC
- Runs over UDP with QUIC providing reliability, encryption (TLS 1.3 integrated), and per-stream multiplexing — loss on one stream doesn't block others.
- Connection migration — survives IP address changes (mobile).
- Adoption growing at CDNs and browsers; many origins still HTTP/2 or HTTP/1.1 behind TLS terminators.
Comparison table (memorize this)
| HTTP/1.1 | HTTP/2 | HTTP/3 | |
|---|---|---|---|
| Transport | TCP | TCP | QUIC (UDP) |
| Multiplexing | Parallel connections | Streams on one TCP | Streams, no TCP HOL |
| TLS | Optional → facto required | TLS required | TLS 1.3 built in |
| Interview focus | Keep-alive, caching headers | Multiplexing, HPACK idea | Why UDP, per-stream isolation |
Caching headers (often paired with HTTP questions)
Cache-Control (max-age, no-store), ETag / If-None-Match for validation, Vary for cache key dimensions. Senior signal: distinguish browser cache vs CDN edge cache vs application cache.
Further Reading
- Kurose & Ross, 8th Ed — Ch. 2 §2.2.1–2.2.3, §2.2.6 (pp. 96–107, 113–115): HTTP/1.1 and HTTP/2 overviewBook25m
- Kurose & Ross, 8th Ed — Ch. 3 §3.8 (pp. 279–281): QUIC overviewBook15m
- High Performance Browser Networking — Ch. 11–13: HTTP/1.x, HTTP/2, HTTP/3 (comparative read)Article35m
- Cloudflare — HTTP/3: the past, the present, and the futureArticle15m
- High Performance Browser Networking — Ch. 16–17: WebSockets and Server-Sent EventsArticle25m
Hands-On Tasks (Optional)
Low-setup exercises you can run locally or on a free-tier cloud account. No autograding — the goal is to build intuition, not pass a test.
- Check which HTTP version a site uses10m
Run `curl -sI --http2 https://example.com | head` and `curl -sI --http3 https://cloudflare.com 2>/dev/null | head` (if your curl supports HTTP/3). Note protocol line and Alt-Svc header.