Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 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 7

Connections in review

3 min read

Predict first

Why do clients reuse connections instead of opening one per request?

Predict first

An HTTP/1.1 client needs about 18 requests in service at once. Its pool has 8 connections. What happens?

Predict first

Why does one lost packet slow every stream of an HTTP/2 connection, but only one stream of an HTTP/3 connection?

Take away

  • A new TCP and TLS 1.3 connection costs two round trips before a request can start. QUIC costs one.
  • Reuse connections from a pool. Size it from the request rate times the time a connection is busy.
  • Below that size a queue builds without bound with HTTP/1.1. Above it, the extra connections cost memory.
  • HTTP/2 multiplexes streams on one connection and removes the queue for a free connection.
  • On TCP, a lost packet stalls every stream on that connection. This is head-of-line blocking.
  • QUIC orders each stream on its own, so a loss delays only the stream that lost the packet.

Sources

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