Skip to content

DNS / HTTP · 5 of 8

Step 1 · The pattern

HTTP/1.1: one at a time

On an HTTP/1.1 connection, a request must wait until the previous response has finished. Browsers open several connections to compensate, but requests still queue behind each other.

  • request waiting its turn
  • loaded

In short

HTTP/1.1 vs 2 vs 3: how it works and how it breaks

A web page needs dozens of files. HTTP/1.1 can send one request at a time on a connection, and the next must wait for the reply. Browsers work around that by opening about six connections per site, which still leaves requests queueing. HTTP/2 multiplexes: many requests and responses, called streams, are interleaved on a single connection, so nothing waits its turn. But that connection is TCP, and TCP promises to deliver bytes in order. If one packet is lost, everything behind it is held until the missing packet is resent, including data for streams that lost nothing. On a clean network HTTP/2 wins easily. On a lossy mobile network one dropped packet freezes every stream at once. HTTP/3 replaces TCP with QUIC, built on UDP, where each stream is ordered independently. A lost packet delays only its own stream. QUIC also sets up encrypted connections in fewer round trips.

How this comes up in interviews

"Your site moved to HTTP/2 and got faster on office networks, but mobile users on poor connections see pages freeze. Why?"

Then they ask

  1. What does HTTP/2 multiplexing fix compared with HTTP/1.1, and what does it leave in place?
  2. How does HTTP/3 change what a single lost packet affects?
  3. On which networks would you expect little difference between HTTP/2 and HTTP/3, and why?

A strong answer covers

  • HTTP/1.1 sends one request at a time per connection, so browsers open several connections and requests still queue.
  • HTTP/2 multiplexes many streams on a single connection, so nothing waits its turn.
  • That connection is TCP, which delivers bytes in order. One lost packet holds back every stream.
  • HTTP/3 runs on QUIC over UDP, where each stream is ordered independently and loss delays only its own stream.
  • The advantage is largest on lossy mobile networks. QUIC also sets up encrypted connections in fewer round trips.

Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.

On one page: the track cheat sheet.

Last updated: Standard

Diagrams are our own simulations: the timings, rates and counts in them are illustrative, not measurements. Captions are original wording.