How do you calculate how many instances you need?
IntermediateConceptCapacity, Load Testing & Chaos Engineering
Answer
peak forecast = 4,000 RPS in 6 months
per-pod capacity at SLO = 250 RPS (from load test, at p99 < 300 ms)
target utilization = 70% (headroom for spikes)
pods needed = 4000 / (250 x 0.7) ≈ 23
survive 1 of 3 AZs down = 23 x 3/2 ≈ 35 pods
Measure per-pod capacity with a load test, not CPU guesses, and redo the test when the code changes significantly.
More on Capacity, Load Testing & Chaos Engineering
What is capacity planning in SRE?BeginnerWhat is N+1 and N+2 redundancy for capacity?BeginnerWhat is the difference between load, stress, spike, soak and breakpoint testing?BeginnerWhat is k6 and why do SRE teams use it?BeginnerWrite a minimal k6 test with SLO thresholds.IntermediateWhat is the difference between open and closed workload models in load testing?Advanced