siege — HTTP Load Testing from the Command Line

Practical guide to Siege — simulate concurrent users, benchmark web servers, feed URL lists, add custom headers, and get detailed performance reports.

Siege simulates any number of concurrent users hammering your web server – the fastest way to expose bottlenecks before your next deployment. Feed it a single URL or an entire URL list and it reports throughput, response times, and failure rates in a concise summary. Fine-tune the load with flags for delay, concurrency, and duration – or reach for a .siegerc file when you need repeatable test configurations.

Basic Usage

siege <url> — Start a load test with default settings (25 users, no time limit).

siege http://localhost:8080/

siege -c <users> -t <time> <url> — Test with specific concurrent users and duration.

siege -c 50 -t 30S http://localhost:8080/

siege -c <users> -r <reps> <url> — Run with fixed number of repetitions per user.

siege -c 25 -r 100 http://localhost:8080/

siege -b <url> — Benchmark mode: no delay between requests.

siege -b -c 50 -t 30S http://localhost:8080/

URL Files & Multiple URLs

siege -f <file> — Read URLs from a file (one per line).

siege -f urls.txt -c 25 -t 60S

siege '<url1>' '<url2>' '<url3>' — Test multiple URLs from command line.

siege 'http://localhost/' 'http://localhost/api' 'http://localhost/about'

siege -i -f <file> — Internet mode: randomly select URLs from file.

siege -i -f urls.txt -c 50 -t 120S

HTTP Methods & Data

siege -c <users> '<url> POST <data>' — Send POST requests with data.

siege -c 10 'http://localhost/api POST {"name":"test"}'

siege -H 'Content-Type: application/json' '<url> POST <data>' — POST with JSON content type header.

siege -H 'Content-Type: application/json' -c 10 'http://localhost/api POST {"key":"value"}'

siege -H '<header>' <url> — Add a custom HTTP header.

siege -H 'Authorization: Bearer token123' -c 25 http://localhost/api

siege -A '<user-agent>' <url> — Set a custom User-Agent string.

siege -A 'Mozilla/5.0 LoadTest' -c 25 http://localhost/

Timing & Delays

siege -d <seconds> <url> — Set random delay between 0 and N seconds per request.

siege -d 5 -c 50 http://localhost:8080/

siege -b -t <time> <url> — Benchmark: zero delay, maximum throughput test.

siege -b -t 60S -c 100 http://localhost:8080/

siege -t 1M <url> — Run for 1 minute (S=seconds, M=minutes, H=hours).

siege -t 5M -c 50 http://localhost:8080/

Logging & Output

siege -v <url> — Verbose: show each transaction.

siege -v -c 5 -r 10 http://localhost:8080/

siege --log=<file> <url> — Log results to a specific file.

siege --log=siege.log -c 50 -t 60S http://localhost:8080/

siege -m '<message>' <url> — Add a label/message to the log entry.

siege -m 'v2.0 release test' -c 50 -t 60S http://localhost:8080/

siege --json-output <url> — Output results in JSON format.

siege --json-output -b -c 50 -t 30S http://localhost:8080/

Configuration

siege.config — Generate a default .siegerc configuration file.

siege.config

siege -R <file> <url> — Use a specific configuration file.

siege -R /path/to/.siegerc -c 50 http://localhost:8080/

siege -C — Show the current configuration.

siege -C

Conclusion

Siege is the most direct path to knowing whether your server handles real load. Start with a quick benchmark run, refine with a URL list, and label every test series with -m before pushing to production – find the bottlenecks before your users do.

Further Reading

  • ab – Apache's built-in tool for quick HTTP benchmarks
  • wrk – modern HTTP benchmarking with Lua scripting
  • h2load – load testing for HTTP/2 and HTTP/3 servers