Reputation: 41
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
Upvotes: 2
Views: 1126
Reputation: 11426
It should be possible by monkey patching socket.create_connection()
using the solution described here, as Locust’s HttpUser uses requests
.
My original answer was deleted by a mod for some unknown reason. Lets hope it doesnt happen again...
Upvotes: 2