This repo demonstrates how a simple benchmark (written in Golang and built into Docker container) works against your HTTP server. More details are described in our 6 recent cases from our SRE workaday routine article (case #1).
Clone this repo and execute:
make bench
… or do everything step by step:
- Build your image:
docker build -t benchmark:v1 .
- Start a container:
docker run --rm -d --add-host=benchmark.test:127.0.0.1 --name go_benchmark benchmark:v1
- Run the benchmark for it:
docker exec -it go_benchmark ./benchmark -u https://benchmark.test/bench -c 100 -n 100000