You need to test the system's behaviour when traffic doubles in 30 seconds.
BeginnerScenarioCapacity & Load Testing
Answer
Situation read → A spike test with an arrival-rate executor.
What I'd do →
- Write a k6 scenario with
ramping-arrival-rate: steady at baseline, then jump to 2x in 30s, hold, then drop.scenarios: { spike: { executor: 'ramping-arrival-rate', startRate: 100, timeUnit: '1s', preAllocatedVUs: 100, maxVUs: 500, stages: [{ target: 100, duration: '5m' }, { target: 200, duration: '30s' }, { target: 200, duration: '5m' }, { target: 100, duration: '1m' }] } } - Watch autoscaling, latency, error rate and queue depth.
- Compare results to SLO thresholds.
Why → Arrival-rate models reflect real traffic surges; VU-based tests underestimate them.
Interview tip → Use ramping-arrival-rate for spikes.
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