skipnothing/HTTP & Networking

HTTP/2 & HTTP/3

Load a page over HTTP/2 and one dropped segment stalls every asset still loading; load it over HTTP/3, one UDP flow, and the same loss stalls only the asset it hit. Same page, two transports, two failure shapes.

  • ▸One lost segment freezes every reply still loading on an HTTP/2 connection, because they all ride one ordered line.
  • ▸Move the same page to HTTP/3 and the identical loss stalls only the one reply that lost data.
  • ▸A download survives a phone jumping from wifi to cellular, because HTTP/3 names the connection, not the address.
BUILDS ON
01

One connection, one response at a time

Your page needs four files: the HTML, a stylesheet, a hero image, one script. Send all four HTTP requests down a single connection and the replies come back in the order they were asked for, one finishing before the next may start. When the hero image is slow, the stylesheet sitting behind it waits too, even though its bytes were ready the whole time. The front of the line holds up everything behind it. That wait has a name: head-of-line blocking.

This is why a browser never uses just one connection to a server. It quietly opens several, commonly around six, and spreads the requests across them so a slow reply only blocks its own line. Six lines instead of one is a workaround, not a fix: the server still answers each line strictly in order, and every extra connection costs its own setup before a single byte of your page can move.

ASSIGN THE ASSETS, WATCH THE TAIL WAIT

Keep going, sign up to unlock the rest

4 more parts in this topic, plus 23+ more topics in HTTP & Networking.

Sign up, it's freeSee the full HTTP & Networking