Load Profile Configuration
Learn how to configure load profiles to simulate different traffic patterns and test your APIs under various load conditions.
What is a Load Profile?
A load profile defines how virtual users and requests are distributed over time during a performance test. It determines the pattern of load application, which is crucial for realistic performance testing.
Common Load Patterns
Ramp-Up (Gradual Increase)
Gradually increases the number of virtual users over time until reaching the target load. This simulates a gradual increase in traffic.
Use Case: Normal traffic growth, realistic user behavior
Constant Load
Maintains a constant number of virtual users throughout the test duration. This tests steady-state performance.
Use Case: Baseline testing, steady-state validation
Spike Testing
Suddenly increases load to a high level, then returns to normal. This tests how your API handles sudden traffic spikes.
Use Case: Flash sales, viral content, breaking news
Soak Testing
Maintains load for an extended period (hours). This identifies memory leaks and long-term stability issues.
Use Case: Memory leak detection, long-term stability
Step Load
Increases load in steps, holding each level for a period before increasing again. This helps identify performance degradation points.
Use Case: Finding breaking points, capacity planning
Configuring Ramp-Up
Ramp-up is the period during which virtual users gradually increase from zero to the target number. Proper ramp-up configuration is important for realistic testing.
Ramp-Up Considerations
- Gradual Ramp-Up: Allows system to warm up gradually (recommended for most tests)
- Quick Ramp-Up: Faster ramp-up for stress testing
- No Ramp-Up: Immediate full load (use with caution, can overwhelm system)
- Custom Ramp-Up: Define custom ramp-up curves for specific scenarios
Request Distribution
Configure how requests are distributed among different endpoints and virtual users.
Distribution Options
- Equal Distribution: Each endpoint receives equal load
- Weighted Distribution: Assign weights to endpoints based on expected traffic
- Sequential: Execute requests in a specific order
- Random: Randomly select endpoints for each virtual user
Think Time and Pacing
Think time simulates the delay between requests that real users would have, making tests more realistic.
Think Time Configuration
- Fixed Think Time: Constant delay between requests (e.g., 2 seconds)
- Random Think Time: Random delay within a range (e.g., 1-5 seconds)
- No Think Time: Maximum throughput testing (requests as fast as possible)
- Pacing: Control the rate at which requests are made
Best Practices
- Match Real Traffic: Configure load profiles to match real-world traffic patterns
- Start with Ramp-Up: Use gradual ramp-up for most tests to avoid overwhelming the system
- Test Different Patterns: Test various load patterns to understand system behavior
- Consider Business Hours: Model traffic patterns based on actual usage patterns
- Use Think Time: Add realistic think time for more accurate results
- Document Patterns: Document which load patterns you've tested and why
- Iterate: Adjust load profiles based on test results and requirements
Next Steps
- Performance Test Configuration - Configure other test settings
- Running Performance Tests - Execute tests with your load profile
- Performance Test Results and Analysis - Analyze results