Services

Resources

Company

/

Latency and throughput

Latency and throughput

Latency is how long one request takes, start to finish, and is usually reported as percentiles such as p99. Throughput is how many requests the system finishes per second. A system can do well on one and badly on the other: a batch job can push huge throughput while each item waits minutes.

How it works

Little's Law links the two: requests in flight equals throughput times latency. Take a shop handling 200 orders a second at 50 ms each, so about 10 orders are in progress at any moment. Ship a release that makes each order take 500 ms and, at the same 200 a second, 100 are in progress. If the server only runs 64 at once, the other 36 wait in line, their wait adds to the latency, and the line gets longer still.

Why it matters in production

Optimising one often costs the other. Batching raises throughput but adds wait time per item. If you plan capacity on throughput alone, you can end up running at 95% busy, where a small traffic spike doubles response times and breaks the SLO.

See also

On the One2N blog

References

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

Chart of latency against how busy a system is, under Little's Law: in flight = throughput x latency. Two worked cases: 200 requests per second x 50 ms = 10 in flight, and 200 per second x 500 ms = 100 in flight. The latency curve stays low, then bends sharply upward as requests start to queue. A red dot at 95% busy marks where a small traffic spike doubles response times.

Putting this into practice?

Talk to One2N about our SRE consulting

Talk to One2N about our SRE consulting