5. Latency vs Throughput
5.2 What is throughput, exactly?
On the highway: Throughput is how many cars pass the toll booth per hour. It says nothing about any one car. A highway can move 6,000 cars an hour even if each trip takes three hours.
In the system: Throughput is the number of requests (or bytes, or jobs) the system completes per unit of time: requests per second, messages per second, MB per second.
- It's about the whole system over time, not one request.
- It's measured on completed work. Requests that were accepted but are still waiting don't count yet.
- Every system has a maximum throughput, set by its slowest part (the bottleneck). Push more requests in than that and they don't go faster; they pile up.
Why both numbers matter: latency is what one user feels. Throughput is how many users you can serve. A system can be fast for one user and fall over at 100, or slow for each user but able to handle millions (think of a batch job that takes an hour but processes a billion rows).
Memory code: "Throughput is cars past the toll booth." A count over time, not one trip.