HTTP benchmarking tool that generates high load using multithreaded design and event notification systems
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. The tool can maintain hundreds of concurrent HTTP connections while measuring latency, throughput, and other performance metrics.
The basic usage involves specifying the number of threads, connections, and test duration. For example, wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html runs a 30-second test with 12 threads maintaining 400 connections. The output provides detailed statistics including average latency, standard deviation, requests per second, and data transfer rates.
wrk supports optional LuaJIT scripting for custom HTTP request generation, response processing, and reporting. This allows users to modify request methods, paths, headers, and bodies, or implement custom logic for complex testing scenarios. The tool is particularly useful for developers and system administrators who need to performance test web servers, APIs, and other HTTP services under realistic load conditions.