You need to add load testing to CI for every release without making the pipeline slow.
IntermediateScenarioCapacity & Load Testing
Answer
Situation read → Full load tests take too long for every commit; a layered approach balances speed and safety.
What I'd do →
- Per PR: a short k6 smoke test (1 to 2 minutes) with strict thresholds against an ephemeral environment.
- Per release candidate: a 10-minute load test at expected peak in staging.
- Nightly or weekly: soak and stress tests.
- Fail the pipeline on k6 exit code 99 (threshold failed); keep results as artifacts and trend them in Grafana.
Why → Different test types catch different problems at different costs.
Interview tip → Show the layered plan and the exit-code gate.
More on Capacity & Load Testing
Marketing announces a campaign that will bring 5x normal traffic in three weeks. Prepare.IntermediateA load test shows p99 latency jumps from 120 ms to 2 s at 800 RPS, while CPU is only 45%.IntermediateYou're asked how many pods are needed for Black Friday. Walk through the calculation.IntermediateYour HPA scales out during spikes, but users still see errors for the first 2 minutes.AdvancedA soak test shows memory climbing steadily over 8 hours. What's next?BeginnerThe load test passed in staging, but production fell over at half that load.Advanced