Locust: Web UI, Distributed Mode & Interpreting Results
The Web UI
Locust's web UI lets you start/stop a test, configure the number of simulated users and spawn rate, and watch live metrics -- requests per second, response time percentiles, failure counts -- as the test runs.
Running Headless for CI
locust -f locustfile.py --headless -u 100 -r 10 --run-time 5m --host https://example.com
# -u: total users -r: spawn rate (users/sec) --run-time: duration
# Fully scriptable -- fits naturally into a CI/CD pipelineDistributed Mode for Larger Load
For load beyond what one machine can generate, Locust supports a master-worker distributed mode -- a master node coordinates the test and aggregates results while multiple worker nodes actually generate the simulated load.
Percentiles, Not Just the Average
A low average response time can mask a meaningful tail of much slower requests. p95/p99 percentiles surface that tail, which often matters more for real user experience than the average alone.
Diagnosing Degradation Under Load
Response times worsening as simulated user count rises often signals the system is approaching a resource bottleneck (CPU, database connections, memory). Correlating Locust's results with server-side monitoring helps pinpoint exactly which resource is the constraint.
Failures Beyond HTTP Status Codes
A task can explicitly mark a response as a failure based on custom logic -- checking response content, not just status code -- letting Locust catch application-level correctness problems, not only HTTP-layer errors.
Keep your own version of these notes — editable, searchable, and organised by your stack.
Start free