~/theoboursy.fr/loadtest

Load Testing · Scaleway

Load test platform

A distributed HTTP load-testing platform. It wraps Vegeta in a tiny Go service and runs it on Scaleway Serverless Containers, so you can fan out thousands of requests per second on demand and scale straight back to zero when the test ends.

launch_loadtest.sh how it scales

Fan out to amplify the load

Each request to the service triggers one container instance that runs a Vegeta attack at a fixed rate. A launch script fires many of them in parallel, so the aggregate throughput is simply workers times rate per worker. Scaleway spins the replicas up on demand, up to 29, then scales everything back to zero.

That turns a 1 vCPU container into a burst load generator without running any always-on cluster. You pay for the seconds a test runs, and nothing the rest of the time.

$ RATE=100 PARALLELISM=10 ./launch_loadtest.sh
  workers:      10
  rate/worker:  100 req/s
  total rate:   1000 req/s
  duration:     5m
container_vegeta.tf

Serverless, scale to zero

The worker is a Scaleway Serverless Container. It scales from zero on demand and caps out at 29 replicas, so there is no cluster to run and idle time costs nothing.

  • min_scale = 0
  • max_scale = 29
  • 1120m CPU
  • 2048MB
  • concurrency = 3
main.go

Vegeta in a tiny Go service

A small Go server wraps the Vegeta library behind a single endpoint. POST a target, rate and duration, and it runs the attack and returns a plain-text metrics report.

POST /
{
  "target_url": "https://example.com",
  "rate": 100,
  "duration": "5m"
}
deploy.yml

IaC and CI/CD

Terraform provisions the whole setup on Scaleway. GitHub Actions builds the image, pushes it to the Scaleway registry, plans on pull requests, then applies to staging or production behind a manual approval.