Module 96: Reliability Engineering
Capacity planning
🏠The everyday picture
A school planning for next year counts expected admissions and checks classrooms, teachers and buses before term starts, rather than discovering the shortage on the first day.
📘What it really is
- Capacity planning makes sure you have enough resources before demand arrives, without paying for far more than needed.
- Inputs:
- current usage from metrics (Module 72): requests, CPU, memory, database size and connections, queue throughput;
- known limits from load and stress tests (Module 95): "one API copy handles about 150 requests per second at p95 under 800 ms; the database saturates at about 900 writes per second";
- growth forecast from the business: new cities, marketing campaigns, exam seasons, school holidays;
- lead time: how long it takes to add capacity (minutes for cloud servers, weeks for a bigger database plan or a provider contract).
-
Headroom: run at a comfortable level (for example, peaks under 60 to 70% of limits), so spikes and failures (losing one of three copies) don't cause outages.
-
Plan for known peaks: for the booking platform, board exam months and the start of school terms; run load tests at the expected peak beforehand, and pre-scale.
-
Watch the growth trends of slow-growing resources: disk space, database size, table sizes, log volume, costs; alert well before limits.
-
Limits outside your servers: provider rate limits (SMS, payment, AI APIs), connection limits, quotas on cloud accounts; request increases in advance.
-
Write a simple capacity model: a spreadsheet linking business numbers (active students, bookings per day) to resource needs and costs (Module 95).
🖱️Try it
Build a capacity model spreadsheet for the booking platform: today's numbers, forecast growth for 12 months including the exam season peak, the limits from your load tests, headroom targets, and when each resource needs scaling (with lead times and costs). List every outside provider limit and quota you depend on.
✅Quick check
Why keep headroom rather than running close to 100%?
Show the answer
To absorb spikes and survive losing a component without an outage.
Name two inputs to capacity planning.
Show the answer
Any two: current usage, measured limits, business growth forecasts, known peaks, lead times, provider limits.
