Learn how to use burl for load testing your applications.
Start with a moderate load and increase gradually:
# Light load - baseline
burl https://api.example.com -c 10 -d 30s
# Medium load
burl https://api.example.com -c 50 -d 30s
# Heavy load
burl https://api.example.com -c 100 -d 30s
# Stress test
burl https://api.example.com -c 500 -d 30s
Gradually increase load until you see degradation:
#!/bin/bash
for connections in 10 25 50 100 200 500; do
echo "Testing with $connections connections..."
burl https://api.example.com -c $connections -d 30s -f json -o "results_${connections}.json"
sleep 5 # Cool-down between tests
done
For longer duration tests to identify memory leaks or gradual degradation:
# 5 minute sustained load
burl https://api.example.com -c 50 -d 5m
# 1 hour endurance test
burl https://api.example.com -c 25 -d 1h --llm json -o endurance.json
Test at specific traffic levels:
# Simulate 100 users making 1 request/second each
burl https://api.example.com -c 100 -q 100 -d 5m
# Simulate peak traffic of 1000 req/s
burl https://api.example.com -c 200 -q 1000 -d 2m
Test how your application handles sudden traffic spikes:
#!/bin/bash
# Normal load
echo "Normal load (50 req/s)..."
burl https://api.example.com -c 10 -q 50 -d 30s
# Spike to 10x
echo "Spike (500 req/s)..."
burl https://api.example.com -c 100 -q 500 -d 30s
# Return to normal
echo "Recovery (50 req/s)..."
burl https://api.example.com -c 10 -q 50 -d 30s
Extended duration tests to find issues that only appear over time:
# 4 hour soak test at moderate load
burl https://api.example.com \
-c 50 \
-d 4h \
-q 200 \
--llm json \
-o soak_test.json
Test multiple endpoints to simulate realistic traffic:
#!/bin/bash
# Run tests in parallel
burl https://api.example.com/users -c 30 -d 60s -o users.json &
burl https://api.example.com/products -c 50 -d 60s -o products.json &
burl https://api.example.com/orders -c 20 -d 60s -o orders.json &
wait
echo "All tests complete"
After load testing, analyze the results:
# Extract key metrics
for f in results_*.json; do
connections=$(echo $f | grep -oP '\d+')
p99=$(jq '.latency_ms.p99' $f)
rps=$(jq '.summary.requests_per_second' $f)
errors=$(jq '.summary.failed_requests' $f)
echo "$connections connections: ${rps} req/s, P99: ${p99}ms, Errors: $errors"
done
Run a light load test to establish baseline performance metrics.
Gradually increase load to find the optimal operating point.
Continue increasing until you see errors or unacceptable latency.
Record the maximum sustainable load for capacity planning.
Verify the system recovers after the load is removed.
| Symptom | Possible Cause |
|---|---|
| P99 >> P50 (10x+) | Resource contention, GC pauses |
| Errors start appearing | Resource exhaustion, timeouts |
| Throughput plateaus | Bottleneck reached |
| Latency keeps climbing | Queue buildup, no backpressure |