Skip to content
Optimal Lab

Networking · interactive

Latency vs bandwidth

Bandwidth is how wide the pipe is; latency is how long it is. Before a byte arrives you pay round trips for the TCP and TLS handshakes, and TCP starts slow and speeds up each round trip. For small transfers, latency is nearly everything.

API call (2 KB)300 ms

handshakes 200 ms · slow start 100 ms · transfer 0 ms

Web page (500 KB)800 ms

handshakes 200 ms · slow start 600 ms · transfer 0 ms

Video (200 MB)33 s

handshakes 200 ms · slow start 600 ms · transfer 32 s

handshakes (latency) ramp-up (latency) transfer (bandwidth)

bandwidth × delay = 625 KB in flight to fill the pipe

At 50 Mbps and 100 ms, the API call is 100% waiting on round trips. Try 10× the bandwidth: it barely changes. Halve the latency: it halves.

  1. 1

    Light in fibre covers about 200 km per millisecond. London to Sydney is ~250 ms round trip no matter what you pay.

    You can't buy lower latency, only move closer.

  2. 2

  3. 3

  4. 4

In production

Tools and technologies

CDNs exist because latency beats bandwidth for most web traffic.

Not tied to one language — use these names when you search docs or design a system.