Search code examples
amazon-ec2locust

Can Master Ec2 machine also act as worker machine?


I have a scenario where I have spinned up 2 ec2 instances. One acts as a master and the other as the worker. I am running the test in step load mode. I wanted to check if I can use the master to act as a worker (while running in step load- since I need the UI) or do I need to spin a new ec2 instance for the 2nd worker. Thanks!


Solution

  • Yes, you can run multiple instances of Locust on the same machine, including in EC2. The master won't act like a worker but if you separately run another Locust process as a worker just like the other EC2 instances, a worker process can connect to the master process running on the same instance in the same way.