Try
↑ ↓ move↵ openesc close

Interview prep / Connections and head-of-line blocking

Senior · Connections and head-of-line blocking · System design interview question

Under packet loss, would you use one HTTP/2 connection or several? What about HTTP/3?

Sketch your own answer first, then compare it with the one below.

A strong answer

One HTTP/2 connection maximizes the effect of head-of-line blocking, since a loss stalls every stream. Several connections limit the damage, because a loss stalls only its own connection. The price is more handshakes, more memory and weaker congestion control, since each connection competes with the others.

A moderate pool, such as a handful of connections spread across streams, is a common middle path when loss is real. Measure the tail latency under your actual loss rate and choose from the data.

With HTTP/3 the need falls, because a loss delays only one stream. One connection is usually enough. Say what you would check: UDP is allowed on your network paths, CPU cost of user-space QUIC, and a fallback to HTTP/2 when UDP is blocked.

Sources

Learn it by running it

The connections and head-of-line blocking lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms