← All open source projects

wrk

wg/wrk

wrk is a modern HTTP benchmarking tool designed to generate load from one multi-core machine.

Forks 3,031
Author wg
Language C
License NOASSERTION
Synced 2026-06-27

What It Is

wrk is an HTTP benchmarking tool. It is designed to generate significant load from a single multi-core machine.

The project combines a multithreaded design with scalable event systems such as epoll and kqueue. It does not try to be a full monitoring platform; it runs one type of test quickly and predictably.

It is often used before a release, while comparing web-server settings, after code optimization, or when checking whether a local test environment can handle a target connection count.

What Is Inside

The basic command sets thread count, connection count, test duration, and URL. The output reports latency, request count, and throughput.

LuaJIT scripting is the flexible part. Scripts can generate custom HTTP requests, process responses, and add reports when a plain GET request is not enough.

wrk does not store long history or build dashboards. Its strength is the short experiment: run load, inspect numbers, change a parameter, and repeat.

How People Use It

A typical scenario is a local API or page check before heavier testing. Engineers run wrk for a fixed duration and compare variants, looking beyond average latency to tail behavior.

The tool is useful for comparing configurations: server process count, connection pools, caching, compression, proxy behavior, or handler changes.

The limitation is that wrk can be misused easily. If the client machine is the bottleneck, the network is narrow, or the scenario does not match real traffic, the numbers can look good and still be useless.

Test Example

The command runs a 30-second test with 12 threads and 400 open connections, which is the classic quick baseline.

Basic HTTP Test

The example fixes threads, connections, and duration so the result can be repeated after a server change.

Language: Bash
wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html

Strengths And Limits

wrk’s strength is its small size and clear focus on HTTP load. It gives quick orientation and is good for repeatable comparisons.

It is not enough for a full product test. Real user scenarios, data, authentication, cache warmup, server observation, and error checks are still required.

wrk fits server developers, administrators, and people optimizing HTTP layers. For long browser-like user sessions, another class of tool is a better fit.