1

The virtual machine which run Locust has multiple network cards

Is there any way to set source request IP of Locust?

https://docs.locust.io/en/stable/configuration.html#command-line-options

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
wenger66
  • 31
  • 3

1 Answers1

1

It should be possible by monkey patching socket.create_connection() using the solution described here, as Locust’s HttpUser uses requests.

Requests, bind to an ip

My original answer was deleted by a mod for some unknown reason. Lets hope it doesnt happen again...

Cyberwiz
  • 11,027
  • 3
  • 20
  • 40