Short answer: choose Python workflows, understand the workload
Locust fits teams maintaining request journeys in Python, with task timing and connection behavior treated as part of the test design. The Locust README describes regular Python scenarios, a web interface and command-line execution. Those features suit an API team that wants to keep scenario logic in code review and version control. The adoption decision turns on what the scenario makes the target experience: user actions, requests and connections describe different parts of that workload.
Our November 29 npm installation attempt failed in 6.3 seconds, while the November 16 npm procedure completed in 6 seconds. The November 29 installation log records the failure; the earlier result appears in our harness measurements. The project homepage documents installation from PyPI with pip. These are distinct procedures, and the recommendation rests on the documented programming model and attributed operational reports rather than a successful load test in our container.
What people use locust for
EA/DICE load-tested Battlelog with Locust, according to the project homepage's account. Other users describe background polling, Graphite reporting and business workflows with explicit repetition counts. These examples identify concrete scenario requirements rather than a single capacity figure. The background-polling account is particularly useful when an application makes requests independently of a person's actions: its author describes a timing compromise instead of presenting the resulting traffic as exact.
| Who used it | What they did | Reported outcome |
|---|---|---|
| EA/DICE | Load-tested Battlelog | The homepage identifies Battlelog as a Locust user. Project homepage |
| GitHub commenter ghost's team | Combined user actions with periodic background requests | The team accepted timing inaccuracies and used one task to approximate application intervals. Issue #646 |
| GitHub user sanga's team | Published metrics to Graphite | The team reported using a patched Locust for about six months. Issue #34 |
| GitHub user TanmayNakhate | Ran business requests inside a Python framework | The commenter posted a repetition loop followed by runner shutdown. Issue #1085 |
In issue #646, ghost separated user-prompted actions from background requests needing fixed intervals. Their team used one task and accepted inaccuracies caused by request duration. That account gives scenario authors a decision to make: whether matching the application's sequence is enough, or whether the spacing of request starts is itself the measurement requirement. A scenario can preserve the order of operations while approximating their timing.
What happened when we ran it
Our November 29 installation attempt failed in 6.3 seconds with exit 128. The installation log records npm invoking Git against ssh://git@github.com/aleclarson/loglicious.git and receiving Permission denied (publickey). The run record identifies commit e390185d51d8, recipe quickstart-lib and a fresh unprivileged lab-node:22 container with 2 CPUs, 4 GB RAM, no published ports and no secrets. The failed operation was GitHub SSH authentication during npm installation.
The clone step took 1 second, followed by npm install locust@latest. Execution stopped at installation, and the failure finding names /work/home/.npm/_logs/2026-11-29T18_10_32_633Z-debug-0.log. The teardown record reports success. This sequence records a completed clone, a failed package-installation command and successful cleanup; it does not turn the SSH error into a diagnosis of Locust's Python runtime.
We measured a separate npm procedure on November 16 at commit 69f8d70. Installation succeeded in 6 seconds, with 0 dependencies recorded and 18 MB on disk. The harness measurements identify 3 CPUs, 8 GB RAM and image label lab-node:22. Build and tests were skipped because the harness detected no script or target. The table preserves each recorded result, including the directory scan, without treating a skipped step as a passing test.
| Harness observation | Recorded result | Interpretation |
|---|---|---|
| Detected ecosystem | Node/npm | The selected procedure used npm. |
| Install | Succeeded in 6 seconds; 0 dependencies recorded; 18 MB on disk | These figures describe that installation step. |
| Build | No script or target; skipped | The harness skipped the build step. |
| Tests | No script or target; skipped | The harness skipped the test step. |
| npm audit | 0 known vulnerabilities; 0 critical, high, moderate and low | These are the recorded npm audit results. |
| Repository scan | 431 files; about 45,299 source lines; 10.5 MB checked out | These figures describe the scanned checkout. |
| Automation scan | 2 CI workflow files; Dockerfile present; no tests directory detected | These are directory and file-detection results. |
Where people get stuck: timing and startup configuration
Locust wait times apply to tasks, not requests. The task guide describes delays after task execution, so a task containing several HTTP calls has several requests for each application of its wait policy. Its pacing example uses constant_throughput(2) with two requests per task and describes 4 requests per second per user. Keeping users, task iterations and requests as separate quantities prevents a scenario's task frequency from being mistaken for its request rate.
Request duration also enters the timing calculation. A task that takes longer than its intended interval reduces achieved throughput, while rapid ramp-up can exceed the intended target described in the task guide. For a workload specification, write down the required unit first: simultaneous users, task iterations, requests per second or live connections. Then count the requests inside each task and identify when the pause occurs, rather than relying on the user count to describe all four.
| Report | Relevant configuration | Outcome described |
|---|---|---|
| Request duration changes intervals | Task duration and wait policy | Ghost's team used one task and accepted inaccuracies. Issue #646 |
| Invalid integer for --master-port | LOCUST_MASTER_PORT environment variable | Cyberw identified a TCP URL consumed by ConfigArgParse. Issue #1226 |
| Windows distributed-run memory error | Windows and ZeroMQ | Mparent continued local work under WSL. Issue #1372 |
| Concurrent work inside a task | Gevent greenlets | Heyman demonstrated spawning greenlets. Issue #1251 |
The startup report concerns locustio/locust:0.13.5. In issue #1226, cyberw identified LOCUST_MASTER_PORT=tcp://10.110.169.34:5557 as the value consumed by ConfigArgParse. That gives the error a specific configuration trail even though the user had not supplied --master-port explicitly. The reported value entered through an environment variable, so the immediate troubleshooting target is effective configuration rather than the HTTP task code.
A shared pool can lower RAM and change the test
Cyberw warned that 10,000 user instances might produce fewer than 10,000 concurrent connections when they share a pool. In issue #2933, NicoAdrian reported roughly 30 GB of RAM for 30,000 users, then reported resolving the RAM problem with one shared pool. The maintainer explained that users would borrow each other's connections. The change therefore belongs in the workload definition as well as the generator's resource configuration.
A request-oriented workload and a connection-concurrency workload ask different questions of that pool. If the target condition is separately maintained connections, the number of user objects alone does not describe it. If the scenario models clients sharing connections, that reuse is part of the intended behavior. The maintainer's connection warning makes the tradeoff explicit: lowering generator memory can also change the population of connections reaching the service.
The same discussion identifies individually stored unique failures as another memory concern. Cyberw said changing failure messages may create many unique entries in issue #2933. A stable category such as "request too slow" keeps repeated instances under one description, while an exact changing duration can make each message different. That recommendation follows the storage behavior described in the reply; it separates an error's category from the duration being measured.
HTTP users need explicit requests and response checks
HttpUser keeps cookies but does not render pages or parse HTML to fetch resources, according to the HTTP user guide. The guide's browser distinction makes it suitable for explicitly modeled backend requests rather than a rendered page-load measurement. Login and item retrieval can be written as a sequence of calls. The scenario author decides which calls belong in that journey and which response conditions mean the journey succeeded.
The guide demonstrates a login request in on_start and a stable name for changing item URLs. Its request-naming example groups 10 different URLs under /item instead of making each identifier a separate statistics entry. That gives a report an operation-level label while preserving the request sequence in Python. Startup state, request grouping and response checks each affect how the reported journey should be interpreted.
The guide also labels har2locust beta and warns that it may generate incorrect locustfiles. Its HAR-generation guidance describes generating scenarios from browser recordings. A recording can supply a starting sequence of HTTP requests, but the generated Python still needs inspection for task structure, changing data and request names. The documented warning concerns the generated file itself, so a successful conversion is a starting artifact rather than a reason to trust every generated action.
Locust vs k6 and Apache JMeter
Locust uses Python scenarios, k6 has an embedded JavaScript engine, and Apache JMeter has a Java Test IDE. The Locust README, k6 README and Apache JMeter README describe these workflow differences. Language and editing preferences matter to the people maintaining scenarios; workload models and protocol clients determine what those scenarios can express. Those are useful shortlist criteria before comparing the maintenance cost of different test formats.
| Tool | Documented approach | Choose it when |
|---|---|---|
| Locust | Python scenarios, web UI and command-line execution | Python suits the maintainers and they can own task timing and connection behavior. |
| k6 | Embedded JavaScript engine, workload scenarios and Grafana Cloud integration | JavaScript or its listed workload models fit the requirement. |
| Apache JMeter | Java Test IDE, command-line execution and listed JDBC and JMS components | A graphical plan or those protocol components fit the workload. |
K6's README lists open models, closed models, constant RPS and fixed iterations among its scenario options. JMeter's README lists JDBC and JMS components and distinguishes its Test IDE from command-line load execution. A team requiring a particular scheduling model or database client can use those concrete features to narrow its choice. Familiar syntax helps with maintaining a scenario, but it does not replace selecting the workload model and client behavior the test requires.
What the other reviews get wrong
MakerStack says Locust has no cloud service and that users host everything themselves. Its Locust review conflicts with the Locust README's managed Azure offering. The project homepage uses different wording: it says a hosted cloud version is work in progress. Keeping those descriptions separate avoids turning the open-source licence into a claim that every operating option requires self-hosting. The README explicitly describes running Locust through a managed service.
MakerStack also describes flexibility as limited only by Python. Cyberw's asyncio reply in issue #1251 warns that most asyncio wrappers have issues coexisting with gevent. That is an execution-model qualification to the MakerStack compatibility claim. Importing a library and making its I/O cooperate with the task scheduler are different engineering steps. The relevant question is how the required client performs concurrent work, rather than whether Python can import it.
MakerStack's promise of zero learning curve for Python developers also needs correction. The task guide says wait times apply to tasks, and its two-request example explains the resulting request rate. Knowing Python helps someone read the scenario, but task frequency, requests per task and connection reuse remain workload-design decisions. The correction is specific: language familiarity does not supply the request accounting described by Locust's own guide.
FAQ
Locust's homepage documents pip installation, and its quickstart runs a Python scenario file with the locust command. These are the starting steps for the usage question found alongside comparisons and stopping questions in the recorded search suggestions. The answers below keep the basic startup procedure separate from historical stopping code and the issue requesting deterministic lifecycle coverage. Each addresses an operation someone actually asked about.
How do I use and run Locust?
Install with pip install locust, create locustfile.py, run locust and open http://localhost:8089. The homepage installation instructions name the PyPI command. The Locust 2.47.0 quickstart supplies the file name, command and web address, and says to replace /hello and /world with actual paths on the target service. Its example makes those two HTTP requests in sequence and then repeats; the interface asks for the server's host name.
How does Locust compare with JMeter and k6?
Choose between Python scenarios, k6's embedded JavaScript engine and JMeter's Java Test IDE according to the workload and its maintainers. The k6 README lists open and closed workload models, constant RPS and fixed iterations. The JMeter README lists JDBC and JMS components as well as HTTP. The comparison table above connects those documented features to a choice without assigning a performance winner.
How do I stop a Locust test?
TanmayNakhate's historical workaround ends a repetition loop with runners.locust_runner.quit(). In issue #1085, that call follows application workflow methods inside the commenter's Python framework. The example is useful for understanding the requested stopping condition: complete a defined number of workflow repetitions, then stop the runner. One repetition contains two named application methods, so the loop count and the service's HTTP request count are separate quantities.
How can I stop after an exact number of requests or task iterations?
Issue #1085 records a workflow loop followed by runner shutdown as one commenter's solution. The exact-count discussion also explains why elapsed time does not answer the same question: task duration varies. Before adapting a repetition strategy, define whether the count means completed workflows, task executions or individual requests. The historical example controls a workflow loop whose application methods determine the requests made inside each iteration.
Can I run every task and its startup and shutdown hooks once to validate a script?
Issue #1085 requests running all tasks and the startup and shutdown methods once. The lifecycle-coverage request is distinct from the commenter's workflow loop: it asks for coverage of the script's actions and hooks, rather than repetitions of two application methods. A short elapsed-time run answers a different question because task duration varies. The evidence boundary for a supported current mechanism is stated in the final section.
Locust here means the Python tool
This review covers locustio/locust, the Python load-testing project, rather than the separate Locust Review arts publication. The arts publication's homepage identifies the Locust Arts + Letters Collective. Using the repository name or "Locust Python load testing" distinguishes the software from that publication and the unrelated meanings appearing in search suggestions. Those unrelated results are entity matches, not evidence of demand for the load-testing tool.
What we have not tested yet
Neither npm procedure exercised the documented Python setup or a target-service workload. The recorded runs supply no Python dependency audit, passing Python test count, throughput, response latency, operating memory budget or distributed-capacity result. The lab-node:22 label leaves actual runtime and operating-system versions unresolved, and directory detection is not a test-coverage assessment. The November 16 and November 29 commits identify their respective procedures rather than a demonstrated test of release 2.47.0.
Issue #1085 requests running every task and its startup and shutdown hooks once, but the discussion does not establish a supported current mechanism. Its historical runners.locust_runner.quit() example also supplies no distributed exact-count guarantee. The operational excerpts do not support Ctrl+C instructions or standalone-versus-worker scope for self.environment.runner.quit(). Present-release reproduction of the Windows crash, environment-variable collision and asyncio interoperability remains untested. The shared-pool report does not prove the cause of the full RAM total, and the startup discussion supplies no completed upstream fix.
Browser integration, hosted execution, provider pricing, support responsiveness, UI access controls and network exposure remain outside these runs. The homepage's hosted-version wording and Azure's README description do not measure service availability or quality. No comparative workload supports a performance ranking or predictable linear scaling. Rendered layout, accessibility, resolved links, related links and recommendation modules also lack inspection results. A useful next experiment would install the Python package, run a known authenticated journey and record target traffic alongside generator resources, with task timing and connection reuse stated explicitly.


