1

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.

Kostas Demiris
  • 3,415
  • 8
  • 47
  • 85

2 Answers2

1

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.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I googled your answer Dmitri and found it really interesting to implement some asynchronous DNS lookup. Jmeter is not an option cause I dont know Java, I dont want to learn and all our tests are in Python :] – Kostas Demiris Jun 24 '15 at 10:37
  • Good to know that it was somehow helpful, hopefully you will be able to implement the workaround in Python. JMeter doesn't require Java knowledge by the way, but it will require Java to run. – Dmitri T Jun 24 '15 at 12:01
  • 1
    good that you decided not to try jmeter.Anything related to java is a pain and even if its the simplest in java world,it would be 10 times a pain compared to python. – crackerplace Oct 28 '16 at 20:15
1

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

cristian v
  • 1,022
  • 6
  • 8
  • I think I may have solved it by reconfiguring the ELB. I read the AWS documentation and found the setting 'Cross-AZ balancing' which I enabled. It sends the same amount of traffic to every instance no matter in which AZ it resides. The increase of the number of injectors is imperative though :] – Kostas Demiris Jul 17 '15 at 09:06