gitmyhub

hey

Go ★ 20k updated 5mo ago

HTTP load generator, ApacheBench (ab) replacement

A tiny command-line tool for load testing web servers, fire thousands of HTTP requests at a URL to see how your server holds up under traffic pressure.

Gosetup: easycomplexity 1/5

Hey is a command-line tool for load testing web applications. Load testing means sending a large number of HTTP requests to a server in a controlled way to see how it performs under pressure — how fast it responds, how many requests it can handle at once, and whether it fails or slows down when traffic spikes. Hey is positioned as a modern replacement for ApacheBench (ab), the classic but aging load testing tool.

The tool is a single small binary — you download it and run it directly with no installation required. You point it at a URL and specify how many requests to send and how many to send at the same time (concurrency). After the test finishes, it prints a summary with statistics like response times, throughput, and status code distribution. It also supports running a test for a fixed duration instead of a fixed number of requests, rate limiting, custom HTTP headers and methods, request bodies, basic authentication, HTTP/2, and proxies.

The examples in the README show the typical patterns clearly: sending 1,000 requests with 100 workers running in parallel, running a 30-second load test, making POST requests with custom data, or adding authorization headers. Results can also be exported as CSV for further analysis.

You would use Hey when deploying a new API or web service and wanting to verify it can handle expected traffic levels, when diagnosing a performance regression, or when comparing two server configurations. It is written in Go and available as pre-built binaries for Linux, macOS, and Windows, and can also be installed on macOS via Homebrew.

Where it fits