Every piece of infrastructure lives in tension between two opposing forces. Over-provision, and you pay every month for CPU, memory and disks that are rarely used. Under-provision, and the day the demand peak arrives the system saturates, response times spike, and you end up with an outage that costs sales and reputation. Capacity planning is the discipline that looks for the optimal point between those two extremes.
This is not a checklist for one specific campaign, but a general, continuous methodology: how to measure real demand, how to project growth, how much safety margin to leave and which scaling mechanisms to use to absorb the swings. It is the same reasoning whether you run a dedicated server or operate a distributed platform in the cloud.
In this article we go through the key concepts: which resources to size, the three main estimation methods, the role of headroom and percentiles, the difference between vertical and horizontal scaling, how autoscaling works and where its limits lie, and why the hybrid model —a stable base on dedicated plus peaks in the cloud— is usually the most cost-effective answer.
What Capacity Planning Is
Capacity planning is the process of sizing infrastructure resources to meet current and future demand at an acceptable service level, avoiding both over-provisioning (which drives up cost) and under-provisioning (which causes degradation and outages). It is not a one-off calculation but a cycle that is revisited as traffic, product and business change.
Sizing well means looking at several resources at once, because the bottleneck can be any of them:
- check_circle CPU: available cores and frequency against the compute load. A traffic spike or a poorly scheduled batch process can saturate it.
- check_circle Memory (RAM): running out of active memory triggers swap or the OOM killer, and performance collapses suddenly, not gradually.
- check_circle Storage and IOPS: free capacity is not enough; you must guarantee the operations per second and the latency the workload demands, especially in databases.
- check_circle Network: bandwidth, concurrent connections and load balancer throughput. A request spike can exhaust sockets before CPU or RAM.
The goal is not for any resource to never reach 100%, but for the system to hold its latency and availability targets even in the busiest moments, with a reasonable margin for the unexpected.
Three Methods to Estimate Capacity
There is no single way to project the capacity you need. In practice, three complementary approaches are combined:
1. Based on historical trends. You analyse the metrics of the last months (CPU and memory usage, requests per second, data growth) and extrapolate the trend. It is the most reliable method when the business is stable and you already have mature monitoring, but on its own it does not anticipate sharp jumps: it only projects what was already happening.
2. Based on business objectives. You start from the company's goals —a marketing campaign, entry into a new market, a registered-users target— and translate them into expected technical load. It requires a clear relationship between business indicators (orders, active users) and resource consumption, but it is essential to size events that history does not yet reflect.
3. Based on load modelling. You build a model of the system —often validated with load tests— that relates the number of users or requests to the consumption of each resource. It answers questions like "how many servers do I need for 10,000 concurrent users?" and is the backbone of a good capacity strategy, as described in the capacity engineering chapter of Google's SRE Book.
Metrics, Headroom and Percentiles
Sizing without metrics is guessing. The first step is continuous observability of the key resources and of the service indicators (latency, error rate, throughput). With that data, two concepts separate good capacity planning from naive planning: headroom and the percentile.
Headroom is the safety margin you leave above the expected load. You do not size to 100% usage because a system running at the limit has no capacity to absorb a sudden spike, the restart of a node or the growth of the coming weeks. A typical margin sits between 20% and 30%: that is, if you expect to use 70 units of a resource, you provision around 100. That cushion is the difference between degrading gracefully or falling over all at once.
The other classic mistake is sizing to the mean. The mean hides the peaks: a server can be at 40% CPU on average and still saturate every day at rush hour. That is why you size to the percentile: p95 reflects the value not exceeded 95% of the time, and p99 the value for 99%. Working on p95/p99 instead of the mean guarantees the infrastructure holds precisely in those critical moments where the user does notice.
Rule of thumb:
Size to the p95 or p99 of your historical metrics, never to the mean, and add 20-30% headroom on top of that value. Mean + zero margin is the perfect recipe for falling over on exactly the day you have the most traffic.
Vertical vs Horizontal Scaling
When demand grows, there are two ways to respond. Vertical scaling (scale-up) means giving more resources to the same machine: more CPU, more RAM, faster disks. It is simple, requires no changes to the application and is the natural path for hard-to-distribute workloads, such as a monolithic relational database. Its problem is the physical ceiling: a machine cannot grow indefinitely, and expanding it usually means downtime.
Horizontal scaling (scale-out) adds more machines in parallel and spreads the load across them with a load balancer. It is practically unlimited and fits modern architectures, but it requires the application to be distributable and stateless, and it adds coordination complexity. For it to work you need a solid distribution layer; we go deeper into this in our article on load balancing: techniques and architectures.
The following table summarises the main scaling approaches with their advantage and their limit:
| Scaling approach | Advantage | Limit |
|---|---|---|
| Vertical (scale-up) | Simple, no app changes; ideal for monolithic DBs | Physical ceiling of the machine; usually needs downtime |
| Horizontal (scale-out) | Almost unlimited scale; fault tolerance | Requires stateless apps and balancing; more complexity |
| Reactive autoscaling | Adapts on its own to load using real-time metrics | Reacts with a lag; cold start on sudden peaks |
| Predictive/scheduled autoscaling | Anticipates the peak with calendar or ML before it arrives | Depends on forecast quality; fails against the unexpected |
| Static over-provisioning | Capacity always ready; predictable latency | High cost from idle resources most of the time |
| Hybrid (cloud bursting) | Stable base on dedicated + peaks in cloud; best cost/performance | Requires portable apps and overflow automation |
Autoscaling: Reactive vs Predictive
Autoscaling automates horizontal scaling: it adds or removes instances without manual intervention. There are two broad families. Reactive autoscaling responds to real-time metrics —CPU usage, request queue length, latency— and applies rules: if average CPU exceeds 70% for a few minutes, spin up another instance; if it drops below 30%, remove one. It is easy to configure, but it always reacts with a lag, because it first has to detect the peak and then bring up the capacity.
Predictive or scheduled autoscaling gets ahead of the peak. In its simplest form it is a calendar: if you know that every Monday at 9:00 the traffic wave arrives, you scale at 8:45. In its advanced form, a machine learning model learns the historical patterns and provisions capacity before demand hits. It anticipates better, but it depends entirely on forecast quality: against an unforeseen event, it falls short.
Two parameters are critical in any autoscaling policy. The thresholds define when to scale up or down; if they are poorly calibrated, the system scales late or unnecessarily. The cooldowns prevent flapping: without them, the system would add and remove instances frantically on small fluctuations. And there is an underlying requirement: horizontal autoscaling only works well with stateless architectures, where any new instance can serve any request without depending on local state. Our managed services include the design and tuning of these policies.
The Limits of Autoscaling and the Hybrid Model
Here it is worth clearing up a common misconception: autoscaling is not infinite magic. On on-premise or bare metal infrastructure there is no real elasticity: you cannot "spin up" a physical server that is not already installed. Hardware must be provisioned weeks or months in advance, so the only way to be prepared is to size ahead of time with enough headroom. The upside is a much lower cost per compute unit and fully predictable latency.
The cloud, by contrast, is elastic: you can request more instances in minutes. But it carries two tolls. The first is cost: on-demand capacity is noticeably more expensive per hour than reserved or bare metal, and keeping a lot of elastic capacity running inflates the bill. The second is the cold start: a new instance takes seconds to minutes to become operational —booting, pulling images, warming caches— time during which the peak is already hitting you.
That is why the most cost-effective approach for most variable workloads is the hybrid model: a stable base on dedicated or reserved infrastructure —sized to the usual p95 with its headroom— that absorbs the bulk of demand at the best cost, plus a cloud layer for the peaks. This technique, known as cloud bursting, overflows into the scalable cloud only when load exceeds what the dedicated base can serve, combining the low cost of dedicated with the occasional elasticity of the cloud.
None of this is taken for granted without validation. Load testing is what confirms that the sizing and autoscaling policies really hold: you simulate the expected traffic, observe where the bottleneck appears, and adjust before the real event. It is exactly the preparatory work we describe when preparing an ecommerce for Black Friday, where the peak is known and there is no room to improvise.
Common Sizing Mistakes
Most capacity incidents do not come from expensive technology misused, but from wrong sizing decisions. The four most frequent mistakes:
- check_circle Sizing to the mean: using average consumption as the reference ignores the peaks, which is exactly where the system breaks. Always work with p95/p99 percentiles.
- check_circle Ignoring growth: sizing only for today's load guarantees falling short in a few months. The plan must include the projected trend.
- check_circle Leaving no headroom: running at 90-100% usage leaves no margin for restarts, node failures or sudden peaks. Reserve that 20-30% cushion.
- check_circle Autoscaling stateful workloads: applying horizontal autoscaling to databases or services with local session causes inconsistencies and data loss. State is isolated; only the stateless is autoscaled.
EasyDataHost: Dedicated Base with Margin and Cloud for the Peaks
At EasyDataHost we apply this methodology in the infrastructure we offer our customers, combining the best of both worlds:
- arrow_right Dedicated servers sized with real headroom for your base load, with the predictable latency and the per-compute-unit cost of bare metal.
- arrow_right Scalable cloud to absorb the peaks through cloud bursting, paying for elasticity only when you really need it.
- arrow_right Design of autoscaling, balancing and stateless architecture policies within our managed services, including load testing ahead of critical events.
- arrow_right All on our own datacenter in Spain, with ISO 27001 certification, ENS compliance and 24/7 technical support.
If you need help sizing your infrastructure or defining a scaling strategy for the peaks, contact our team for a technical analysis with no obligation.
Frequently Asked Questions
Which percentile should I size my infrastructure to?
To the 95th or 99th percentile (p95/p99) of your historical metrics, not to the mean. The mean hides the peaks where the system suffers; p99 reflects the worst experience of the top 1% of requests. On top of that value, add 20-30% headroom to absorb growth and the unexpected.
Can I rely on autoscaling to absorb any peak?
Not always. It works well with stateless workloads in the cloud, but on bare metal it is not elastic (hardware is provisioned in advance) and in the cloud it suffers cold start, from seconds to minutes. Autoscaling stateful workloads also causes inconsistencies. The recommended path is a stable base with headroom plus autoscaling only for the elastic part.
What is the difference between vertical and horizontal scaling?
Vertical (scale-up) adds resources to a single machine: simple, but with a physical ceiling and usually requiring a restart. Horizontal (scale-out) adds more machines in parallel behind a load balancer: it scales almost unlimitedly, but requires the application to be distributable and stateless. Most mature architectures combine both.
Conclusion
Capacity planning is not about buying the biggest machine or blindly trusting autoscaling: it is about measuring well, projecting growth and choosing the right scaling mechanism for each workload. The key takeaways:
- arrow_right Size with data: to the p95/p99, never to the mean, and always leave 20-30% headroom.
- arrow_right Combine vertical and horizontal scaling, and apply autoscaling —reactive or predictive— only to stateless workloads.
- arrow_right Remember the limits: bare metal is not elastic and the cloud carries cost and cold start. The hybrid model (dedicated base + cloud bursting) is usually the best balance.
- arrow_right Validate with load testing and avoid the classic mistakes: mean, ignoring growth, zero headroom and autoscaling state.