SYSTEM Cited by 1 source
Locust¶
Definition¶
Locust (locust.io) is an open-source Python-based load-testing framework. Users define simulated user behaviour as Python code (a "locustfile"); Locust then spawns large numbers of lightweight concurrent users that exercise the target system. Supports standalone mode and distributed mode with a controller + workers topology for horizontal scaling beyond single-box resource limits.
What makes it distinctive¶
-
Test-as-code, not XML. User behaviour is ordinary Python — a
HttpUsersubclass with@task-decorated methods — which makes test suites reviewable, version-controlled, and easy for developers to extend. This is the primary axis Zalando cites when picking Locust over JMeter: the team could maintain the test suite themselves. -
Gevent-based concurrency. Each simulated user is a greenlet rather than an OS thread, which lets a single worker process hold orders-of-magnitude more concurrent simulated users than a thread-per-user model.
-
Controller / worker distributed mode. One controller coordinates; workers generate load. Resource-bound workloads require this mode — a single Locust process cannot saturate a modern production service.
-
HTTP API for external control. The controller exposes an API to set hatch rate and user count at runtime. This is the extension point Zalando's Load Test Conductor uses to drive its KPI-driven closed-loop ramp-up — the conductor pushes new hatch rates every 60 seconds based on observed orders-per-minute.
Typical packaging¶
- Locustfile per business process. Zalando wrote multiple locustfiles to cover their payment + checkout flows.
- Containerised. Zalando packages Locust + locustfiles as a Docker image, deploys the distributed setup (controller + N workers) as Kubernetes workloads.
Comparable systems¶
- Apache JMeter — Java, XML config, the incumbent. Mature but the XML surface makes developer-owned test suites harder to maintain.
- Vegeta — Go, CLI + library, HTTP-focused. Zalando short-listed it alongside Locust and chose Locust on internal developer-familiarity.
- k6 — Go + JS scripting, more modern than JMeter, similar in spirit to Locust for developer ergonomics.
Seen in¶
- sources/2021-03-01-zalando-building-an-end-to-end-load-test-automation-system-on-top-of-kubernetes — Zalando Payments department's end-to-end load test automation system uses Locust in distributed mode, orchestrated by a Go Load Test Conductor that drives the controller's API on a 60-second KPI-closed-loop cadence.