Introduction
Siege is a command-line HTTP load testing tool designed to let developers and administrators measure web server performance under stress. It supports HTTP/1.1 and can test single URLs or lists of endpoints with configurable concurrency levels, making it a practical choice for quick capacity checks.
What Siege Does
- Simulates concurrent users with configurable thread counts
- Supports HTTP and HTTPS with keep-alive connections
- Reads URL lists from files for multi-endpoint testing
- Reports transactions per second, response time, throughput, and availability
- Supports basic and digest authentication for protected endpoints
Architecture Overview
Siege spawns a configurable number of threads, each simulating a user that sends HTTP requests in a loop. It uses libcurl under the hood for HTTP communication, supporting cookies, redirects, and TLS. Results are aggregated across all threads and presented as summary statistics after the test duration or request count is reached.
Self-Hosting & Configuration
- Install via system package managers or compile from source with autotools
- Configure defaults in
~/.siege/siege.conffor concurrency, timeout, and logging - Set user-agent, connection timeout, and protocol version in the config file
- Use
-f urls.txtto load a list of URLs for randomized testing - Enable CSV logging with
--logfor post-analysis in spreadsheet tools
Key Features
- Adjustable concurrency from 1 to thousands of simultaneous users
- Internet mode with random delays between requests for realistic simulation
- URL list support with GET and POST request methods
- Transaction logging for historical performance tracking
- Header and cookie support for authenticated endpoints
Comparison with Similar Tools
- wrk — Higher performance with Lua scripting, but no built-in URL list support
- Apache Bench (ab) — Simpler tool, single URL only, no keep-alive in older versions
- Vegeta — Go-based constant-rate attacker with structured output
- k6 — JavaScript-scripted load testing with cloud dashboards and checks
FAQ
Q: How many concurrent users can Siege handle?
A: Siege can simulate thousands of concurrent users depending on system resources. Use the -c flag to set the count.
Q: Can I test POST requests with Siege?
A: Yes. Include POST data in the URL file using the format https://example.com/api POST key=value or use the --content-type flag.
Q: Does Siege support HTTP/2? A: Siege primarily targets HTTP/1.1. For HTTP/2 testing, consider tools like h2load or k6.
Q: How do I interpret the availability metric? A: Availability is the percentage of successful transactions (non-error HTTP responses) out of total attempted transactions.