Latency vs throughput
corebeginnerLatency is how long one request takes, end to end. Throughput is how many requests the system completes per unit of time. They are different axes — a system can raise one while lowering the other.
Think of it as
Think of a highway. Latency is how long one car takes to drive it end to end. Throughput is how many cars pass a checkpoint per hour. Adding lanes raises throughput without changing any single car's travel time; a faster speed limit lowers latency without necessarily changing how many cars fit through. The two are related but not the same lever.
What we're doing: Show latency and throughput moving independently as concurrency changes.
- 3
- One worker, sequential: throughput is exactly the inverse of latency.
- 6
- Ten workers in parallel multiply throughput by ten while each request still takes the same 50ms.
- 10
- When per-request latency rises, throughput falls even with the same worker count — the two move together only when concurrency is fixed.
Why this works: Confusing the two leads to the wrong fix: adding servers does not help a single slow request, and speeding up one code path does not raise the ceiling on total requests per second if concurrency is capped.
Reporting throughput as if it describes user experience
Wrong
Better
What you see: A dashboard shows healthy throughput while users report the app feels slow — because throughput says nothing about how long any individual user waited.
Why: Throughput is a system-wide aggregate; latency is what any single user actually experiences. A system can hit a high throughput number while every request is unpleasantly slow, if enough of them run in parallel.
- Latency
- Time for ONE car to drive the highway end to end
- Measured in ms or s
- Lowered by a faster route, fewer hops
- Throughput
- Cars passing a checkpoint per hour
- Measured in req/s, ops/s
- Raised by adding lanes (parallel capacity)
Latency vs throughput
Together
Remember: Latency = time for one operation; throughput = operations per unit time. More parallel capacity raises throughput, not latency.
See also: percentile latency · littles law

