Services

Resources

Company

Latency and throughput

Latency and throughput are the two basic measures of system performance. Latency is the time a single request takes from start to finish, often reported as percentiles. Throughput is the number of requests or messages a system completes per unit of time, such as requests per second. They are related but are not the same measure.

How it works

Little's Law ties them together: concurrency equals throughput multiplied by latency. A service handling 200 requests per second at 50 ms average latency has about 10 requests in flight at once. If latency rises to 500 ms at the same throughput, 100 requests are in flight, which can exhaust thread pools or connection limits. As utilisation nears capacity, requests start to queue, and latency grows much faster than throughput.

Why it matters in production

Optimising one often costs the other. Batching raises throughput but adds wait time per item. Capacity planning that looks only at throughput can push a system into the zone where small traffic spikes cause large latency jumps and SLO breaches.

See also

On the One2N blog

References

  1. Monitoring distributed systems: the four golden signals (Google SRE book)

Comic about latency and throughput: after a deploy, throughput stays at 200 requests per second while latency rises from 50 ms to 500 ms and Pat waits; by Little's Law in-flight requests go from 10 to 100, so all 64 threads are busy and 36 queue; latency shoots up near capacity, and an index brings latency back to 50 ms and 10 in flight.