How to optimize the distribution of load created by Locust

889 views Asked by At

I am load testing a web application using locustio. I am using locust in distributed mode and hitting 5 AWS instances with 5 slaves. I notice that the load created from each slave hits only a specific web server of the 5 AWS web servers.

  1. I guess it has to do with the IP that the load comes from.. Does it?

  2. Would it be a good approach to setup , let's say 50 slaves, so the distribution would be more even? I want to check that the Amazon Load Balancer kicks in and does a good job sending new requests to idle instances when the CPU load increases.

2

There are 2 answers

3
Dmitri T On

It looks like Locust does not perform DNS lookup of the host for each thread independently, I suggest raising an issue so it could be fixed in one of the future releases.

In the meantime you can consider switching to Apache Jmeter which has DNS Cache Manager feature designed specially for testing load-balanced apps.

1
cristian v On

99% is caused by the Load Balancer working only on the source IP address. Try to increase the number of the injectors to verify it but you should change the LB policy