A big marketing launch is in three weeks. How would you load test the service to know it will cope?
What the interviewer wants to hear
- Estimate expected peak traffic and the traffic mix from data
- Test in a production-like environment with realistic data and dependencies
- Use an open arrival-rate model and ramp up in steps
- Measure against SLO-based thresholds and watch saturation
- Find the breaking point, fix bottlenecks and plan headroom
Model answer
I start by estimating peak load with marketing and past data, for example three times the normal peak, and by recording the real mix of endpoints. I write k6 scripts that follow that mix, using an arrival-rate executor so the test keeps sending requests even when the system slows down, which avoids hiding tail latency. I run them in a production-like environment with realistic data sizes and dependencies, or carefully in production at quiet times. I ramp up in steps and set thresholds from the SLOs, such as p95 under 300 milliseconds and errors under 0.1%, while watching CPU, memory, connection pools and database load. I push past the target to find the breaking point and the first bottleneck, fix it, and repeat. Finally I plan headroom, autoscaling limits and a degradation plan for launch day.
Can you answer it under time pressure?
Take a timed medium round and get scored on every answer.
More medium Site Reliability Engineer questions
- How would you design alerting for a service so that on-call engineers are not flooded with noisy alerts?
- Walk me through how you would run and write a postmortem after a major outage.
- How should a client retry failed calls to another service safely?
- A Linux server running a service suddenly becomes slow. How do you investigate?
- How do you do capacity planning for a growing service?
- A team is launching a new checkout API and asks you to help define its SLOs. How do you approach it?
- Your Prometheus servers are running out of memory because of too many time series. How do you find the cause and keep cardinality under control?
- A Deployment rollout is stuck because new pods are in CrashLoopBackOff. Walk me through how you would debug it.
- During a major incident, how do you handle communication with customers, support and leadership?