bombardier: Fast HTTP Benchmarking in CI
bombardier -c <connections> -d <duration> <url> drives high-throughput HTTP load and prints latency and throughput statistics.
bombardier is a Go load tester built for raw throughput. It can run by request count or duration, optionally at a fixed rate, and prints a compact latency summary.
What it does
bombardier opens -c connections and sends requests for a duration (-d) or count (-n), reporting requests per second, latency distribution, and a status-code breakdown. --rate caps the request rate; -p controls which progress and result sections print.
Common usage
bombardier -c 100 -d 30s https://staging.example.com/
# fixed request count and a capped rate
bombardier -c 50 -n 10000 --rate 500 https://staging.example.com/
# add a header and use HTTP/2
bombardier -c 100 -d 20s -H "Authorization: Bearer $TOKEN" \
--http2 https://staging.example.com/apiOptions
| Flag | What it does |
|---|---|
| -c <num> | Number of concurrent connections |
| -d <dur> | Test duration, e.g. 30s |
| -n <num> | Total requests instead of a duration |
| --rate <r> | Cap requests per second |
| -H "K: V" | Add a header (repeatable) |
| -l | Print latency percentiles |
In CI
bombardier exits 0 even when responses are 5xx, so it is not a gate by itself. Run it, then assert on the printed throughput or wrap a service-side check; or use -p r for a parseable result. Keep duration short (10 to 30s) so the smoke load test does not dominate pipeline time.
Common errors in CI
"dial tcp ...: connect: connection refused" means the target is not listening yet. "the rate must be greater than 0" means --rate got a bad value. On a self-signed staging cert, bombardier reports a TLS verification error; add -k / --insecure to skip verification. A high count under "others" in the status breakdown means transport errors, not HTTP responses.