Try
↑ ↓ move↵ openesc close
In this lesson · topic 6 of 7
  1. 1. The cost before the first byte
  2. 2. Handshakes and connection pools
  3. 3. Pool size, protocol and packet loss
  4. 4. A pool that is too small
  5. 5. HTTP/1.1 against HTTP/2
  6. 6. Head-of-line blocking and QUIC
  7. 7. Connections in review

Topic 6

Head-of-line blocking and QUIC

5 min read

Why one loss stalls everything

TCP gives the application a single ordered stream of bytes. If a packet is lost, the packets after it may arrive, but TCP cannot hand them over until the missing one is retransmitted. HTTP/2 puts many streams on that one byte stream. A packet that belonged to stream 3 holds back streams 1, 2 and 4, even though their data arrived. This is head-of-line blocking at the transport layer.

In the lab, one HTTP/2 connection with 2 percent packet loss had a median latency of 680 msmeasured and a 99th percentile of 1550 msmeasured. 80 percentmeasured of requests finished late because of loss on some other stream. HTTP/2 had cut the queue, and loss brought a worse delay back.

What QUIC changes

QUIC, defined in RFC 9000, runs over UDP and builds streams into the transport. Each stream has its own ordering. When a packet is lost, only the stream whose data was in it waits for the retransmit. The others keep delivering. HTTP/3 maps HTTP onto these streams.

Under the same loss and the same single connection, the lab’s HTTP/3 run had a median of 90 msmeasured and a 99th percentile of 190 msmeasured. 0 percentmeasured of requests were held back by another stream. A request that lost a packet still pays for it, which is the 99th percentile figure. Others do not.

Without changing protocol

Spreading streams over more TCP connections limits the damage, because a loss stalls only its own connection. With 1 percent loss, a pool of 4 HTTP/2 connections had a 99th percentile of 310 msmeasured, and a pool of 16 had 220 msmeasured. That trades back some of what multiplexing saved.

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