Interview Prep/SRE & Reliability/Capacity & Load Testing

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 →

  1. Per PR: a short k6 smoke test (1 to 2 minutes) with strict thresholds against an ephemeral environment.
  2. Per release candidate: a 10-minute load test at expected peak in staging.
  3. Nightly or weekly: soak and stress tests.
  4. 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.

All SRE & Reliability questions Roadmap: SRE & incident response

More on Capacity & Load Testing