Another HTTP stress test tool — simple, concurrent load testing via curl and tokio.
Important
Learning project — not for real benchmarking. This exists to learn Rust, tokio, and libcurl. It fires concurrent GETs and prints GOT = ..., with no timing, histograms, or proper error handling (unwrap() on failure). For real usage, use a mature tool instead:
- Fire N concurrent
GETrequests against a single URL - Async concurrency with
tokiomulti-thread runtime +libcurl - Channel-based result collection (
tokio::sync::mpsc)
- Rust 1.70+ (
rustuprecommended) libcurldevelopment headers (usually pre-installed on macOS/Linux)
# From source
git clone https://github.com/StanleyWorks/http-stress
cd http-test
cargo build --release
# Binary at ./target/release/http-testOr run without installing:
cargo run -- <url> --requests 100Usage: http-test [OPTIONS] <url>
Arguments:
<url> The URL to benchmark
Options:
-r, --requests <number> Number of concurrent requests [default: 1]
-h, --help Print help
-V, --version Print version
# Single request
http-test https://example.com
# 50 concurrent requests
http-test https://example.com --requests 50
http-test https://example.com -r 50
# Local service
http-test http://localhost:3000 -r 100Output (one line per completed request, order is non-deterministic):
GOT = Request sent.
GOT = Request sent.
...
Exit code is 0 on completion. Failed curl operations currently panic (unwrap) — this will become proper error reporting.
Note
If you need latency percentiles, throughput, or pass/fail criteria, reach for oha (oha -n 1000 -c 50 https://example.com) or similar — this tool intentionally does not provide them.
- Parses
<url>and--requestswithclap. - Builds a
tokiomulti-thread runtime. - Spawns a printer task that drains an
mpscchannel and printsGOT = .... - Spawns N tasks, each performing a blocking
curlGETviaEasy2+ customCollectorhandler. - Drops the original sender so the channel closes once all request tasks finish, then awaits everything.
See src/main.rs.
- Timing / latency histograms and summary stats
- Configurable HTTP method, headers, and body
- Proper error handling instead of
unwrap() - Keep-alive / connection reuse options
- Rate limiting and duration-based runs
Roadmap is aspirational for learning — if you need these today, use oha or k6.