top of page

LearningMilestone by Anuradha Agarwal is a one-stop place for coding classes for kids and workshops for teachers and parents and self-paced courses, a blog for everyone to learn python programming with a personalized approach by an experienced instructor with a decade of experience in the software industry.

  • Writer's pictureAnuradha Agarwal

Setup Locust on Linux using Docker

This post details steps to set up locust in stand-alone & distributed mode with the help of docker.

To visit more such posts follow hashtag - #Locust #PerformanceTesting

Locust can be installed independently without docker by making sure we install dependencies first. With docker, we don't need to worry about dependencies. With one single command, we can make locust up both in standalone & distributed mode. With this post, we will be achieving the same.

Make sure you save generated private key at a safe place.

Change the permissions of the key as indicated here

Make sure instance gets into the running state. Note Public DNS from instance status window.

Use puttygen to convert private key file to.ppk format. Steps can be referred here

In case you don't have a Linux machine:


Follow commands:

  • Include the ec2-user on your docker set and execute the command without having to use sudo.

  • Right-click on top of terminal and select duplicate terminal to open a fresh new terminal

  • Type command :

  • You get to see a lot of information. Your docker is installed.

  • Next step is to pull official docker image for locust

  • Verify image is available on aws machine using docker image command:

Copy the script from here on a notepad and save the script as on your local machine. At this point, we will not try to understand the script.

  • Run below command:

  • This command will execute locust in standalone mode & locust UI could be opened at Http://<machineIp>:8089

  • To run locust in distributed mode extra port binding is required for master-slave communication:


281 views0 comments


bottom of page