Skip to content

Repository files navigation

hey

hey - HTTP Load Generator

hey is a modern, lightweight HTTP load testing tool designed to help you benchmark and stress test your web applications, APIs, and HTTP servers.

Overview

hey sends a specified number of HTTP requests to a target URL with configurable concurrency levels, providing detailed performance metrics and statistics. It's ideal for:

  • API performance testing
  • Load testing web applications
  • Stress testing HTTP servers
  • Benchmarking response times
  • Identifying performance bottlenecks

Installation

Download latest package from Releases

Quick Start

hey https://example.com/

Features

  • Configurable request count and concurrency
  • Support for HTTP/2
  • Custom HTTP methods and headers
  • Request body from string or file
  • Rate limiting
  • Request timeouts
  • Basic authentication
  • HTTP proxy support
  • CSV output format for further analysis
  • Customizable connection options

Usage

hey [options...] <url>

Options

FlagDescription
-nNumber of requests to run (default: 200)
-cConcurrent workers (default: 50)
-qRate limit in QPS per worker (default: no limit)
-zDuration to send requests (e.g., -z 10s, -z 3m)
-oOutput format (csv or default summary)
-mHTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONS)
-HCustom HTTP header (repeatable)
-tRequest timeout in seconds (default: 20, 0 for infinite)
-AHTTP Accept header
-dHTTP request body
-DHTTP request body from file
-TContent-type (default: "text/html")
-aBasic authentication (username:password)
-xHTTP proxy address (host:port)
-sSOCKS5 proxy address (host:port)
-h2Enable HTTP/2
-hostHTTP Host header
-disable-compressionDisable compression
-disable-keepaliveDisable keep-alive
-disable-redirectsDisable following HTTP redirects
-cpusNumber of CPU cores to use

Examples

Basic use:

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

POST request with body:

hey -m POST -d '{"key":"value"}' -T "application/json" https://api.example.com/resource

Using HTTP/2 with custom headers:

hey -h2 -H "Authorization: Bearer token" https://api.example.com/

History

hey came from rakyll/hey and was originally inspired by this tool tarekziade/boom.

About

HTTP load generator, Apache benchmarking tool (ab) alternative

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages