tezvyn:

Capacity planning for annual traffic spikes

AI-drafted, machine-checkedSource: interviewintermediate
WHAT IT TESTS

Elastic capacity planning.

OUTLINE

forecast peak from history, load-test to find per-unit capacity, use autoscaling with pre-warming and headroom, and protect with caching and graceful degradation.

WHAT THIS TESTS: Whether you can meet a predictable but rare demand surge without paying for peak capacity the other fifty-one weeks.

A GOOD ANSWER COVERS: Forecast the peak using historical data from previous events adjusted for year-over-year growth and marketing projections. Translate that demand into infrastructure by load testing to find each instance's safe capacity, so you know how many units the forecast requires. Lean on autoscaling so capacity follows demand most of the year, keeping baseline small. For the known event, pre-scale and pre-warm capacity in advance, because reactive autoscaling reacts in minutes while a flash sale spikes in seconds, and cold starts plus scaling lag would drop requests. Add a headroom buffer above the forecast for forecasting error. Reduce the load itself with aggressive caching, a CDN for static assets, and queueing for non-critical writes. Finally, build graceful degradation and load shedding so that if demand exceeds even the buffered plan, the core purchase path stays up while non-essential features shed.

COMMON WRONG ANSWERS: Statically provisioning for peak year-round, wasting money; trusting reactive autoscaling alone to absorb an instantaneous spike; or skipping load tests so the forecast cannot be mapped to real capacity.

LIKELY FOLLOW-UPS: How much headroom buffer is reasonable? How do you pre-warm caches and connections? What do you shed first under overload? How do you validate the plan beforehand?

ONE CONCRETE EXAMPLE: History shows the sale drives ten times normal traffic in the first minutes. You keep a modest baseline year-round, then the day before the event pre-scale to roughly the forecast plus a thirty percent buffer, pre-warm caches and database connections, and put a CDN in front of catalog pages. Autoscaling handles minor variance on top. A load-shedding rule protects checkout by degrading recommendations first if limits are hit. After the event you scale back down, so you paid for peak capacity for days, not the whole year.

Read the original → cloud.google.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.