HTTP/1.1 → 2 → 3
HTTP is the language of the web — the format of "give me this page" and "here it is." It has gone through three major generations, and each one exists to fix the previous one's specific bottleneck. Knowing the story means you'll never confuse which problem each version solves.
HTTP/1.1: one at a time
The version that ran the web for two decades has one crippling rule: one request in flight per connection. Ask for a file, wait for it fully, then ask for the next. A modern page needs dozens of files — images, scripts, styles — so this is like a supermarket with a single checkout lane where each customer must completely finish before the next starts.
Browsers hacked around it by opening six parallel connections per site (six checkout lanes), and developers hacked further: gluing all images into one big "sprite sheet," concatenating all JavaScript into one giant file — anything to reduce the number of requests. Remember those hacks; they become a punchline later. Also: HTTP/1.1 headers are plain text and repeated in full on every single request — the same cookies, the same user-agent string, over and over.
HTTP/2: many streams, one connection
HTTP/2 (2015) introduced multiplexing: many requests and responses interleaved simultaneously over one TCP connection, like one road carrying many conversations at once, each tagged so they don't mix. It added binary framing (machine-friendly instead of text), and HPACK header compression so those repeated headers shrink to almost nothing. (It also added "server push," which sounded great and was quietly abandoned in practice — worth knowing so you don't design around it.)
But one bottleneck survived, and it's subtle: everything still rides on one TCP connection, and TCP insists on in-order delivery. Lose a single packet and every stream on that connection stalls while it's re-sent — even streams that had nothing to do with the lost packet. TCP doesn't know about streams; it just sees bytes and refuses to skip ahead. This is TCP-level head-of-line blocking, and no amount of work above TCP could fix it. The fix had to go below.
HTTP/3: rebuild the foundation
HTTP/3 keeps the same request/response semantics but runs on QUIC, a transport built on UDP. Because QUIC implements reliability itself, per stream, a lost packet stalls only its own stream — the others sail on. Bonus features that fall out of the redesign:
- Faster setup: the connection handshake and TLS 1.3 merge into one step — fewer round trips from the previous lesson's tax.
- Connection migration: QUIC identifies connections by an ID, not by your IP-and-port. Walk out of your house, phone switches from Wi-Fi to mobile data, IP changes — and the connection survives. Under TCP it would die and restart from scratch.
The design consequence — old optimisations turned harmful
Remember the HTTP/1.1 hacks — sprite sheets, giant concatenated bundles? Under HTTP/2 and HTTP/3, requests are cheap, so those hacks now hurt you. Many small cacheable files beat one giant bundle, because changing one line no longer invalidates a 2 MB blob in every user's cache — it invalidates one tiny file. An optimisation that was mandatory in one era became actively harmful in the next. The general lesson is bigger than HTTP: check which protocol your users actually negotiate before tuning for it. Optimising for HTTP/1.1 behaviour when your CDN serves HTTP/3 is effort spent making things worse.