Public | Automated Build

Last pushed: 6 days ago
Short Description
Wrk http benchmarking tool in minimal Alpine docker image
Full Description



A minimal docker image with Wrk http benchmarking tool based on Alpine Linux (and optionally on Debian8)
Total image size is less then 10mb

Repository name in Docker Hub: skandyla/wrk
Published via automated build mechanism

Images, tags and respective Dockerfile links


$ docker pull skandyla/wrk


Show usage

$ docker run --rm skandyla/wrk

To login inside the container (optional)

$ docker run -it --rm  --entrypoint=/bin/sh skandyla/wrk

Script example

$ docker run --rm -v $(pwd):/data skandyla/wrk -s \

Custom hosts entries example

Add custom records to /etc/hosts:

$ docker run --rm -v /etc/hosts:/etc/hosts \
  skandyla/wrk -t5 -c10 -d30

Wrk mini-howto

wrk - a HTTP benchmarking tool
wrk is a modern HTTP benchmarking tool capable of generating significant
load when run on a single multi-core CPU. It combines a multithreaded
design with scalable event notification systems such as epoll and kqueue.

An optional LuaJIT script can perform HTTP request generation, response
processing, and custom reporting. Details are available in SCRIPTING and
several examples are located in scripts

Basic Usage:
wrk -t12 -c400 -d30s

This runs a benchmark for 30 seconds, using 12 threads, and keeping
400 HTTP connections open.


  Running 30s test @
    12 threads and 400 connections
    Thread Stats   Avg      Stdev     Max   +/- Stdev
      Latency   635.91us    0.89ms  12.92ms   93.69%
      Req/Sec    56.20k     8.07k   62.00k    86.54%
    22464657 requests in 30.00s, 17.76GB read
  Requests/sec: 748868.53
  Transfer/sec:    606.33MB

LuaJIT script example:

-- example HTTP POST script which demonstrates setting the
-- HTTP method, body, and adding a header
wrk.method = "POST"
wrk.body   = '{"value":"ourdata","type":"example"}'
wrk.headers["X-EXAMPLE-HEADER"] = "OurDataHeader"

wrk -t10 -c50 -d30s -s script.lua

Useful info

Load testing with wrk when every reqeust has unique http hmac authorization header

Docker Pull Command
Source Repository