How would you load test a service before launch, and what do you report?
BeginnerScenarioScaling and performance
Answer
Situation read → A load test answers: at what throughput do we break, and what breaks first?
What I'd do →
- Define realistic scenarios from production traffic (the mix of endpoints, think time, payload sizes), not a single endpoint hammered.
- Run against a prod-like environment with prod-like data size, using k6:
k6 run --vus 200 --duration 15m checkout.js
- Ramp in stages and watch p95/p99, error rate, and saturation of each tier (pods, DB, cache, queue).
- Find the knee: the point where latency rises sharply. That is real capacity, not the point where errors start.
- Report: max sustainable RPS at the SLO, first bottleneck, cost per tier, and recommended pre-scale settings.
Why → Teams that test one endpoint at full speed get numbers that never match real traffic.
Interview tip → "Find the knee, not the crash" sounds senior and is correct.
More on Scaling and performance
Traffic is expected to 10x for a sale next week. How do you prepare the platform?IntermediateThe HPA is configured but pods don't scale even though the app is slow. Why?BeginnerPods are Pending during a traffic spike because the cluster is out of capacity. What do you do now and long term?IntermediateThe database CPU is at 95% and the API is timing out. What's your approach?Intermediate"Too many connections" errors from Postgres after scaling the app out. How do you fix it?IntermediateLatency is fine on average but p99 is terrible. Where do you look?Advanced