← Lessons

quiz vs the machine

Platinum1760

Networking

The Head of Line Blocking in TCP

Why one lost packet stalls everything behind it.

6 min read · advanced · beat Platinum to climb

An Ordered Stream

TCP delivers bytes in order. The receiver must hand data to the application in the exact sequence it was sent, even if later bytes already arrived. This ordering is the root of head of line blocking.

Why One Loss Stalls Many

Imagine several independent messages multiplexed over one TCP connection.

  • A packet carrying an early chunk is lost in transit.
  • Later packets arrive and sit in the receive buffer.
  • TCP cannot deliver any of them until the lost packet is retransmitted and filled in.

So a single loss freezes every multiplexed message, not just the one that lost a packet. The streams are logically independent yet share one ordered byte channel.

Escaping the Constraint

This is why a newer transport built on a datagram protocol treats each stream separately, so a loss in one stream does not block the others. Moving multiplexing below the ordering guarantee removes the shared stall while keeping a single connection.

Key idea

TCP head of line blocking happens because one lost packet stalls every byte behind it in a single ordered stream, and per stream transports avoid it by isolating loss to one stream rather than the whole connection.

Check yourself

Answer to earn rating on the learn ladder.

1. Why does one lost packet stall other multiplexed messages over TCP?

2. How does a per stream transport avoid this blocking?