Useful when concurrency-driven loading is the intended experiment; not an equivalent substitute for wrk2 constant-rate arrivals or planned-time latency accounting.
Platforms: epoll/kqueue-based systems · Region: Unspecified
wrk is a command-line HTTP benchmarking tool that combines multiple threads with event-driven network handling. It maintains a configured number of connections for a test duration and can use LuaJIT scripts to customize requests, responses and reporting.[2]
The primary configuration separates the total connection count from the number of worker threads and the length of the run. Reported output includes request throughput and latency statistics. This makes wrk useful for a focused endpoint benchmark, but a connection count is a description of the generator rather than a direct count of human users or a complete model of application traffic.[2]
Lua customization
Scripts can define setup, initialization, request, response and completion callbacks. Each worker has an independent scripting environment, while setup and completion use a separate environment. Request formatting and response inspection can support custom measurements, but shared state is not automatically available across every thread. Scripts need to respect those execution boundaries when combining results or assigning per-thread data.[3]
Measurement and scripting overhead
The scripting reference warns that building requests repeatedly and parsing response headers or bodies adds cost. Pre-generating requests can reduce that work, while omitting a response callback avoids unnecessary parsing. The result summary separately exposes connection, read, write, status and timeout errors. Comparing runs should therefore preserve the script and its callbacks, not just the target URL and connection count. The project says static changes to the method, path, headers or body do not add this overhead; the cost comes from per-request work such as building each request or parsing each response.[3]
Resources and license
The project notes that the generator needs enough ephemeral ports and that the target must handle the initial connection burst. Such infrastructure constraints can influence a benchmark independently of the application code being compared. The current repository labels its license Modified Apache 2.0, version 2.0.1; it should not be cataloged simply as an unmodified Apache-2.0 grant. Bundled components also have notices identified by the project.[1][2]
Substitution scope
wrk can substitute for hey for concise HTTP endpoint benchmarks where Lua request customization is useful. The tools expose different controls: hey documents a per-worker QPS cap, whereas wrk's core options emphasize threads, connections and duration. This is task overlap rather than interchangeable command syntax or identical load shape. A migration needs matched request behavior and error interpretation before throughput figures become comparable.[2][3][4]
wrk can substitute for wrk2 when the goal is an HTTP load test controlled by concurrent connections, threads and duration rather than a prescribed request arrival rate. Its Lua hooks can customize requests and reports, making it useful for that style of benchmark. This changes the experiment: wrk2 adds constant-throughput control and latency measurement against planned send times. Do not treat their latency distributions as interchangeable or use ordinary wrk results as proof of the same controlled-rate behavior.[2][5]
Capabilities & limitations
Threaded HTTP benchmarks
supported
Configured connections are distributed across worker threads for a timed run.[2]
Focused HTTP endpoint benchmarking · epoll/kqueue-based systems · Version, plan and platform requirements apply
/* wbeditentity-statements-multiple-properties-update:0||2 */ sf:5cbfb50f-ec40-4c1b-a169-f565af22d807:v2 | Add wrk as a substitute for wrk2 for concurrent-connection HTTP load testing, with an explicit distinction from constant-rate arrivals and planned-time latency | attribution: /proposals/5cbfb50f-ec40-4c1b-a169-f565af22d807