We would like to load test our site with 50-100k concurrent users, and I see locust can support thousands of users on one machine, but we would like to increase it. How can we setup locust on multiple machines to run the same test? Seems to hint to it on the README and documentation.
The master slave documentation can be found here:
http://docs.locust.io/en/latest/api.html?highlight=master
Another popular load testing tool, Locust is a mostly command line tool written in Python. Load tests are distributable and scalable, making it possible to ramp up a test simulating thousands of users quickly. It has the advantage that it's leaner than JMeter, and doesn't require large configuration files.
To do this, you start one instance of Locust in master mode using the --master flag and multiple worker instances using the --worker flag. If the workers are not on the same machine as the master you use --master-host to point them to the IP/hostname of the machine running the master.
In theory, yes. Due to the master/slave setup Locust uses you will be limited to what the master can process. However, we haven't seen any issues with that when load testing Battlelog (the online service for the Battlefield game series). For Battlefield 3, we simulated over 2 million concurrent users without problems. Exactly how many slave machines you need is hard to say since it depends on what they do and how idle / how much wait time you are planning.
You will need to setup machines running Locust slaves and have them connect to the master. A common setup is to run the master on one machine then run one slave process per CPU core on each slave machine. Using a cloud provider where you pay by the hour is highly recommended when doing large scale tests. We use AWS for our testing and we love it! Using the AWS Python library boto and Fabric can be a good combo for automating and setting up your slave machines and uploading your Locust scripts.
For more information on how to run Locust distributed set up see the new documentation page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With