# wrk

> HTTP benchmarking tool that generates high load using multithreaded design and event notification systems

Stars: 40.4k · Language: C · License: Apache-2.0 · Categories: Network

- Repository: https://github.com/wg/wrk
- Page: https://www.trmn.sh/tools/wrk

## Overview

wrk is an HTTP benchmarking tool designed to generate significant load from a single multi-core CPU. It uses a multithreaded architecture combined with scalable event notification systems like epoll and kqueue to achieve high performance testing capabilities.

The tool supports customizable test parameters including thread count, concurrent connections, and test duration. A typical benchmark command like `wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html` runs 12 threads with 400 concurrent connections for 30 seconds, producing detailed statistics including latency distribution, requests per second, and transfer rates.

wrk includes optional LuaJIT scripting support for custom HTTP request generation, response processing, and reporting. This allows users to modify request methods, paths, headers, and bodies, or implement complex testing scenarios. The tool outputs comprehensive metrics including thread statistics, latency measurements with standard deviation, and throughput data.

The tool is primarily targeted at developers and system administrators who need to perform load testing on HTTP services. It's particularly useful for testing web servers, APIs, and other HTTP endpoints under various load conditions to assess performance characteristics and identify bottlenecks.

## Alternatives

- [Nmap](https://www.trmn.sh/tools/nmap.md): Network scanner for host discovery, port scanning, service and OS detection, with a scripting engine (NSE) for extra checks. (C, 13.9k stars)
- [ttyd](https://www.trmn.sh/tools/ttyd.md): Command-line tool that shares a terminal command over the web, served via libuv and rendered in the browser with WebGL2, with SSL and basic auth. (C, 12.6k stars)
- [weechat](https://www.trmn.sh/tools/weechat.md): Terminal-based chat client with modular plugin architecture and multi-protocol support, primarily for IRC (C, 3.4k stars)
- [irssi](https://www.trmn.sh/tools/irssi.md): Terminal-based IRC client with modular architecture and support for multiple chat protocols (C, 3.2k stars)
- [elinks](https://www.trmn.sh/tools/elinks.md): Text-based web browser with frame/table support, scripting, and extensive customization options (C, 643 stars)

## Guides

- [Best Command-Line Benchmarking Tools](https://www.trmn.sh/best/benchmarking-tools): Compare hyperfine, wrk, hey and dnspyre for timing shell commands, HTTP endpoints and DNS servers from the command line.
- [Best HTTP Load Testing CLI Tools](https://www.trmn.sh/best/http-load-testing-tools): Compare wrk, vegeta, k6 and hey for HTTP load testing: requests per second, latency percentiles, constant-rate attacks and scripting.

---

Canonical: https://www.trmn.sh/tools/wrk
