Volume I · Part I · Chapter 2
Capacity Is a Decision
Anytime I hear “yeah, we’ve got enough capacity,” I want to know for what. The service may be fine today. What about our busiest day of the year with a group of machines down? I would trust an answer that started with what the service can carry now, showed me the traffic expected over the next 30 to 90 days, and told me which change would bring the operators back to the question. Somebody has to decide what customers can count on under those conditions.
If you run a capacity team, you learn to be careful about asking whether anybody needs more. Ask a team that maintains a complex service and it may quite reasonably ask for more just in case. I’d rather have seen a shortage coming in the data and go to the team with something specific to discuss. When we consistently learn about shortages from requests for more machines, we’re already late.
How to read this chapter
Watch what happens to the numbers when the example loses a group of workers. Later, when we compare renting and owning hardware, the same question returns in a more expensive form. Who can get usable capacity to the service by the time we need it?
Specify the work before naming the size
Capacity is how much useful work a system can complete in a period at a stated level of quality, under specified conditions. The inventory tells us how many machines we have. To make a promise to the business, I need evidence of what those machines and their dependencies can do together for the work we plan to send them.
The example this book reuses is a transaction-facing service built on 64 workers, each established at 250 completed requests per second under a representative test that also holds response time at the ninety-fifth percentile to no more than 200 milliseconds, with errors no greater than 0.1 percent of offered requests. Multiplying that rate by the number of workers assumes the service scales linearly, so I treat every configuration in this example as having passed the same test at its full size. These are synthetic results, not benchmarks for a product you can buy. The workers are divided into four groups of sixteen, each group running on separate hardware, power, and network so that the service keeps running, at reduced capacity, after losing any one group. I will call each of these a failure group. The label matters less than the design question behind it: what is allowed to fail together? In normal operation the service completes 64 × 250 = 16,000 requests per second; after losing one group, 48 × 250 = 12,000. Independence here is an assumption about that single-group event; it does not establish that all four groups would survive a shared control, network, or regional failure.
The four groups are an assumption about our example. Try putting them in a real region. Most Azure regions that offer availability zones have three, and a service may use only some of them.1 If we put two of our four groups in one zone, losing that zone leaves 32 × 250 = 8,000 requests per second, rather than the 12,000 in our test. Draw the groups from the placement and dependencies you have. They determine how many workers you lose at once.
Our next peak is estimated at 10,000 requests per second. The full rollout would bring it to 14,000. On a good day the service can handle 16,000. Lose a group and it can handle 12,000, which leaves the rollout 2,000 short. The customer’s reliability promise tells us which of those figures to use.
The rollout might change the work itself. Reading a small cached item and searching a long history both count as one request, but the database could have a very different experience of the two. If the rollout changes their proportions, I’d test the 250-request rate again before offering it to anyone who needs a dependable answer.
A batch customer might care about completing a body of work before a deadline; a streaming customer might need to carry new traffic while catching up on a backlog. An AI service has to finish a task at acceptable quality within a provider’s token and request limits or, if it runs its own models, within the GPU memory that the model and its cached context occupy. We will spend time on these differences because they determine whether additional resources are useful, and sometimes whether the resources we already have are useful in the way we assumed.
I want to be able to show a specialist when we tested, what work went in, and what the system actually completed. A healthy completion rate can hide rejected work or a growing queue. The manager making the commitment needs a version of the same account they can explain to the customer. “The system scales” leaves both people to guess.
Requirements can change faster than supply
The Art of Capacity Planning opens its chapter on capacity goals with a line I agree with: “You wouldn’t begin mixing concrete before you know what you’re building.” Kejariwal and Allspaw put requirements for performance, availability, and reliability first, and because those requirements change as users’ expectations evolve, they treat the planning as continuous.2 I would much prefer to work in that order. My objection is to a use of the advice they don’t propose: treating requirements as a gate a request must pass before anyone helps, when the request that arrived in the wrong order can be exactly the one the business now cares about most.
As the Introduction’s demonstration showed, an experiment can become business-critical before anyone has sized it for production. The capacity team is still looking for the original request while the business is discussing a launch date.
Getting the order of things wrong can be a serious engineering mistake. Once it’s happened, I want to know how we can get the service enough capacity. A lecture won’t get our order delivered sooner, and the next team may wait longer to tell us it’s in trouble.
I would begin by finding out which parts of the request have actually become commitments. The date may be fixed while the audience remains negotiable. A customer might need one workflow immediately and be willing to wait for another, or the demonstration might have established useful functionality without giving us any evidence about throughput. Each of those discoveries suggests a different next step, which is why asking for “the requirements” once and treating the answer as settled is rarely enough.
Supporting the request does not mean passing it to a provider unchanged. If a team thinks it is going to launch next year, ramp the commitment up over time and work out the ramp with the provider: you don’t want to give your provider an estimate that leaves 80 percent of the capacity unused. That puts the capacity team a little out in front of the engineering team and the business, and it is a risk you may have to take on. Sooner or later a team comes back and says, “Wait, we asked for 1 million cores by June.” They haven’t launched anything yet, it’s May, and until I see evidence that this is going to work, they are going to get 250,000 cores by June. If they demonstrate it, I can ask for more. What I won’t do is ask the provider to set aside 1 million cores for a team that then misses its deadline.
Our portfolio has a ramp of its own. A staged rollout would add 2,000 requests per second instead of 4,000. That brings the peak to 12,000, exactly what the service keeps after losing a group, with no margin at all. Eight compatible workers doing deferrable batch work could also move in for thirty days, after two days of preparation and testing. We learn those things from people who understand the customers and the platform, and together they give us an option that the original demand curve could not reveal. Chapter 4 works through what that option buys.
Before we can use those workers, the batch owner has to agree to the delay, the web operators have to qualify the changed configuration, and someone has to pay for and arrange the replacement. Volume II, Chapters 18 and 20 consider what happens when the workers are due back before their replacements are ready.
Headroom has a purpose
Headroom is often described as the difference between a measured limit and expected demand, but that leaves out the question of which limit we mean. In our original configuration, normal capacity of 16,000 minus expected demand of 10,000 leaves 6,000 requests per second. Under one-group loss, the calculation is 12,000 minus 10,000, leaving 2,000. These describe different states of the same service, not two reserves we can add together.
Some of that room is carrying more than one responsibility in the plan: growth while everything works, and service preserved when something fails. The healthy service’s 6,000 looks like room for the rollout’s 4,000 and also for the 4,000 that a lost group takes with it, but it cannot be both, because together they need 8,000. Test the combined requirement in the condition you intend to promise. Counting each responsibility separately and then celebrating the apparent total can make us feel considerably better prepared than we are.
Readiness complicates the picture further. A worker that takes two days to prepare may be useful for next week’s launch but irrelevant to a shortage beginning in the next minute. Resources without access to the necessary data will not restore a data service, however many of them the inventory shows. Placement, dependencies, and preparation time belong in the discussion before we label a resource available.
Before freeing capacity that looks idle, ask when somebody expects to use it. If nobody knows, give the person investigating it enough time to find out and set a date to revisit the decision.
Elasticity: what it promises and what it costs
Elasticity is the ability to add and release resources as demand changes. A team that can rent more on its busiest day needn’t own that much all year. It can also try a small experiment before agreeing to buy capacity for the larger one. The bill follows demand only to the extent that the agreement lets the team stop paying when it releases resources.
The standard definition, from NIST, goes further: to the consumer, the capabilities “often appear to be unlimited and can be appropriated in any quantity at any time.”3 That is the ideal that shows up in a sales conversation, and at small scale it is real: a team whose busiest day needs three or four GPUs can rent them by the hour and release them at night, and the provider is content to have the capacity back. The picture changes as the numbers grow. I once asked a provider to support a workload that scaled from zero to 100 GPUs every day on a SKU that was often in short supply. To honor that pattern, the provider would have had to hold 100 GPUs ready somewhere — hardware the rest of the market was competing for at exactly the hours we were not using them. The provider came back with a different proposal: they could not reserve 100 GPUs for us when we were only going to use them half the time. A commitment that covers elastic scale at that size is effectively a commitment to pay around the clock, because somebody is holding the supply whether you are using it or not. Everyone who needs those GPUs needs them right now, and that competition is exactly what turns the dial back into a commitment.
The same conversation reaches small customers when the hardware is scarce, and the providers’ own terms show it. Azure bills an on-demand capacity reservation at the normal rate for its VM size from the moment it is created, whether or not anything runs on it; reserved-instance and savings-plan discounts can apply, but an idle reservation is still billed. Creating one fails if the region lacks the capacity, and as of October 2026 the ND-series and NCads H100 v5 GPU sizes cannot be reserved this way at all.4 AWS offers Capacity Blocks for machine learning: a fixed number of GPU instances for a fixed window of at least a day, starting up to eight weeks out, priced on supply and demand at the time of purchase, paid up front, and not cancellable.5 A workload that needs the GPUs for half of each day still buys the whole day. Neither arrangement is a dial. Elasticity at scale is an inventory promise somebody has to fund, and the bigger the swing, the more the arrangement converges on a reservation with a bill attached. Volume II, Chapter 14 takes up the demand side of this: when the variation in a workload is predictable, the swing itself becomes something you can plan and buy for.
For a particular workload, compare the cost over the period of use, not just the hourly rate. Suppose the around-the-clock commitment for those 100 GPUs comes at thirty percent below the on-demand rate, and the work keeps them busy twelve hours a day. Each hour actually used then costs 0.7 × 24 ÷ 12 = 1.4 times the on-demand rate. The commitment comes out ahead only if the GPUs are busy more than seventy percent of the time, the same break-even that Volume II, Chapter 20 reaches for a constructed take-or-pay agreement. Elasticity and a low total cost can go together; paying for unused committed capacity can reverse the apparent discount.
A size listed in the catalog may be sold out just when everyone is scaling. And if the provider can allocate the machines, we still need them ready to serve. In our example the six-week estimate for sixteen workers includes delivery, preparation and testing with the service they will join. Once they’re ready, the service can use them as its fifth independent failure group.
Check what the scaling policy permits the application to buy. A team can stay within its technical limits while running up a bill the budget owner never agreed to.
Autoscaling still needs someone to supply the capacity
I like automation that responds to changing demand. What worries me is the point at which the word autoscaling starts doing work that belongs in a supply plan. An autoscaler can ask for resources when a signal changes; it cannot, by that request alone, establish that the right resources will be available, ready, and connected to their dependencies in time. Azure’s quota guidance makes the distinction explicit: quota is a subscription’s permission to deploy, capacity is the compute actually available in a region or zone, and a deployment with enough quota can still fail for lack of capacity.6 That leaves two questions to settle before the autoscaler needs an answer — will we be allowed, and will the supply be there — with options such as qualifying another size or region, or securing an eligible capacity reservation where the workload requires it.
For our service, autoscaling can help use the sixteen additional workers once they are qualified and available, but the launch needs a plan for the six weeks before then, including the possibility that readiness slips. I would be uncomfortable approving the launch on the strength of an autoscaling policy if nobody could explain that interval. Chapter 6 follows the control loop itself, keeping desired, allocated, and usable capacity in view.
“Degrade gracefully” deserves the same examination. I want to know which operation can wait and whether the implementation preserves correctness while making it wait. A bank might defer a report and still insist that a transaction post correctly. You need the people who know those obligations in the room before you assume there’s an acceptable way to run with less capacity.
If the business owner and the operators can’t agree on a reduced service before the incident, size the reserve for the service the business still owes.
The burden of proof is on ownership
My default is that most organizations should buy infrastructure services rather than hardware. There are exceptions, and I want to understand them, but purchasing private infrastructure should follow an informed decision about the operating responsibility we are taking on. Being able to afford the equipment is a fairly small part of that decision.
David Heinemeier Hansson has argued the other side in public, in detail, and he has earned a careful hearing. He created Ruby on Rails, which began at 37signals in 2003 as the framework for Basecamp and has been sustained since by a broad community.7 I respect that work, and I take his argument for owning infrastructure seriously. I have followed it since I interviewed him about Rails in Chicago years ago, an interview that ended halfway through with the two of us sprinting away after a parks official called the police about my unpermitted filming.8 In the years since, I have never seen him argue from fiction; he argues from conviction, backed by evidence, and he does not back down. He has also been unusually open about the decision: he published 37signals’ $3.2 million cloud budget for 2022 and the $600,000 server order that carried the exit, and he released Kamal, the deployment tool he wrote for the move, as open source.9
Read the details before disagreeing with him. He describes 37signals as having “a business model that’s incredibly compatible with owning hardware and writing it off over many years,” “growth trajectories that are mostly predictable,” and expert staff to run its own machines.10 His FAQ adds that the same team operates the applications after the move, that the servers sit in professional data centers where a service provider racks them, and that each of the two sites can carry the full load.11 This isn’t an account of a few developers casually deciding to build a datacenter, and on those conditions the decision can be right for 37signals. My disagreement is with the broader recommendation: that most SaaS businesses of 37signals’ size and above should own their infrastructure rather than rent it.12 What I want to challenge is the ease with which another organization can adopt that conclusion without the conditions that support it.
Predictability is the condition I would test first, and his own example shows why. When 37signals launched HEY, 300,000 people signed up in three weeks against a forecast of 30,000 in six months, and he credits the cloud with carrying it.13 He doesn’t ignore spikes. He recommends buying powerful machines “a fair step ahead of your growth curve,” cites “buy the baseline, rent the spike” for businesses that regularly see large swings, and expects an unplanned expansion of owned hardware to take “a week or so.”14 That is coherent for a business whose surprises are rare and whose servers are commodity machines. The question for another organization is how often it produces a HEY launch, and what it would have to buy in a hurry. The GPU workload from the elasticity section is the hard case: expensive to overprovision, unlikely to be quick to buy when the same SKU is scarce to rent, and, as that section priced it, expensive to rent as a spike.
Some spikes are perfectly predictable and still expensive to own. One example from my own experience involved a major system that cost tens of millions of dollars a year to run on public cloud. Once a year it had to run a business-continuity test that doubled its size, to demonstrate that it could switch over immediately if it ever needed to, and the team had worked out the timing with the provider so that it could get that capacity for two or three weeks. Then the team was told it was moving to private cloud, and it asked the obvious question: in private cloud, for two weeks a year, can we have double capacity? The answer was no. Private capacity is not elastic capacity that someone else pays for; all of it is yours, whether it is used or not. If the test is a requirement, the private estimate has to carry twice the system’s capacity all year so that it is there for those two weeks. That is the kind of cost that surfaces late in an ownership comparison. “Buy the baseline, rent the spike” is sound advice when there is still somewhere to rent the spike.
Consider the experienced team. It is a valuable asset, but retaining the people you have today and sustaining that capability are related problems with different time horizons. People leave, take time off, and encounter failures outside their previous experience. Meanwhile, the platform may be asked to absorb another business, support unfamiliar database engines, satisfy different regional requirements, or accommodate an AI program whose demands are still changing. The workload that made the original purchase attractive may not describe what the platform is expected to support two planning cycles later.
Colocation and managed services can supply parts of the operating capability, so I am not suggesting that every organization must reproduce every service in a hyperscaler’s catalog. Define the platform you actually need, then follow the responsibilities across its boundaries. When an incident crosses from the application into storage, networking, or the facility, who can diagnose it, who can act, and where does one supplier’s obligation end? Those interfaces are part of what you are buying or building.
The comparison has to last longer than the migration announcement. Who will replace the hardware, test the restores, handle security incidents, and train the next specialist? Chapter 13 follows the staffing and the overlap when old and new equipment have to run at the same time. Put that work on the schedule before taking the price of the equipment as the cost of running it.
Public cloud doesn’t relieve us of application design, the operating responsibilities our chosen services retain, or demonstrating that recovery works. A provider is not an automatic business-recovery policy. My preference is for buying specialized capability where that arrangement is more credible than maintaining it ourselves, and asking for evidence before bringing those responsibilities inside.
A large, steady workload already committed around the clock is where I’d look for an ownership case. It has given up much of the flexibility of renting. Even there, the organization has to show it can sustain the people and arrangements that make the equipment useful. Having enough money to buy the machines is a much easier test.
Make the promise understandable
The person approving a launch should be able to explain what the customer will receive and what has to remain true for us to deliver it. If that explanation requires reconstructing a month of technical discussions, we have more work to do. I would give them a short account of the useful work, quality, deadline, operating condition, and usable supply, with named owners and the underlying evidence available to whoever needs to challenge it.
For our web service, the account might run like this. At the tested request mix, the service carries the expected 10,000-request peak with 2,000 to spare after losing one of its four sixteen-worker groups. The full rollout, at 14,000, would leave it 2,000 short in that condition. A staged rollout reaches 12,000 and uses all of the margin, so it also needs eight batch workers borrowed for thirty days, if the batch owner accepts the delay and the workers pass qualification. Sixteen new workers would carry the full rollout once funded, but they are estimated to be six weeks from qualified readiness, and the borrowed workers are due back before then.
The launch now needs a few decisions the operators can’t make for everyone. Who takes the delay in batch? Which customers enter first? What will we do after the loan expires if the new group takes longer than expected? Put those decisions in front of the people who can make them while there’s still time to change the launch.
Notes and sources
Microsoft Learn, “What are Azure Availability Zones?”, checked October 3, 2026, and “List of Azure regions”, checked October 4, 2026. The region list shows three zones for every zone-enabled region except East US 2, which has four. It distinguishes the zones in a region, the zones a service uses, and the number of instances or replicas. The book’s failure groups are synthetic.↩︎
Arun Kejariwal and John Allspaw, The Art of Capacity Planning: Scaling Web Resources in the Cloud, 2nd ed. (O’Reilly, 2017), chapter 2, “Setting Goals for Capacity”, checked October 3, 2026. Places the requirements for performance, availability, and reliability before capacity planning and calls the planning “not a one-time process, but a continuous one.” The objection to treating requirements as a gate is the author’s, not the book’s.↩︎
Peter Mell and Timothy Grance, The NIST Definition of Cloud Computing, NIST SP 800-145, September 2011. Defines rapid elasticity as provisioning and releasing capabilities “commensurate with demand”; source of the quoted phrase. A characteristic, not a tariff or a supply guarantee; the economic comparison is the author’s.↩︎
Microsoft Learn, “On-demand capacity reservation in Azure”, checked October 3, 2026. A reservation is priced at its VM size’s rate and billed whether or not it is used; reserved-instance and savings-plan discounts can apply to it. Creation fails without available capacity, and ND-series and NCads H100 v5-series sizes are listed as unsupported. The 100-GPU provider conversation in the preceding paragraph is the author’s recollection, paraphrased, with the provider unnamed.↩︎
Amazon Web Services, “Reserve GPU instances for ML workloads — Amazon EC2 Capacity Blocks for ML” and the EC2 user guide’s Capacity Blocks for ML pages, checked October 3, 2026. A block holds up to 64 instances for one day to 182 days, starting up to eight weeks out; its price depends on supply and demand at purchase, is charged up front, and gets no Savings Plans or Reserved Instance discount; cancellations aren’t allowed. Vendor documentation, not an independent assessment of availability.↩︎
Microsoft Learn, “Check vCPU quotas”, checked October 3, 2026. Defines quota as a subscription’s permission to deploy and capacity as the compute available in a region or zone, says a deployment with sufficient quota can still fail for lack of capacity, and suggests a different size, zone, or region, or an on-demand capacity reservation.↩︎
Rails Foundation, “37signals”, accessed October 3, 2026. States that Rails was started in 2003 to build Basecamp, identifies DHH as its creator, and lists Kamal among 37signals’ open-source projects. The assessment of the contribution is the author’s.↩︎
Tim O’Brien, “Leaving the Cloud Isn’t for Everyone: When DHH’s Math Makes Sense — and When It Doesn’t”, Medium, October 31, 2025. The interview recollection and the characterization of his arguments are the author’s own.↩︎
David Heinemeier Hansson, “The Big Cloud Exit FAQ”, December 19, 2023. Source of the budget and server-order figures, Kamal’s origin, the unchanged team, the data-center arrangements, the two full-load sites, and his advice on spikes and expansion. His reported figures and arrangements, not audited ones; the transferability judgment is the author’s.↩︎
David Heinemeier Hansson, “Why we’re leaving the cloud”, October 19, 2022. Source of the quoted conditions, the HEY launch figures, and his exceptions for simple, low-traffic applications and highly irregular load. His account, not an independent audit of the economics.↩︎
David Heinemeier Hansson, “The Big Cloud Exit FAQ”, December 19, 2023. Source of the budget and server-order figures, Kamal’s origin, the unchanged team, the data-center arrangements, the two full-load sites, and his advice on spikes and expansion. His reported figures and arrangements, not audited ones; the transferability judgment is the author’s.↩︎
David Heinemeier Hansson, “Five values guiding our cloud exit”, February 22, 2023. States the broader recommendation: “Most SaaS business of our size and above should be owning their infrastructure rather than renting it.” The same post says the cloud “has its place” and credits it with the HEY launch.↩︎
David Heinemeier Hansson, “Why we’re leaving the cloud”, October 19, 2022. Source of the quoted conditions, the HEY launch figures, and his exceptions for simple, low-traffic applications and highly irregular load. His account, not an independent audit of the economics.↩︎
David Heinemeier Hansson, “The Big Cloud Exit FAQ”, December 19, 2023. Source of the budget and server-order figures, Kamal’s origin, the unchanged team, the data-center arrangements, the two full-load sites, and his advice on spikes and expansion. His reported figures and arrangements, not audited ones; the transferability judgment is the author’s.↩︎