
Locust Product Review
- Free under the MIT License
- Self-hosted only
- No paid edition or hosted plan from the maintainers
- Locust Cloud closed in late 2025
- You provide the infrastructure to scale
Locust is free under the MIT License. You pay only for the machines or containers that generate load. For hosted runs, the Locust docs point to Microsoft Azure Load Testing, a separate paid service.
- First released around 2011
- Created by Jonatan Heyman and others
- Maintained under the locustio org
- 27,000+ GitHub stars
Overview
Locust is an open-source, Python-based load testing framework where you define user behavior in plain Python code and swarm a system with many simultaneous users. It was first released around 2011 by Jonatan Heyman and other early contributors, and it is maintained under the locustio GitHub organization. The project is on the 2.x line, with version 2.47.0 released on 21 October 2026, and is installed simply with pip.
Locust's defining characteristic is tests as real Python code. There is no XML, no domain-specific language, and no GUI test builder. You write a locustfile.py that subclasses a user type and defines tasks, which gives you the full power of Python including conditionals, loops, and the entire library ecosystem. This makes Locust maximally flexible and hackable, and it can load test any system rather than just HTTP, since you can write your own client for any protocol.
The engine uses event-based concurrency through gevent, so a single process can simulate thousands of users with greenlets instead of one thread per user. Each Locust process is bound to a single CPU core due to the Python GIL, so high load is reached through the master-worker distributed model running one process per core across many machines or containers. The FastHttpUser client raises per-core throughput substantially over the standard HttpUser. A real-time web UI shows requests per second, response times, and failures, and a headless mode supports CI runs.
Locust is free under the MIT License and self-hosted. The maintainers' hosted service, Locust Cloud, shut down in late 2025, and the Locust docs now point teams that want hosted runs to Microsoft Azure Load Testing, a Microsoft service that runs Locust scripts. It is a strong fit for Python-comfortable developer and SRE teams who want code-first tests in Git. The trade-offs are that it requires coding, has lower per-core throughput than Go or JVM tools, offers less polished reporting than Gatling, and requires you to write custom clients for non-HTTP protocols.
Key Featuresโ
Python-Native User Behaviorโ
User scenarios are written in plain Python with no DSL or XML. This gives full access to the language and its ecosystem for realistic, programmable behavior.
HttpUser and FastHttpUserโ
The standard HttpUser class uses python-requests, while FastHttpUser uses geventhttpclient for much higher throughput. Teams choose based on whether per-core performance matters.
Tasks and TaskSetsโ
Tasks are defined with the @task decorator and can be weighted, and TaskSet groups related tasks. This structures user journeys clearly in code.
Gevent Concurrencyโ
Locust uses gevent greenlets for event-based concurrency, so one process can simulate thousands of users. This avoids the overhead of one thread per user.
Wait Times and Lifecycle Hooksโ
Built-in wait_time functions pace users, and on_start and on_stop hooks handle per-user setup and teardown. These shape realistic session behavior.
Real-Time Web UIโ
A web-based UI shows live statistics and charts for requests per second, response times, failures, and active users. It gives immediate visibility during a run.
Distributed Load Generationโ
A master coordinates multiple workers that generate load across machines and containers. This scales Locust horizontally to very high user counts.
Headless CLI Modeโ
The headless mode runs tests with no web UI, supports stop conditions, and returns exit codes. This makes Locust suitable for unattended and CI runs.
Custom Load Shapesโ
The LoadTestShape class defines programmatic ramp, spike, and step profiles. Teams can model precise load patterns in code.
Event Hooksโ
Event hooks for requests, init, and test start and stop enable custom logic and reporting. This extends Locust without modifying its core.
Test Any Protocolโ
By writing a custom client and firing request events, Locust can test gRPC, WebSocket, Kafka, MQTT, SQL, and other systems. It is not limited to HTTP.
Kubernetes and Dockerโ
Official Docker images and a Kubernetes Operator support containerized and orchestrated runs. This eases large distributed deployments.
Observability Integrationsโ
Locust integrates with OpenTelemetry and exports to Prometheus, Grafana, and TimescaleDB through community plugins. This connects results to existing observability stacks.
Best Selling Pointsโ
- Tests are real Python code, giving the full power of the language and its ecosystem.
- A true tests-as-code model where scenarios live in Git, reviewable and reusable.
- Massive scalability, proven to simulate millions of users across distributed workers.
- A hackable and extensible design with an intentionally small core codebase.
- The ability to load test anything, not just web or HTTP systems.
- Free and MIT-licensed, with zero license cost.
- A friendly real-time web UI available out of the box.
- First-class distributed mode for horizontal scaling.
- FastHttpUser for substantially higher throughput per core.
- A large, active community with more than 27,000 GitHub stars.
Supported Integrationsโ
Locust supports HTTP natively and any other protocol through custom Python clients, with broad tooling and observability integrations.
- HTTP/HTTPS
- WebSocket (custom client)
- gRPC (custom client)
- XML-RPC
- Kafka
- MQTT
- SQL / databases
- Custom TCP clients
- Docker
- Kubernetes Operator
- GitHub Actions
- GitLab CI
- Jenkins
- CSV output
- HTML report
- OpenTelemetry
- Prometheus exporter
- Grafana
- TimescaleDB
- locust-plugins
- VS Code extension
- Azure Load Testing
Popular Customersโ
Locust is used by major technology, gaming, and media organizations, and is the de-facto Python load testing tool.
- Microsoft
- Riot Games
- Mozilla
- Zalando
- ThoughtWorks
- Delivery Hero
- Wikimedia Foundation
Adoption Highlightsโ
- Locust has been used to load test high-traffic systems, including the Battlelog web app for the Battlefield games.
- Named adopters listed on the official site include Google, Microsoft, Riot Games, and Mozilla.
- The project maintains more than 27,000 GitHub stars as the de-facto standard Python load testing tool.
- Locust is consistently featured in load testing roundups alongside JMeter, k6, and Gatling.
Architectureโ
Locust uses gevent-based concurrency in single-core processes, scaled horizontally through a master-worker model, with a web UI and a headless mode.
Core componentsโ
- Gevent Engine
- HttpUser / FastHttpUser
- Master / Worker
- Web UI
- Headless Mode
- Kubernetes Operator
- Gevent engine provides event-based concurrency so one process simulates thousands of users.
- HttpUser and FastHttpUser are the standard and high-throughput HTTP clients.
- Master and worker processes coordinate and generate load across machines.
- Web UI is a Flask-based interface, recently rewritten, that shows live statistics.
- Headless mode runs tests without the UI for CI and automation.
- Kubernetes Operator supports orchestrated distributed runs.
Concurrency and performanceโ
Each Locust process is bound to a single CPU core because of the Python GIL, so the recommended pattern is one process per core. On a single core, FastHttpUser can reach roughly 16,000 requests per second compared with about 4,000 for the standard HttpUser, a 5x to 6x improvement in maximum throughput. Higher load is achieved by adding workers across machines and containers.
Setup Requirementsโ
- Python 3.x is required, with installation via pip.
- Official Docker images and a Kubernetes Operator are available for containerized runs.
- Large distributed runs require provisioning and operating your own worker infrastructure.
Scripting Modelโ
Locust is code-first, with scenarios written entirely in Python.
- A locustfile.py subclasses HttpUser or FastHttpUser and defines tasks with the @task decorator.
- TaskSets group tasks, and wait_time functions pace users.
- Lifecycle hooks on_start and on_stop handle setup and teardown.
- Custom clients extend Locust to non-HTTP systems by firing request events manually.
This is real, maximally flexible code. There is no GUI test builder and no traffic recording, so scenarios are written by hand.
Reportingโ
Locust provides a real-time web UI plus downloadable reports.
- Real-time web UI shows requests per second, response times, failures, and active users with live charts.
- CSV output provides downloadable statistics.
- HTML report offers a standalone summary including percentiles.
- Observability export sends metrics to Prometheus, Grafana, and TimescaleDB through community integrations.
Reporting Notesโ
- Core open-source reporting is functional but less polished than Gatling or commercial suites.
- There is no built-in long-term trend store in the open-source edition.
- For long-term history, export metrics to your own monitoring stack.
CI/CD and Test-as-Codeโ
Locust fits naturally into pipelines through its headless mode and Python-in-Git scenarios.
- Headless CLI mode runs tests without the web UI, supports stop conditions, and returns exit codes for gating.
- Tests as code live in Python checked into Git, making them reviewable and reusable.
- Docker images ease pipeline integration across GitHub Actions, GitLab CI, and Jenkins.
Distributed Executionโ
Locust scales through a master and worker topology, where one master coordinates many workers that generate load. Each worker is a separate process, with one process per core recommended, and scaling is horizontal across machines and containers.
For orchestration, an official Kubernetes Operator and community Helm charts are available. There is no hard scale ceiling, since capacity is bounded only by the hardware you provision, and Locust has been used to simulate millions of virtual users.
Security and Complianceโ
A Self-Hosted Tool Where Test Data Stays In-House.
Local Execution by Defaultโ
Core Locust is a local, self-hosted tool with no SaaS by default, so test data does not leave your infrastructure. This suits teams with strict data-handling requirements.
Certificationsโ
- No formal certifications apply to the open-source tool, since it is a library you run yourself.
- Hosted runs through Azure Load Testing fall under Microsoft's own compliance programme, not Locust's.
Pricingโ
The Locust framework is free under the MIT License. There is no paid edition.
Pricing Modelโ
| Tier | Pricing | Scope | Notes |
|---|---|---|---|
| Locust | Free | Self-hosted | MIT License, you provide infrastructure |
The open-source framework is free under the MIT License, and you pay only for the infrastructure used to scale it.
Locust Cloud, the maintainers' former hosted service, is no longer available. Release 2.43.0 (30 December 2025) removed its references from Locust "now that it is shutting down". For hosted runs, the Locust docs recommend Microsoft Azure Load Testing, which Microsoft prices and sells separately. Microsoft also sponsors Locust's maintenance.
Where Locust Falls Shortโ
- It requires coding. There is no GUI, no-code, or recording, so non-developers are excluded.
- Each process is single-core. The Python GIL means high load needs distributed mode and many processes.
- Per-core throughput is lower. Python trails Go and JVM tools, though FastHttpUser and distribution mitigate this.
- Protocol breadth is smaller out of the box. Non-HTTP protocols require writing your own client.
- Reporting is less polished. There is no built-in long-term trend store in the open-source edition.
- You own the infrastructure. Large distributed runs require self-managed ops, or a separate hosted service such as Azure Load Testing.
- There are no built-in correlation helpers. Parameterization and correlation must be scripted by hand.
Who Should Pick Locustโ
- Python-comfortable developer and SRE teams that want tests as code in Git.
- Teams that need to load test custom or non-HTTP systems.
- Teams that value extensibility, hackability, and zero license cost.
- Teams that can self-host their load generators.
- Teams already invested in the Python ecosystem and tooling.
Who Should Look Elsewhereโ
- Teams that need a no-code or GUI record-and-replay tool. JMeter or NeoLoad.
- Teams that are not comfortable writing Python.
- Teams that need the broadest protocol coverage out of the box. JMeter.
- Teams that want the highest single-machine throughput and polished reporting with minimal scripting. k6 or Gatling.
- Enterprises that need legacy protocols such as SAP or Citrix. LoadRunner or NeoLoad.
Awards & Recognitionโ
- One of the most-starred load testing projects, with more than 27,000 GitHub stars.
- Recognized as the de-facto standard Python load testing tool.
- Consistently featured in best-load-testing-tool roundups alongside JMeter, k6, and Gatling.
- Trusted by major organizations including Google, Microsoft, Riot Games, and Mozilla.