Failures and antipatterns · Intermediate

Head-of-line blocking

Locate ordering dependencies in HTTP, TCP and the application, including waits and shared resources that multiplexing does not remove.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. A queue’s first item delays later work
  2. Separate HTTP ordering from TCP ordering
  3. Streams still share some resources
  4. Match the remedy to the blocking layer
  5. Ask Logeia about this articleCheck your understanding

A queue’s first item delays later work

Head-of-line blocking occurs when the first item in a queue cannot proceed and delays work behind it. Identify the layer imposing that dependency before claiming that multiplexing removes the problem. HTTP/1.1 pipelining requires responses to be sent in request order, so an earlier response can delay a later one. TCP separately delivers an ordered byte stream: a missing earlier byte range can prevent delivery of bytes that have already arrived later. These are related waiting patterns but they belong to different protocol mechanisms.

Separate HTTP ordering from TCP ordering

Consider HTTP/2 streams A and B carried over one TCP connection. A later packet containing data for B arrives, but an earlier TCP byte range is missing. HTTP/2 reduces application-level response-order restrictions by multiplexing frames, yet the underlying TCP receiver must still reconstruct its ordered stream. Loss recovery can consequently delay delivery involving a stream that appears unrelated at the HTTP layer. This is an illustrative sequence, not a measured comparison of protocols. Multiplexing one layer does not automatically remove an ordering constraint imposed by a lower layer.

Streams still share some resources

QUIC maintains ordering independently for its streams, avoiding the same form of cross-stream delivery blockage caused by a gap in one TCP byte stream. However, streams still share congestion control, bandwidth and server resources. If the application itself refuses to process B until A finishes, changing the transport does not remove that dependency. Examine loss recovery, stream progress and server processing together to locate the actual constraint. A stall seen by every request can arise from shared resource pressure rather than the particular ordered-delivery mechanism this term describes.

Match the remedy to the blocking layer

Possible remedies include splitting queues or connections, allowing independent application requests to run concurrently, selecting an appropriate HTTP/2 or HTTP/3 stack, and separating long work from latency-sensitive work. More connections bring handshake, memory and congestion-control costs. HTTP/3 is not guaranteed to be faster on every route; UDP handling, loss and implementations must be measured. Preserve ordering where correctness requires it. The design objective is to let genuinely independent operations progress independently, rather than hiding a waiting time by discarding a dependency that the application actually needs.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 10

Choose a learning path