HTTP/2 fixed a real problem: HTTP/1.1 needed many connections to fetch many resources. HTTP/2 multiplexes many streams over one TCP connection. Beautiful, until a packet is lost.
TCP delivers bytes in order. If packet 7 is lost, packets 8, 9 and 10 sit in the receive buffer and cannot be handed to the application until 7 is retransmitted, even if they belong to a different stream that has nothing to do with the missing data. One lost packet stalls all streams: head-of-line blocking at the transport layer.
HTTP/3 moves to QUIC, which runs on UDP and has streams as a transport feature:
- Loss on one stream blocks only that stream. The others keep going.
- TLS 1.3 is part of the handshake, so connection setup takes fewer round trips (and a resumed connection can send data in the first flight, 0-RTT, with a replay caveat: only for requests that are safe to repeat).
- Connections are identified by a connection ID, not by the IP and port 4-tuple, so a phone moving from wifi to cellular can keep the connection alive.
- Encryption covers almost all of the transport header, which makes the protocol harder for middleboxes to meddle with.
Trade-offs: UDP is sometimes blocked or rate-limited on networks, so clients fall back to HTTP/2. And user-space implementations cost more CPU than the old tuned TCP stacks.
One loss, many streams, the late packet holds the queue. QUIC frees the others.