hey: A concurrent HTTP load generator replacing ApacheBench
A Go tool for load-testing web applications, with HTTP/2 and concurrency controls, presented as a direct ApacheBench replacement.
GitHub rakyll/hey Updated 2026-09-30 Branch master Stars 20.5K Forks 1.3K
Go HTTP load testing HTTP/2 Linux/macOS/Windows amd64

🧭 Decision Guide

Try it if you

  • You need to send a fixed number of requests or sustain load for 30 seconds against an HTTP web application.
    README "Usage" supports -n and -z; "Examples" includes hey -z 30s https://google.com
  • You need to send 1,000 requests with 100 concurrent workers.
    README "Examples" uses hey -n 1000 -c 100 https://google.com
  • The target endpoint uses HTTP/2, or the request needs a POST body and custom headers.
    README "Usage" lists -h2, -d, and -H; "Examples" include POST, Bearer token, and HTTP/2 examples

Skip it if you

  • Your runtime is not the Linux, macOS, or Windows amd64 environment listed in the README.
    README "Installation" lists downloads only for Linux (amd64), macOS (amd64), and Windows (amd64)
  • You need an output format other than the summary or CSV.
    README "Usage" states that csv is the only supported alternative for -o
  • You need total requests to be lower than concurrency, such as -n 10 -c 50.
    README "Usage" explicitly says the total number of requests cannot be smaller than the concurrency level

Requirements

  • Requires a Linux (amd64), macOS (amd64), or Windows (amd64) binary environment
  • On macOS, Homebrew can be used with brew install hey
  • The target should be a web application or HTTP/2 endpoint accessible by URL

First step (verbatim from README)

hey https://google.com

Watch out

  • When using -z, n is ignored and the program stops and exits when the duration is reached.
    README "Usage" description for -z
  • Repeat -H to send multiple headers, such as Accept and Content-Type.
    README "Usage" description of -H and the custom-header example
  • -q limits QPS per worker, not the total QPS of the hey process.
    README "Usage" defines -q as queries per second per worker
  • Keep-alive is enabled by default; disabling it requires -disable-keepalive.
    README "Usage" lists -disable-keepalive and explains its effect

Alternatives

  • ApacheBench (ab):Use ApacheBench (ab) when an existing load-testing workflow explicitly requires the tool that hey is described as replacing.
    README core description and introduction

Not stated in the README

  • The README does not specify which exact response metrics are included, such as latency percentiles or error rate
  • The README does not state whether ARM, non-amd64 Linux, or other architectures have available builds
  • The README does not describe the changes from the previous four releases to v0.1.5
  • The README does not state whether the 20,477 stars and 2026-09-30 Trending appearance were driven by a specific feature or release event
  • The README does not explain how authentication data, Bearer tokens, and request bodies are handled in logs or CSV
  • The README does not define the exact cross-platform compatibility range for TLS, redirects, and proxy behavior

💡 Deep Analysis

6
Yes: hey natively supports duration mode and per-worker QPS limits, but the total rate must be interpreted using the worker count. I need to load a staging HTTP service for 30 seconds at 10 QPS per worker with 5 workers; can hey express this load model with `-q` and `-z`?
For: An SRE performing pre-release validation who needs sustained HTTP load at a controlled QPS

Yes: hey natively supports duration mode and per-worker QPS limits, but the total rate must be interpreted using the worker count.

  • -z sets the test duration; the README states that the program stops when the duration is reached and that -n is ignored in this mode.
  • -q is measured per worker. The README example -q 10 -c 5 -z 30s exactly represents 10 QPS per worker, 5 workers, for 30 seconds.
  • -c controls the number of concurrent workers, so -q is not a global rate limit.

This fits staging capacity checks and sustained-load observation. The README does not promise that the theoretical rate will be exact, nor does it provide server-side throttling, alerting, or monitoring integration; latency and scheduling can affect the achieved rate.

  • Usage: `-q Rate limit, in queries per second (QPS) per worker`
  • Usage: `-z Duration of application to send requests`, with `n is ignored`
  • Examples: `hey -q 10 -c 5 -z 30s https://google.com`
hey -q 10 -c 5 -z 30s https://google.com
Not stated in the README:The README does not specify the deviation between achieved and theoretical QPS.;The README does not specify whether the target service will throttle, return errors, or trigger protection mechanisms under sustained load.
Yes: it directly provides concurrent workers, request counts, and summary statistics, and is positioned as a lightweight ApacheBench replacement. I maintain a Go-based HTTP service and usually need to compare GET latency at 50 to 100 concurrent requests; can hey replace ApacheBench for this validation?
For: A backend developer validating a Go HTTP API who wants an ApacheBench replacement

Yes: it directly provides concurrent workers, request counts, and summary statistics, and is positioned as a lightweight ApacheBench replacement.

  • -n controls the total request count and -c controls concurrent workers; the README explicitly demonstrates -n 1000 -c 100.
  • It prints summary statistics by default, covering basic throughput and latency comparisons, and can export response metrics with -o csv.
  • The project is a standalone Go command-line program with Linux, macOS, and Windows amd64 binaries, so setup is lightweight.

It is not a complete performance platform: the README does not describe distributed execution, multi-step business flows, or server-side metric collection. It fits a single-URL HTTP benchmark, but more complex user journeys require another tool.

  • Project description: HTTP load generator, ApacheBench (ab) replacement
  • Usage: `-n`, `-c`, and `-o csv`
  • Examples: `hey -n 1000 -c 100 https://google.com`
  • Installation: Linux, macOS, and Windows amd64 binaries
hey -n 1000 -c 100 https://google.com
Not stated in the README:The README does not specify which percentile metrics are included in the summary.;The README does not specify CPU, file-descriptor, or network limits at high concurrency on the client.
Yes: hey supports POST, custom headers, and string- or file-based request bodies, which covers this single-request template. I am testing an HTTP API that requires POST, `Content-Type: application/json`, and a custom Authorization header; can I construct this request using only hey?
For: A test engineer validating an HTTP API with JSON headers and a POST request body

Yes: hey supports POST, custom headers, and string- or file-based request bodies, which covers this single-request template.

  • -m supports POST, so the method can be set explicitly instead of using the default GET.
  • -H can be repeated for multiple headers; the README demonstrates both Accept: application/json and Authorization: Bearer token.
  • -d accepts a string request body, -D reads one from a file, and -T sets the Content-Type.

This is sufficient for fixed-JSON API regression, basic throughput testing, and authorization-header checks. However, the explicitly documented authentication option is Basic authentication; the Bearer token is passed as a normal header. The README does not describe dynamic token refresh, parameterized datasets, or generating a different body for every request.

  • Usage: `-m HTTP method`, including POST
  • Usage: `-H Custom HTTP header`, `-d HTTP request body`, `-D HTTP request body from file`, and `-T Content-type`
  • Examples: `-H "Authorization: Bearer token"`
  • Usage: `-a Basic authentication, username:password`
hey \
    -m POST \
    -d "param1=value1&param2=value2" \
    https://google.com
Not stated in the README:The README does not say whether each request can use a different body or dynamic variables.;The README does not describe OAuth, signed authentication, or automatic Bearer-token refresh.
Yes: it provides standalone binaries for the relevant platforms and CSV output, which is sufficient for a basic CI test step. I want to run fixed-count API benchmarks in CI on Linux amd64 or macOS amd64 and save per-response metrics; is hey suitable for pipeline integration?
For: A test engineer running CI on Linux amd64 or macOS amd64 who needs machine-processable results

Yes: it provides standalone binaries for the relevant platforms and CSV output, which is sufficient for a basic CI test step.

  • The Installation section lists download URLs for Linux amd64 and macOS amd64 and also supports installation through Homebrew on macOS.
  • -o csv is explicitly supported and exports response metrics for later parsing or storage.
  • -n and -c make the test scale explicit in a CI command, while the default output also prints a summary.
  • The project is delivered as a standalone command-line program rather than a full performance platform.

It is better suited to producing raw benchmark data than to enforcing a complete quality gate. The README lists summary and CSV output but does not describe JUnit, HTML reports, threshold assertions, trend charts, or CI plugins; those functions must be implemented in the pipeline.

  • Installation: Linux amd64 and macOS amd64 downloads plus Homebrew
  • Usage: `-o Output type`, with `"csv" is the only supported alternative`
  • Usage: `hey runs provided number of requests ... and prints stats`
  • Project data: Go as the main language; latest release v0.1.5; Apache License 2.0
hey -n 1000 -c 100 https://google.com
Not stated in the README:The README does not define CSV columns, error-record formatting, or exit-code semantics.;The README does not provide an official CI integration example or performance-threshold assertion feature.
Yes: hey provides a proxy address, a custom Host header, and a Linux amd64 binary, making it suitable for single-URL routing validation. I need to access a staging environment through an HTTP proxy on a Linux amd64 host and set a custom Host header to validate routing; can hey cover this deployment check?
For: An operations engineer validating deployment routing through a proxy and custom Host header on amd64 hosts

Yes: hey provides a proxy address, a custom Host header, and a Linux amd64 binary, making it suitable for single-URL routing validation.

  • -x accepts an HTTP proxy address in host:port form and directs requests through that proxy.
  • -host sets the HTTP Host header, allowing validation of virtual-host or Host-based routing rules.
  • The Installation section provides a Linux amd64 binary, so no additional platform service is required on the target host.
  • -t sets the timeout for each request, while -disable-redirects prevents redirect following and helps expose the entrypoint’s original response behavior.

The README does not explain proxy authentication, HTTPS CONNECT details, SOCKS proxy support, or multi-target routing orchestration. If validation requires proxy credentials, complex certificate chains, or multi-service business flows, a single hey command cannot be fully justified from the README.

  • Usage: `-x HTTP Proxy address as host:port`
  • Usage: `-host HTTP Host header`
  • Usage: `-t Timeout for each request` and `-disable-redirects`
  • Installation: `Linux (amd64)`
hey https://google.com
Not stated in the README:The README does not describe HTTP proxy authentication or HTTPS CONNECT behavior.;The README does not state whether SOCKS proxies are supported.;The README does not explain how a custom Host header interacts with TLS certificate validation.
It depends: hey provides an HTTP/2 switch, but actual HTTP/2 use depends on negotiation with the target endpoint and the client environment. My service exposes an HTTP/2 endpoint, and I want one CLI tool to send concurrent requests and validate the HTTP/2 path; is hey's `-h2` sufficient?
For: A backend engineer maintaining an HTTP/2 API who needs to compare HTTP/1 and HTTP/2 endpoint behavior

It depends: hey provides an HTTP/2 switch, but actual HTTP/2 use depends on negotiation with the target endpoint and the client environment.

  • The README explicitly says hey supports HTTP2 endpoints and provides -h2 Enable HTTP/2.
  • HTTP/2 tests can still use -n, -c, or -z, so concurrent and fixed-duration load models do not require a different tool.
  • The project also supports custom Host headers, timeouts, proxies, and connection-behavior options, which helps with some endpoint configurations.

However, -h2 only enables the client-side option; it does not guarantee that the target processes requests as HTTP/2. The README does not describe ALPN/TLS negotiation, cleartext h2c support, HTTP/2 connection reuse statistics, or a protocol-version confirmation field. It is suitable for initiating a test, but not sufficient by itself to prove the negotiated protocol.

  • README introduction: `It also supports HTTP2 endpoints.`
  • Usage: `-h2 Enable HTTP/2`
  • Usage: `-n`, `-c`, `-z`, `-host`, `-x`, and `-t`
hey -h2 https://google.com
Not stated in the README:The README does not state whether cleartext HTTP/2 (h2c) is supported.;The README does not state how to confirm the final negotiated HTTP protocol in output.;The README does not define the statistics model for HTTP/2 multiplexed connections.

✨ Highlights

  • Supports HTTP/2, POST, proxies, and custom request headers
  • Controls requests, concurrency, and duration with -n, -c, and -z
  • Provides Linux, macOS, and Windows amd64 binaries
  • An ApacheBench replacement with 20,477 GitHub stars

🔧 Engineering

  • hey sends a specified number of requests and prints HTTP statistics
  • Supports -n request count, -c concurrent workers, and -q QPS limiting
  • Supports HTTP methods including GET, POST, PUT, and DELETE
  • Can export response metrics with -o csv; CSV is the only alternative output format

⚠️ Risks

  • The defaults are only 200 requests and 50 concurrent workers
  • The README requires total requests not to be smaller than -c concurrency
  • Per-request timeout defaults to 20 seconds; -t 0 enables infinite timeout
  • Only amd64 binaries are listed; ARM builds are not listed

👥 For who?

  • Go or web developers needing quick load tests for HTTP applications
  • Teams testing HTTP/2 endpoints, POST bodies, or Bearer tokens
  • Engineers using Linux, macOS, or Windows on amd64