software · Q45
wrk
Multithreaded HTTP benchmarking with configurable connections and LuaJIT callbacks.
Overview
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]
Threads, connections and duration
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]
Capabilities & limitations
Threaded HTTP benchmarks
supportedConfigured 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
1 source · check evidence
Thread/connection model and scripting overhead
vendor · checked 2026-10-07Lua request and reporting hooks
supportedIndependent worker environments provide lifecycle callbacks.[3]
Focused HTTP endpoint benchmarking · epoll/kqueue-based systems · Version, plan and platform requirements apply
1 source · check evidence
Independent thread environments, request callbacks and errors
vendor · checked 2026-10-07Low-overhead custom processing
limitedPer-request generation and response parsing reduce available generator capacity.[2][3]
Focused HTTP endpoint benchmarking · epoll/kqueue-based systems · Version, plan and platform requirements apply
2 sources · check evidence
Thread/connection model and scripting overhead
vendor · checked 2026-10-07Independent thread environments, request callbacks and errors
vendor · checked 2026-10-07Can substitute for
These are products or services this entry can replace. Check the task and limitations for each comparison.
References
- wrk license
Modified Apache 2.0 version 2.0.1
vendor · retrieved 2026-10-07 - wrk documentation
Thread/connection model and scripting overhead
vendor · retrieved 2026-10-07 - wrk Lua scripting API
Independent thread environments, request callbacks and errors
vendor · retrieved 2026-10-07 - hey documentation
Worker-level QPS, duration/request count, HTTP2 and platforms
vendor · retrieved 2026-10-07
Discussion & disputes
Ask about unclear claims or explain a concern with supporting sources. If you have a specific fix, suggest a correction.
No discussion yet.
Revision history
Open a revision to read an earlier version of this article.
| Revision | Timestamp | Edit summary |
|---|---|---|
| 1636 | 2026-10-19 14:50:05 | /* 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 |
| 29 | 2026-10-08 23:11:56 | /* wbeditentity-create-item:0| */ sf:01bd4edc-073f-483f-98cd-78ecf1af41c8:v2 | Add wrk with cited product identity, workflow and portability boundaries; documentation research only. | attribution: /proposals/01bd4edc-073f-483f-98cd-78ecf1af41c8 |