What Locust Does
- Python test scripts — define user behavior as classes
- Web UI — real-time charts, start/stop, user count control
- Distributed — master + workers for massive scale
- Headless mode — for CI/CD
- CSV/JSON output — export results
- Custom clients — test gRPC, WebSocket, MQTT, databases
- Events — hook into test lifecycle
- Task weighting —
@task(weight)for traffic distribution
Comparison
| Tool | Language | UI | Distributed |
|---|---|---|---|
| Locust | Python | Web UI | Master/worker |
| k6 | JavaScript | CLI | k6-operator |
| JMeter | Java/GUI | Desktop | Servers |
| Vegeta | Go | CLI | No |
| wrk | C | CLI | No |
FAQ
Q: How many concurrent users can it test? A: A single machine handles thousands of users (gevent coroutines); distributed setups easily reach tens of thousands. Not as efficient per-machine as k6, but Python makes scripting more flexible.
Q: Compared to k6? A: Locust uses Python (more flexible, can directly call any Python library); k6 uses JS (Go runtime is more efficient). Pick based on team language preference.
Sources
- Docs: https://docs.locust.io
- GitHub: https://github.com/locustio/locust
- License: MIT