Siege is an HTTP and HTTPS load testing and benchmarking utility designed to stress test web servers under heavy concurrent demand.
Basic Usage
# Benchmark with 10 concurrent connections for 1 minute
siege -c 10 -t 1m https://example.com/
Common Command-Line Options
| Option | Flag | Description |
|---|---|---|
-c N |
--concurrent=N |
Number of simultaneous simulated users |
-t MINm |
--time=MINm |
Total benchmark duration (e.g. 30s, 5m, 1h) |
-r N |
--reps=N |
Number of requests per user before terminating |
-b |
--benchmark |
Benchmark mode (zero delay between requests) |
-i |
--internet |
Hit URLs from file in randomized order |
-f <file> |
--file=<file> |
Read list of target URLs from a file |
-H <hdr> |
--header=<hdr> |
Add custom HTTP header to requests |
Multi-URL File Testing
Create urls.txt:
https://example.com/
https://example.com/api/items
https://example.com/about
Run randomized internet simulation across URLs:
siege -i -c 25 -t 2m -f urls.txt
Output Metrics Explanation
- Availability: Percentage of requests successfully handled (should be 100%).
- Elapsed time: Total duration of benchmark run.
- Transaction rate: Requests handled per second (RPS / throughput).
- Throughput: Megabytes of payload transferred per second.
- Concurrency: Average number of concurrent connections active.