Step-by-Step Guide: Installing wrk (HTTP Benchmarking Tool) on Amazon Linux

Published: (December 13, 2025 at 05:32 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

What Is wrk?

  • Multithreading
  • Event‑driven architecture (epoll/kqueue)
  • Lua scripting for advanced testing

Ideal for testing:

  • API performance
  • Auto‑scaling groups
  • Load balancers
  • Backend throughput

Prerequisites

  • An Amazon Linux / Amazon Linux 2 EC2 instance
  • sudo access
  • Basic yum packages (installed in the steps below)

Step‑by‑Step Instructions to Install wrk on Amazon Linux

1️⃣ Install Development Tools & Dependencies

sudo yum groupinstall -y "Development Tools"
sudo yum install -y git

Installs gcc, make, automake, binutils, git, and other build dependencies.

2️⃣ Clone the wrk Repository

git clone https://github.com/wg/wrk.git

Creates a wrk directory containing the source code.

3️⃣ Build wrk Using make

cd wrk
make

The build is fast and produces a binary named wrk in the same folder.

4️⃣ Move wrk to Your PATH

sudo mv wrk /usr/local/bin/

Now wrk can be executed from any shell.

Final Command Summary

sudo yum groupinstall -y "Development Tools"
sudo yum install -y git
git clone https://github.com/wg/wrk.git
cd wrk
make
sudo mv wrk /usr/local/bin/

How to Use wrk

wrk -t12 -c400 -d30s http://your-server-endpoint/
  • -t12 → number of threads
  • -c400 → number of open connections
  • -d30s → duration of the test (30 seconds)
  • URL → target API, load balancer, or any HTTP endpoint

Summary

  • Install build dependencies
  • Clone the wrk repository
  • Compile the source with make
  • Move the resulting binary to a directory in your PATH

After these steps, you can benchmark anything—from individual APIs to entire auto‑scaling groups—with a single command.

Back to Blog

Related posts

Read more »