Connection reuse

Connection reuse sends many requests over one open connection, so only the first one pays for setup. On a 90 ms path, a new HTTP/2 connection needs 2 round trips (180 ms) before the request starts. A reused connection needs 0.

Play a level

See it on the board

The same traffic runs on two boards. The simulator measured both when this page was built.

Board to show
HTTP/2Mobile usersAPI server1 vCPU · 1 GB
HTTP/2Mobile usersAPI server1 vCPU · 1 GB
New connection for each request: misses a goal
HTTP/2Mobile usersAPI server1 vCPU · 1 GB
HTTP/2Mobile usersAPI server1 vCPU · 1 GB
One connection kept open: meets the goals
See it on the board
Measure Goal New connection for each request One connection kept open
p99 latency under 140 ms 272 ms Fail 92 ms Pass
Monthly cost 4 USD/mo 4 USD/mo
Error rate 0% 0%

Key numbers

Protocol values from the protocol table and the mobile round trip from the network table. The simulator uses the same values.
NumberValue
Round trips to open an HTTP/2 connection2 RTT
Round trips to resume an HTTP/3 connection0 RTT
Mobile 4G round trip, slow end90 ms
Pay for the connection onceTap or press Space to keep the connection open

Connection kept open · round trips of 90 ms: 1 · 90 ms

How it works

A new connection is not free. TCP needs one round trip to open, and TLS adds one more. On a mobile path with a 90 ms round trip, that is 180 ms before the first byte of the request leaves. If every request opens a new connection, every request pays this cost on top of its own round trip.

In the mini board an app sends 30 requests/s on a 90 ms path. Without reuse, each request takes about 270 ms and the 140 ms limit fails. With keep-alive on, the connection stays open, and each request needs only its own 90 ms round trip.

Reuse has limits. A connection that carries one request at a time still makes requests wait in line, so HTTP/2 multiplexing or a small pool helps. Idle connections close after a timeout, so the next request pays setup again. A proxy can also close a connection without warning, so the client must retry on a closed connection.

A resumed HTTP/3 connection can skip even the setup round trips. The rule stays the same: pay the setup once, not for each request.

In the levels you turn on connection reuse and read the p99 for each connection plan.