explaingit

wg/wrk

Analysis updated 2026-06-20

40,245CAudience · ops devopsComplexity · 2/5Setup · moderate

TLDR

wrk is a fast HTTP benchmarking tool that simulates many concurrent users hitting your web server to measure how many requests per second it can handle under sustained load.

Mindmap

mindmap
  root((wrk))
    What it does
      HTTP load testing
      Concurrent connections
      Latency measurement
    Tech Stack
      C core
      LuaJIT scripting
      Multi-threaded
    Use Cases
      API benchmarking
      Server stress testing
      Framework comparison
    Audience
      Backend developers
      DevOps engineers
      Performance testers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Measure how many requests per second your web API can sustain before performance degrades under concurrent traffic.

USE CASE 2

Benchmark two different server configurations or frameworks under identical load to compare their performance objectively.

USE CASE 3

Write a Lua script to add authentication headers or generate randomized request URLs for a more realistic load test.

USE CASE 4

Find the breaking point of a web service before deploying to production by running an extended stress test with hundreds of connections.

What is it built with?

CLuaJIT

How does it compare?

wg/wrkphp/php-srccurl/curl
Stars40,24540,04541,737
LanguageCCC
Setup difficultymoderatehardeasy
Complexity2/55/54/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Must be compiled from source using make, requires a C compiler and standard development headers, no pre-built binary available.

In plain English

wrk is an HTTP benchmarking tool designed to measure how much load a web server can handle. The problem it solves is that developers and system administrators need to know the performance limits of their web applications before putting them in production or before making changes that could affect performance. wrk lets you simulate many concurrent users hitting your server at once and measures how many requests per second your server can process. The way it works is by running on a single multi-core CPU and using a multithreaded design with scalable event notification systems to maximize how many connections it can keep open simultaneously. You point it at a URL and tell it how many threads to use, how many connections to maintain, and how long to run the test. wrk then opens all those connections and hammers the server continuously for the specified duration, then reports statistics including the number of requests completed, requests per second, data transferred, and latency percentiles. It also supports scripting via LuaJIT, which means you can write small Lua scripts to customize request headers, dynamically generate different URLs, or add authentication tokens to your requests. You would use wrk if you are a developer who wants to test whether your web server or API can handle expected traffic loads, or if you are tuning server configuration and want to measure the effect of changes. It is popular for benchmarking web frameworks and comparing how different server setups perform under stress. The tech stack is C for the core tool, with LuaJIT embedded to provide the scripting extension layer.

Copy-paste prompts

Prompt 1
Using wrk, write the command to load test my API at http://localhost:3000/api/data using 4 threads and 100 connections for 30 seconds, then explain what each output metric means.
Prompt 2
I need to benchmark an API endpoint that requires a Bearer token. Write a wrk Lua script that adds the Authorization header to every request.
Prompt 3
Show me how to use wrk with a Lua script to randomly pick from a list of 10 different URL paths per request to simulate realistic user traffic patterns.
Prompt 4
I want to compare performance between my Node.js and Go servers. Walk me through setting up identical wrk benchmarks for both and interpreting the latency percentile output.
Prompt 5
Write a wrk Lua script that sends POST requests with a JSON body to my API endpoint and sets the Content-Type header to application/json.

Frequently asked questions

What is wrk?

wrk is a fast HTTP benchmarking tool that simulates many concurrent users hitting your web server to measure how many requests per second it can handle under sustained load.

What language is wrk written in?

Mainly C. The stack also includes C, LuaJIT.

How hard is wrk to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is wrk for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub wg on gitmyhub

Verify against the repo before relying on details.