📈 Load Patterns · Days 7–12
Day 9: Spike Test
Objective
Jump from idle to high load instantly, then drop. Watch errors and recovery.
Scenario
Configure your tool to instantly jump to 100 users, hold for 2 minutes, then drop to zero. Observe error rate during the spike and how quickly the system recovers.
Metrics to Watch
When It Clicks
Systems fail differently on sudden load than on gradual load.
Solution
Use three Thread Groups in sequence: (1) 5 users for 2 min as baseline, (2) 100 users, ramp-up 0s, duration 2 min for the spike, (3) 0 users (or 1) for 2 min cooldown. In k6 use stages: `{ duration: '2m', target: 5 }, { duration: '0s', target: 100 }, { duration: '2m', target: 100 }, { duration: '0s', target: 0 }, { duration: '2m', target: 0 }`. Watch for 503s or timeouts during the instant jump - these reveal the absence of request queuing or circuit breaking.
Reflection
How did the system behave during the spike vs the cooldown? Was recovery graceful?
Deliverable
A spike test script with before/during/after metrics.
⚠️ Never run load tests against infrastructure you do not own or have explicit written permission to test. Always use a dedicated test environment. Unauthorized load injection can cause outages, trigger legal liability, and violate terms of service.