Purpose
Stress tests help you:- Identify system breaking points and maximum capacity
- Observe how the system fails under extreme load
- Test system recovery after failure
- Find memory leaks and resource exhaustion issues
- Validate that the system degrades gracefully
Configuration Pattern
Stress tests ramp up beyond normal capacity:Using the Ramping VUs Executor
Theramping-vus executor is ideal for stress testing:
Ramp Up
Gradually increase to breaking point
Peak Stress
Maintain extreme load
Recovery
Monitor system recovery
Stress Test Stages
1
Baseline Load
Start below normal operating capacity to establish a baseline.
2
Normal Capacity
Reach expected peak load to verify normal operation.
3
Stress Zone
Push beyond normal capacity to find breaking points.
4
Recovery Period
Ramp down and observe how the system recovers.
Advanced Stress Testing
Multi-Stage Stress Pattern
Test multiple stress levels:Stress test thresholds are typically more lenient than load tests since you expect the system to struggle under extreme conditions.
What to Monitor
System Metrics
- Response times: When do they start degrading?
- Error rates: At what load do errors appear?
- Throughput: Where does it plateau?
- Resource usage: CPU, memory, disk, network
- Queue depths: Database connections, message queues
Breaking Point Indicators
Best Practices
Gradual Stress Increase
Incremental Steps
Increase load in 25-50% increments to identify exact breaking points
Hold Periods
Maintain each stress level for 3-5 minutes to observe steady-state behavior
Recovery Testing
The recovery period is critical:- How quickly do response times return to normal?
- Are there lingering errors or stuck processes?
- Do queues drain properly?
- Does memory get released?
Realistic Stress Scenarios
When to Use
- Capacity planning: Determine absolute maximum capacity
- Failure mode analysis: Understand how the system fails
- Auto-scaling validation: Test that scaling mechanisms work
- Resource limits: Identify resource bottlenecks
- Pre-production: Before major releases or traffic events
Common Findings
Expected Behaviors
- Graceful degradation: System slows but doesn’t crash
- Error handling: Meaningful error messages
- Resource limits: Clear capacity boundaries
- Recovery: System returns to normal after stress
Red Flags
Analysis Tips
Identify your breaking point by analyzing:- Response time curve: Where does p(95) exceed acceptable limits?
- Error rate: When do errors start appearing?
- Throughput plateau: Where does requests/sec stop increasing?
- Resource exhaustion: When do CPU/memory/connections max out?