rakyll / hey

HTTP load generator · ApacheBench replacement

A tiny program
that sends some load
to a web application.

That sentence is the project’s entire self-description, and it is the whole pitch. hey runs a provided number of requests at a provided concurrency level and prints stats. It also supports HTTP/2 endpoints.

1000 requests, 100 concurrent workers

$ hey -n 1000 -c 100 https://example.com

Latency distribution

illustrative shape — not a measurement
fastresponse time →slow
p50 — the number people quote p99 — the number people feel max — the number that pages you
p50—
p90—
p99—
max—

The cells are empty on purpose. These are your numbers, not ours — no benchmark figure is reproduced here, because the tool exists to produce yours.

The flags that change the experiment

defaults shown as the project documents them
Flag
What it sets
Default
-n
Number of requests to run
200
-c
Workers running concurrently
50 — total requests cannot be smaller than this
-q
Rate limit, queries per second per worker
no rate limit
-z
Duration to send requests for
when set, -n is ignored — e.g. -z 10s, -z 3m
-t
Timeout for each request, in seconds
20 — use 0 for infinite
-o
Output type
summary — csv is the only alternative

The interference controls matter as much as the load ones: -disable-keepalive prevents TCP connection reuse between requests, -disable-compression and -disable-redirects remove two more variables, and -cpus bounds how much of your own machine is in the measurement. A load generator that cannot be held still is measuring itself.