# Locust

Locust is an open-source load and performance testing tool for HTTP and other protocols that you write in plain Python. It is open source and self-hosted, installable on Docker Hub, Kubernetes (Helm) and Unraid.

Canonical page: https://ourlocalhost.com/app/327/locust

## Description

Locust is an open-source load and performance testing tool for HTTP and other protocols that you write in plain Python. It runs tests from the command line or a web-based UI and reports throughput, response times, and errors in real time, making it a flexible choice for developers who want code-based load testing.

## Platform availability

Available on 2 of 9 platforms: Unraid, Helm.

## Health score

81/100 (Excellent), based on 4 of 5 factors.
- Maintained: 100 (last commit 19 days ago)
- Popular: 89 (28,202 GitHub stars)
- Easy to install: 45 (2 install platforms, install notes, Docker image)
- Security check: 67 (no serious findings, 8 minor, CI, tests, OpenSSF Scorecard 6.3/10)

## Links

- GitHub: https://github.com/locustio/locust
- Docker Hub: https://hub.docker.com/r/locustio/locust
- Kubernetes (Helm): https://artifacthub.io/packages/helm/deliveryhero/locust
- Unraid: https://ca.unraid.net/apps/locust-1sc96fy1wa4u8y?q=locust
- Official website: https://docs.locust.io/en/stable/
- Documentation: https://docs.locust.io/en/stable/faq.html

## Common questions

### How do I point Locust at the system under test and make the dashboard reachable?

Set the host setting to the website or API that Locust's simulated users will visit, and open port 8089 on remote machines for the web UI. If the target or port is wrong, the users may fail to connect or the browser will not find the dashboard.

### How can I run more simulated users with Docker Compose?

Start the stack with docker-compose up, and add --scale worker=4 when you need more simulated users. Workers are the containers that actually generate traffic, so too few workers can limit how much load you can run.

### How can I verify a Locust installation when using uvx?

Run uvx locust -V to verify the basic install. uvx is a one-off Python runner that creates a throwaway environment, so you do not need to manage a permanent Python setup. If the version number appears, you are ready to point Locust at a target and start a test.

### What should I check first when a load test returns 5xx, connection aborted, or connection reset errors?

Check your server logs. If it works at low load, it is almost certainly not a Locust issue, but an issue with the system you are testing.

### How do I make each task iteration look like a new user to the system under test?

Call self.client.cookies.clear() at the end of your task. This clears cookies so the next task iteration seems like a new user to the system under test.

## Alternatives

- Apache JMeter: Apache JMeter is an open source Java application, designed to load test functional behavior and measure performance.
- OctoPerf

---
Source: Our Local Host (https://ourlocalhost.com/app/327/locust), the self-hosted and open-source app directory.
