1. Capacity planning and autoscaling
The interviewer points at the photo-sharing upload service and says a launch will double traffic in 3 months. How do you make sure you have enough capacity? Capacity planning is deciding, before the traffic arrives, how many instances (running copies of the service) it needs. Autoscaling is letting the platform add and remove instances as load moves. This tutorial plans request-serving capacity for a running service. Storage growth and batch jobs are different problems with different signals.
The principle is to forecast the busiest minute, measure what one instance carries before users notice, divide, and add spares so losing an instance or a zone still leaves enough. Autoscaling covers the swings it can keep up with, and a database or vendor quota sets the real ceiling. Reach for this when a launch will move traffic beyond the trend, or a service runs near its limits at the daily peak. Skip it for a small internal service or a flat, light load, where two fixed instances behind a load balancer suffice.
This is a standard site reliability engineering (SRE) question and a follow-up in system design rounds, usually as "what if a zone fails?" Aim to give the whole answer in about 2 minutes. Mid-level candidates forecast a peak, size with a utilization target, and add a spare instance. Senior candidates also size for zone loss, do the reaction-lag arithmetic, and name the limits that autoscaling does not touch. The chapters follow the order the follow-up questions usually arrive.
Discussion
Upgrade to premium to read and join the discussion.