Try
↑ ↓ move↵ openesc close

Interview prep / Connections and head-of-line blocking

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

Tail latency doubled after a client moved from HTTP/1.1 to HTTP/2 over a lossy mobile network. How do you investigate?

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

A strong answer

Start from the likely cause. HTTP/2 moved many requests onto few connections. On a lossy path, each loss now stalls every stream on its connection, so the tail got worse even if the median improved.

To confirm, compare the tail by loss rate or by network type. Look at retransmit counts and at the share of requests that finished late without a loss of their own, if you can measure it. Check the pool: how many connections, and how many streams each carried.

Then choose a fix. Use more connections, test HTTP/3 where UDP is available, or cut response sizes so fewer packets are in flight. Name the trade-off for each. More connections cost handshakes and fairness, HTTP/3 costs CPU and needs a fallback, and smaller responses cost development effort.

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