Capacity planning and forecasting
Forecast demand, find each component's limit and keep enough headroom to survive peaks and failures.
15 min readFrom business drivers to load
Capacity planning starts with a demand forecast expressed in business terms, such as daily active users, orders or uploads, and converts it to load per component. If 2 million daily users each make 50 requests, that is 100 million requests a day, about 1 160 RPS on average. Traffic is not flat, so multiply by a peak factor, typically 2 to 5 for consumer products and higher for events like sales or sports finals. Planning for 5 000 RPS at peak is very different from planning for 1 160.
Find the limit by measuring
The capacity of one instance comes from load tests, not guesses. Increase load against a production-like instance until latency crosses the SLO, and record the throughput at that point. That is the usable capacity, usually well below the point of total failure. Repeat for each tier, because the bottleneck moves: after you add application servers, the database or a downstream API usually becomes the limit. Re-run the tests after major releases, because a single new query or a heavier serialisation format can cut per-instance capacity by a third.
- Instances needed = peak RPS / usable RPS per instance / target utilisation
- Example: 5 000 / 400 / 0.7 gives 18 instances
- Add N+1 or N+2 per zone, so losing a zone still leaves enough capacity
Forecasting growth
Plot weekly peak load for the past 6 to 12 months and fit a trend; a simple linear or compound growth model is enough for most services. Overlay known events such as marketing launches, seasonal peaks and new customer onboarding. Then compare the forecast against the lead time to add capacity. Autoscaling covers minutes; new database hardware, reserved capacity or quota increases can take weeks. Order the slow things when the forecast says you will hit 70% within that lead time, not when you hit it.
Headroom and failure domains
Headroom is not waste. A fleet spread over three availability zones must survive losing one, so each zone carries at most two thirds of peak and normal utilisation should sit near 60%. In SystCode, the Feedback panel's simulation runs your design at the scenario's peak; if a component is above about 80% at normal peak, a single failure or burst will tip it over. Remember stateful tiers too: databases and queues cannot double in minutes, so their headroom has to be planned in advance rather than left to autoscaling.
Key takeaways
- Convert business forecasts to peak RPS with an explicit peak factor
- Measure usable capacity per instance with load tests at the SLO latency
- Plan for zone loss: N+1 per failure domain
- Start slow provisioning when the forecast crosses 70% within its lead time
Sign in to track lessons and earn badges.