"How Many Servers Do We Need?"
Most teams answer this question by intuition: "Let's start with 5 large instances and see what happens." This approach leads to one of two outcomes: Waste (you over-provision and pay for idle servers) or Outages (you under-provision and the service falls over under real load). Neither is acceptable for a production system.
Capacity Planning is the process of modeling your system's resource limits to scientifically determine how much infrastructure is needed to meet expected demand — with appropriate safety margins. It transforms "let's see what happens" into "we know what will happen, and we have planned for it."
The Inputs to Capacity Planning
Before you can plan capacity, you need to measure three things:
- Demand forecast: How much traffic do you expect? Where does this number come from? Historical growth trends, marketing campaigns, seasonal patterns (Black Friday), or product launch projections.
- Service capacity: How much load can a single instance handle before it degrades? This comes from load testing — deliberately sending increasing traffic to a single instance until latency or error rates exceed your SLO.
- Resource consumption per request: How much CPU, memory, network, and disk I/O does a single request consume? This tells you which resource will be the bottleneck first.
Static vs. Dynamic Planning
Static Planning answers the question: "What is the maximum load we need to handle, and do we have enough capacity for it?" This is used for predictable peaks — a product launch, a scheduled batch job, a known seasonal spike. You calculate the required capacity in advance and provision it before the event.
Dynamic Planning answers the question: "How do we scale automatically as load changes in real time?" This is auto-scaling — adding instances when CPU exceeds 70%, removing them when it drops below 30%. Auto-scaling is powerful but not a substitute for static planning. Auto-scaling takes time: a new EC2 instance takes 2-5 minutes to boot and register with the load balancer. If traffic spikes faster than you can scale, you crash before the new instances are ready. Static planning ensures you have enough baseline capacity to survive the spike while auto-scaling catches up.
Key Point: The most dangerous assumption in capacity planning is "auto-scaling will handle it." Auto-scaling is a reactive mechanism. It responds to load that has already arrived. If your baseline capacity cannot absorb the initial spike while new instances spin up, you will have an outage even with auto-scaling correctly configured. Always plan for the minimum baseline capacity needed to survive your fastest expected traffic ramp.