Capacity and Load Planning
Systems fail when demand outruns capacity. Plan headroom, test under load, and know your limits before users find them.
What you'll learn
- Estimate expected and peak load for an integration
- Identify the bottleneck that caps your throughput
- Load-test before production rather than after
- Provision headroom and plan for graceful overload
7 min
Know your demand
Capacity planning starts with an honest estimate of load. How many requests per second at a normal time, and at peak? What drives the peaks — a daily batch, end-of-month processing, a marketing event? Averages mislead here: a system sized for the daily mean will fall over during the spike that actually matters, so plan around the peak, not the typical.
You rarely need perfect numbers, just the right order of magnitude and a sense of the shape. Knowing that load triples at month-end, or arrives in a morning burst, tells you far more about what to provision than a single average request rate ever could.
Find the bottleneck
Every system has one constraint that caps its throughput before the others — a database connection pool, a single-threaded stage, an external dependency's own limit, or memory. Total capacity is set by that bottleneck, not by your most abundant resource, so adding capacity elsewhere achieves nothing until the real constraint is addressed.
Identify it deliberately rather than guessing. Under increasing load, watch which resource saturates first; that is your bottleneck. Spending effort optimising anything else is wasted until the binding constraint moves. As you raise one limit, the bottleneck shifts, so this is an ongoing exercise, not a one-off.
Test before users do
Assumptions about capacity are worth little until tested. Load testing drives realistic, scaled traffic at a staging environment to find where performance degrades and where it breaks. The aim is to discover your limits in a controlled setting, on your schedule, rather than during a real spike with users watching.
# ramp load until something gives
for rps in [50, 100, 200, 400, 800]:
run_load(rps, duration='5m')
record(latency_p99, error_rate)Watch where latency climbs and errors appear; that knee in the curve is your practical ceiling. Use traffic that resembles production — realistic payload sizes, a representative mix of endpoints, and warm caches — because a test that exercises only the cheapest path flatters you and hides the limit that will actually bite. Run the test against an environment that mirrors production as closely as you can, since a bottleneck found in a tiny staging box may not be the one that constrains you live.
Headroom and graceful overload
Run with headroom — deliberate spare capacity above your expected peak — so a surprise surge does not immediately tip you over. A system running at the edge has nowhere to go when demand jumps; one with margin absorbs the spike and gives you time to react.
Plan, too, for what happens when you are overwhelmed despite the margin. Shedding or queuing excess load so the system slows rather than collapses is far better than an uncontrolled failure. This connects to graceful degradation: an overloaded system should bend, not break.
Key takeaways
- Plan around peak load, not the average, since peaks cause failures
- Capacity is set by the bottleneck; find it before optimising elsewhere
- Load-test in staging to learn your limits before users do
- Run with headroom so surprises do not immediately overwhelm you
- Shed or queue excess load so overload degrades gracefully
FAQ
Why plan for peak instead of average load?
Failures happen at the peak, not the mean. A system sized for average demand will be overwhelmed during the spikes — month-end runs, campaigns, bursts — that are precisely when reliability matters most.
What is a bottleneck?
The single most-constrained resource that caps overall throughput. Adding capacity to anything else does not help until you relieve the bottleneck, and relieving one usually shifts the constraint to the next resource.
How is load testing different from functional testing?
Functional tests check correctness; load tests check behaviour under volume. Load testing drives scaled, realistic traffic to find where performance degrades and breaks, so you learn your limits before production does.
Ready to build?
Read the API reference, grab the OpenAPI spec, and ship a resilient integration.