What it is
Throughput is the amount of work a system completes per unit of time: requests per second for an API, queries per second for a database, messages per second for a queue consumer, bytes per second for a network link. It counts only completed work. The rate at which work arrives is the offered load; throughput can match it, but never exceed it.
Why it exists
Every component has a finite capacity, and the offered load changes: daily peaks, marketing campaigns, a viral post. Knowing throughput and capacity tells you how much traffic a system can absorb, where it will break first, and how many machines you need. It is the basis of capacity planning and of most scaling decisions.
How it works
Capacity of one component. A component that can work on c requests at once, each taking t seconds, completes at most c ÷ t per second. Four workers at 50 ms each give about 80 requests per second. The concurrency limit can be threads, processes, connections in a pool, CPU cores, or disk I/O slots, whichever runs out first.
Below capacity, throughput equals offered load. At capacity, the component is 100% busy and throughput plateaus. Extra requests wait in a queue, adding latency, and once the queue is full they are rejected or time out. Overloaded systems can even complete less than their capacity, because they spend effort on requests that time out before finishing (wasted work) or on retries.
Pipelines. When every request passes several stages in sequence, the stage with the lowest capacity, the bottleneck, caps the whole system. Upstream stages often look saturated too, because their workers are blocked waiting for the bottleneck; that is why "everything is at 100%" is common during an incident and why you look for the component whose own work, not waiting, fills it.
Little's law. For a stable system, the average number of requests in progress equals throughput multiplied by the average time each spends inside: L = λ × W. It sizes worker pools, connection pools and queues: 500 requests per second at 80 ms each means about 40 requests in flight.
When to use it
Throughput is the headline metric for batch jobs, data pipelines, queue consumers and any capacity planning. For online services it sits beside latency and error rate: you track requests per second to know how close each component is to its limit and to plan scaling before peaks.
When not to
Throughput alone says nothing about user experience. A system at 100% utilisation shows excellent throughput and terrible latency. For interactive services, set targets on latency percentiles and error rate, and treat throughput as a capacity measure rather than a goal.
Trade-offs
| Technique | Raises throughput because | Cost |
|---|---|---|
| More concurrency (threads, workers, connections) | More requests run at once | Memory, contention; useless for CPU-bound work beyond the core count |
| Cheaper requests (optimised code, indexes) | Each request holds resources for less time | Engineering time |
| More machines | Multiplies capacity | Needs a balancer, stateless design; shared dependencies remain |
| Batching | Amortises fixed per-request overhead | Higher latency per item |
| Asynchronous processing | Accepts work quickly, processes at the sustainable rate | Results arrive later; more moving parts |
| Running near 100% utilisation | Fewer machines | Long queues, high latency, no burst headroom |
Alternatives
When a stage cannot keep up and cannot easily be scaled, you can change the shape of the load instead: cache results so fewer requests reach it, queue work and process it at a steady rate, shed low-priority traffic, or rate-limit clients so the system stays within its capacity.
Failure modes
- Scaling the wrong stage. Adding app servers when the database is the bottleneck increases load on the database.
- Unbounded queues. Accepting work faster than it can be processed hides overload until memory runs out or latency becomes unacceptable.
- Retry amplification. Clients retry rejected requests, raising offered load exactly when capacity is short.
- Connection pool exhaustion. Threads block waiting for a pool connection; the application looks saturated though it does little work.
- Throughput collapse. Past a point, contention (locks, cache thrashing, timeouts with wasted work) makes throughput fall as load rises.
In production
Load-test to find each component's real capacity rather than trusting estimates, and repeat after significant changes. Monitor saturation signals (utilisation, queue depth, pool wait time) alongside requests per second. Size pools with Little's law plus headroom. Keep utilisation of latency-sensitive services well below 100% and plan for peak, not average, traffic. Bound every queue and reject early with a clear error rather than collapsing.
Common misconceptions
- "Throughput and latency are inverses." Not simply. More concurrency can raise throughput without changing per-request latency, until queueing begins.
- "More threads always mean more throughput." Only while the threads have idle resources to use; for CPU-bound work, beyond the core count they add contention.
- "Capacities add up across a pipeline." In series, the minimum wins.
- "100% utilisation is efficient." It means a queue is forming and latency is growing.
Interview angle
Do the arithmetic out loud: daily active users to peak requests per second, requests per second per instance from concurrency and latency, then the number of instances with headroom. Identify the likely bottleneck (often the database or a third-party API) and say how you would relieve it: caching, read replicas, batching or asynchronous processing. Using Little's law to size a connection pool is a small detail that stands out.
Model assumptions
The simulation is a simplified model, not a benchmark. The app server has 4 (later 16) workers, a 50 ms mean service time (lognormal, cv 0.3) and room for 10 waiting requests; beyond that it rejects. A worker waiting for the database stays busy. The database has 4 (later 8) connections and a 40 ms mean query time. Workers never compete for CPU, so adding workers always adds capacity here; real servers stop gaining once CPU, memory or locks run out. Arrivals are random (Poisson). Numbers show behaviour and orders of magnitude only.