explaingit

rakyll/hey

20,021GoAudience · developerComplexity · 2/5MaintainedLicenseSetup · easy

TLDR

A lightweight command-line tool for load testing web servers. Send thousands of HTTP requests to measure how fast your API responds and how much traffic it can handle.

Mindmap

mindmap
  root((repo))
    What it does
      Load test servers
      Measure response times
      Check throughput
    How to use
      Point at URL
      Set request count
      Set concurrency level
    Features
      Custom headers
      POST requests
      Rate limiting
      HTTP/2 support
    Use cases
      Verify deployments
      Find bottlenecks
      Compare configs
    Tech stack
      Go binary
      No dependencies

Things people build with this

USE CASE 1

Test a new API before deploying to production to ensure it handles expected traffic levels.

USE CASE 2

Diagnose performance regressions by comparing load test results before and after code changes.

USE CASE 3

Compare two server configurations to see which one responds faster under heavy load.

USE CASE 4

Export results as CSV to analyze response time distributions and identify slow endpoints.

Tech stack

Go

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
How do I use hey to send 5000 requests with 50 concurrent workers to my API at http://localhost:8080?
Prompt 2
Show me how to run a 60-second load test against my server and export the results as CSV.
Prompt 3
How do I add custom headers and make POST requests with a JSON body using hey?
Prompt 4
What does hey's output mean? Explain the response time percentiles and throughput metrics.
Prompt 5
How do I set up hey to test my API with basic authentication and rate limiting?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.