{"schemaVersion":"1.0","record":{"label":"wrk","description":"Multithreaded HTTP benchmarking with configurable connections and LuaJIT callbacks.","aliases":[],"kind":"software","website":"https://github.com/wg/wrk","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.","license":"Modified Apache 2.0, version 2.0.1; bundled-component notices apply","lifecycle":"active","example":false,"features":[{"name":"Threaded HTTP benchmarks","status":"supported","detail":"Configured connections are distributed across worker threads for a timed run.","useCase":"Focused HTTP endpoint benchmarking","platforms":["epoll/kqueue-based systems"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/wg/wrk/blob/master/README.md","locator":"Thread/connection model and scripting overhead","retrievedAt":"2026-10-07T11:20:49Z","kind":"vendor"}]},{"name":"Lua request and reporting hooks","status":"supported","detail":"Independent worker environments provide lifecycle callbacks.","useCase":"Focused HTTP endpoint benchmarking","platforms":["epoll/kqueue-based systems"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/wg/wrk/blob/master/SCRIPTING","locator":"Independent thread environments, request callbacks and errors","retrievedAt":"2026-10-07T11:20:59Z","kind":"vendor"}]},{"name":"Low-overhead custom processing","status":"limited","detail":"Per-request generation and response parsing reduce available generator capacity.","useCase":"Focused HTTP endpoint benchmarking","platforms":["epoll/kqueue-based systems"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/wg/wrk/blob/master/README.md","locator":"Thread/connection model and scripting overhead","retrievedAt":"2026-10-07T11:20:49Z","kind":"vendor"},{"url":"https://github.com/wg/wrk/blob/master/SCRIPTING","locator":"Independent thread environments, request callbacks and errors","retrievedAt":"2026-10-07T11:20:59Z","kind":"vendor"}]}],"alternatives":[],"slug":"wrk","draftAlternatives":[{"targetSlug":"hey","status":"limited","detail":"Can replace focused HTTP benchmarks with thread/connection controls and Lua hooks; pacing semantics and scripts differ.","useCase":"Focused HTTP endpoint benchmarking","platforms":["epoll/kqueue-based systems"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/wg/wrk/blob/master/README.md","locator":"Thread/connection model and scripting overhead","retrievedAt":"2026-10-07T11:20:49Z","kind":"vendor"},{"url":"https://github.com/rakyll/hey/blob/master/README.md","locator":"Worker-level QPS, duration/request count, HTTP2 and platforms","retrievedAt":"2026-10-07T11:20:59Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/wg/wrk/blob/master/README.md","locator":"Thread/connection model and scripting overhead","retrievedAt":"2026-10-07T11:20:49Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/wg/wrk/blob/master/LICENSE","locator":"Modified Apache 2.0 version 2.0.1","retrievedAt":"2026-10-07T11:21:26Z","id":"wrk-license","title":"wrk license","kind":"vendor"},{"url":"https://github.com/wg/wrk/blob/master/README.md","locator":"Thread/connection model and scripting overhead","retrievedAt":"2026-10-07T11:20:49Z","id":"wrk-readme","title":"wrk documentation","kind":"vendor"},{"url":"https://github.com/wg/wrk/blob/master/SCRIPTING","locator":"Independent thread environments, request callbacks and errors","retrievedAt":"2026-10-07T11:20:59Z","id":"wrk-scripting","title":"wrk Lua scripting API","kind":"vendor"},{"url":"https://github.com/rakyll/hey/blob/master/README.md","locator":"Worker-level QPS, duration/request count, HTTP2 and platforms","retrievedAt":"2026-10-07T11:20:59Z","id":"hey-readme","title":"hey documentation","kind":"vendor"}],"overviewCitations":["wrk-readme"],"licenseCitations":["wrk-license"],"sections":[{"id":"model","heading":"Threads, connections and duration","paragraphs":[{"id":"model-detail","content":[{"text":"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."}],"citations":["wrk-readme"]}]},{"id":"lua","heading":"Lua customization","paragraphs":[{"id":"lua-detail","content":[{"text":"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."}],"citations":["wrk-scripting"]}]},{"id":"overhead","heading":"Measurement and scripting overhead","paragraphs":[{"id":"overhead-detail","content":[{"text":"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."}],"citations":["wrk-scripting"]}]},{"id":"operation","heading":"Resources and license","paragraphs":[{"id":"operation-detail","content":[{"text":"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."}],"citations":["wrk-readme","wrk-license"]}]},{"id":"fit","heading":"Substitution scope","paragraphs":[{"id":"fit-detail","content":[{"text":"wrk can substitute for "},{"text":"hey","targetSlug":"hey"},{"text":" 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."}],"citations":["wrk-readme","wrk-scripting","hey-readme"]}]}]},"id":"Q45","revision":29,"updatedAt":"2026-10-08T23:11:56Z","sourceUrl":"https://substitutefor.net/entities/Q45?revision=29"}}