Video in progress
How do you plan system capacity for a big once-a-year sales day (for example, 11.11)?
I turn the business forecast into RPS for the critical paths, measure each component's real limit with load tests, and add capacity with headroom. A list of things that don't autoscale, a code freeze, and degradation flags tested in advance are part of the plan too.
📖 Answer
"We'll add more servers" is not a plan. Most incidents don't come from too few servers, but from a bottleneck someone forgot: the DB connection limit, the payment provider's quota, a single Redis node, the number of ports on a NAT gateway.
-
Turn the forecast into a technical number. The business says "3 times more orders than last year". From last year's curve I take the peak minute, not the average: the first 5 minutes after a promo starts are often 10 times the daily average. Then by user journey: for each order, 40 catalog requests, 5 cart requests, 1 checkout. The result is the expected RPS for each service and dependency.
-
Measure the real limit. Apply load step by step in a prod-like environment (or in prod, at night, with synthetic traffic) and find which component raises latency first. A "capacity card" for each component: max RPS, the limiting resource, how it scales.
-
Headroom. A factor of 1.5-2 on the forecast, since forecasts often come out low. I don't rely fully on autoscaling: it takes minutes, and on that day others in the cloud ask for capacity too. I reserve capacity in advance and bring pods up ahead of time.
-
Things that don't scale by themselves. The DB primary, external provider quotas (agreed in advance), the limit in the CDN contract, licenses. Each one has its own named owner.
-
A degradation plan. Flags prepared ahead of time: turn off recommendations, replace heavy ranking in search with a simple one, stop reports. How much resource each one frees has been measured beforehand.
-
Operational readiness. A code and configuration freeze 1-2 weeks before; an on-call schedule, business metrics (orders per minute) on the dashboard next to the technical ones, and a full-scale rehearsal beforehand.
After the event, a retrospective: the gap between the real peak and the forecast, and which limit we came closest to. Next year's plan starts from those numbers.
Sign up to mark studied questions and save your progress.