Overview
hey is a powerful and lightweight HTTP load generator, designed as a modern and performant replacement for ApacheBench (ab). It's built for simplicity and speed, enabling developers and SREs to quickly assess the performance and stability of web applications under various load conditions. Whether you're testing a single endpoint or an entire API, hey provides the tools to simulate realistic traffic patterns and gather crucial metrics.
Key Features
- Modern & Fast: Written in Go,
heyis engineered for high performance and efficiency, capable of generating significant load with minimal overhead. - ApacheBench (ab) Replacement: Offers a familiar command-line interface and feature set to users of
ab, while introducing enhancements and improvements. - HTTP/2 Support: Seamlessly test your endpoints using the latest HTTP/2 protocol for improved performance.
- Flexible Request Control: Customize the number of requests (
-n), concurrency level (-c), and duration (-z) to precisely match your testing scenarios. - Advanced Customization:
- Specify HTTP methods (
-m), custom headers (-H), request bodies (-d,-D), and authentication (-a). - Configure timeouts (
-t), proxies (-x), and content types (-T). - Control compression, keep-alive, and redirects for fine-grained testing.
- Specify HTTP methods (
- Rate Limiting: Implement precise QPS per worker using the
-qflag to simulate controlled traffic. - Multiple Output Formats: Get immediate summary statistics or export detailed results in CSV format (
-o csv) for in-depth analysis. - Easy Installation: Pre-compiled binaries are available for Linux, macOS, and Windows, with convenient installation via Homebrew on macOS.
Typical Use Cases
- Performance Benchmarking: Measure the response times and throughput of your web applications and APIs under simulated user load.
- Load Testing: Identify performance bottlenecks and stress points in your infrastructure by subjecting it to high volumes of concurrent requests.
- Capacity Planning: Determine the maximum load your application can handle before performance degrades, informing infrastructure scaling decisions.
- API Stability Checks: Ensure your APIs remain responsive and error-free under sustained traffic.
- Pre-Production Testing: Validate application performance and stability in a staging environment before deploying to production.
