Skip to content

Latency

Latency is the time a signal or request takes to travel from source to destination and back, measured in milliseconds; it is a physical limit imposed by the speed of light and the number of hops, not by bandwidth.

Definition

What it is

Latency is a measure of time, not amount. Bandwidth says how much data per second; latency says how long the first byte takes. A 1 Gbit/s link with 200 ms latency feels slower for interactive use than a 10 Mbit/s link with 20 ms latency — because the request round-trip dominates.

Common units: milliseconds (ms). Common flavours: RTT (round-trip time), TTFB (time to first byte), p50/p95/p99 (percentiles).

Why it matters

Google reports that 53% of mobile users abandon pages that take more than 3 seconds. Amazon measured 1% revenue loss per 100 ms of added latency. Every CDN, edge compute and HTTP/2 push exists to reduce latency, not bandwidth.

Physical vs network latency

Source

Example

Magnitude

Speed of light (fiber)

NY↔London

~28 ms one-way

Router hops

Per hop

1–10 ms

DNS lookup

Cold

20–200 ms

TLS handshake

Full

50–150 ms

TCP slow start

Per RTT

grows

Server processing

Compute

varies

Queuing

Peak load

spikes

Latency in the request chain

sequenceDiagram
  participant U as User
  participant D as DNS
  participant E as Edge
  participant O as Origin
  U->>D: resolve (20-200ms)
  D-->>U: IP
  U->>E: TCP (1 RTT)
  E-->>U: SYN-ACK
  U->>E: TLS (2 RTT)
  E-->>U: OK
  U->>E: GET
  E->>O: forward
  O-->>E: response
  E-->>U: response

How to reduce latency

Cutting latency that matters

  1. Edge caching

    Serve from the nearest CDN node. 150 ms → 10 ms.

  2. DNS preconnect

    <link rel="preconnect"> to third-party origins saves one RTT per origin.

  3. Keep-alive connections

    Reuse TCP+TLS. Never open a new connection per request.

  4. HTTP/2 or HTTP/3

    Multiplexing removes head-of-line blocking.

  5. Compress

    Brotli/Gzip reduce bytes, which reduces transmission time.

  6. Reduce hops

    Colocate origin near users. Avoid CDN bouncing back and forth.

Common failures

Origin

The word comes from Latin latere, "to be hidden, to lie low". In physics, "latency period" was used from the 19th century for delayed responses (e.g., heat, nerve impulses). In computing, the sense arrived with time-sharing systems in the 1960s (access latency to disk and memory). In networking, the term is standard since the 1990s.

Latency is the new bandwidth. It is what users feel.

— Stuart Cheshire, Apple, *It's the Latency, Stupid*, 1996 (paraphrase)
1960s · latency en time-sharing
1996 · "It's the Latency, Stupid" (Cheshire)
2000s · CDN reduce latencia global
2010s · HTTP/2 y HTTP/3 reducen RTT
2024 · Edge compute ≈10ms global

Evidence

FAQ

Latency vs bandwidth?

Latency is delay; bandwidth is throughput. Two independent dimensions.

Can latency be zero?

No. Physical limit is the speed of light. Practical limit is ~5 ms for local fiber.

How to measure?

ping for RTT; curl -w "@curl-format.txt" for TTFB; browser DevTools for waterfall.

Is CDN enough?

For static assets yes. For dynamic, edge compute or origin reads at the edge.

Connections

Etymology

Origin: borrowed

  • latency (noun): from Latin latere, "to be hidden"

Semantic network

LatencyperformancthroughputCDNCacheTTFB

● broader ● narrower ● related

Broader

  • performance

Related

Used in the garden

Sources