A fast, concurrent HTTP load tester in a single Go binary — zero dependencies.
volley fires a burst of concurrent HTTP requests at an endpoint and reports throughput and latency
percentiles. It uses a worker-pool of goroutines, reuses connections, and stops cleanly on Ctrl-C.
$ volley -n 30 -c 6 https://example.com
Sending 30 requests to https://example.com (concurrency 6)...
Requests : 30 (30 ok, 0 failed, 0 errored)
Duration : 81ms
Throughput : 371.5 req/s
Latency :
min 7.972ms mean 15.453ms max 44.299ms
p50 8.739ms p90 43.407ms p95 44.248ms p99 44.299ms
Status codes:
200 : 30
go install github.com/lasitosPT/volley/cmd/volley@latestOr build from source:
git clone https://github.com/lasitosPT/volley && cd volley
go build -o volley ./cmd/volleyvolley -n 1000 -c 50 https://example.com # 1000 requests, 50 workers
volley -d 30s -c 20 https://example.com # run for 30 seconds
volley -X POST -H 'Content-Type: application/json' -b '{"ping":true}' https://api.example.com| Flag | Description | Default |
|---|---|---|
-n |
Total number of requests (0 = use -d) |
100 |
-d |
Run for a duration instead of a fixed count | — |
-c |
Number of concurrent workers | 10 |
-t |
Per-request timeout | 10s |
-X |
HTTP method | GET |
-H |
Request header 'Name: Value' (repeatable) |
— |
-b |
Request body | — |
--version |
Print version and exit | — |
- Worker pool —
-cgoroutines pull work until the request count is exhausted (or the duration elapses), so concurrency stays constant without spawning a goroutine per request. - Connection reuse — a shared
http.Clientwith a tuned transport keeps keep-alive connections warm under load. - Latency percentiles — results are collected and reduced to min / mean / max and p50–p99 (nearest-rank).
- Graceful cancellation —
contextcancellation wired toSIGINTstops in-flight work and still prints a summary.
volley is also importable:
import "github.com/lasitosPT/volley"
summary, err := volley.Run(ctx, volley.Options{
URL: "https://example.com",
Requests: 1000,
Concurrency: 50,
Timeout: 10 * time.Second,
})
fmt.Print(volley.FormatSummary(summary))MIT © Pedro Lascasas Pinto