# Distributed execution, and per-virtual-user http configuration

**URL:** <https://community.gatling.io/t/distributed-execution-and-per-virtual-user-http-configuration/2379>\
**Category:** Gatling (Open-Source)\
**Created:** [June 23, 2015, 7:14pm UTC](https://community.gatling.io/t/distributed-execution-and-per-virtual-user-http-configuration/2379 "2015-06-23T19:14:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)\
**Post date:** [June 23, 2015, 7:14pm UTC](https://community.gatling.io/t/distributed-execution-and-per-virtual-user-http-configuration/2379/1 "2015-06-23T19:14:06Z")

</div>

The problems:

- The business wants to know what our response times look like to real-world clients
- The application is sensitive to source IP in its load balancer, so we need to have traffic coming from multiple IP addresses

Possible solutions:

- a cluster of instances of Gatling, e.g. running on AWS
- one gatling instance, routing its traffic through a number of web proxies, running on AWS

Do you prefer one over the other? And is the second one even doable? Would it be possible to make it so that each virtual user is configured to hit a different proxy server?

---

<div class="post-metadata">

**Author:** ![Carlos\_Torres1](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@Carlos\_Torres1](https://community.gatling.io/u/Carlos_Torres1)\
**Post date:** [July 8, 2015, 8:11pm UTC](https://community.gatling.io/t/distributed-execution-and-per-virtual-user-http-configuration/2379/2 "2015-07-08T20:11:25Z")

</div>

Currently, what I’ve been doing is solution #1, but on Rackspace (I work there). I have a Jenkins master configured with 2 extra beefier nodes as slaves. For isolation, each node can only run 1 build at a time. The slaves are targeted by labels. Then I configured a Job to use the Workflow plugin, and setup the job to this Workflow script [https://github.com/meteorfox/gatling-workflow/blob/master/gatling\_flow.groovy](https://github.com/meteorfox/gatling-workflow/blob/master/gatling_flow.groovy)

With that workflow script, it will configure both nodes in parallel, get the Gatling simulations, and start them at roughly the same time. Finally at the end it aggregates the simulation logs from each Gatling client,  
and generates a report.

It works kind of OK, if one of the slaves takes longer to start, then they will be out of sync. I’m working on a new primitive (i.e. rendezvous) for Workflow, to fix this problem.  
[https://github.com/meteorfox/workflow-plugin/tree/rendezvous-step](https://github.com/meteorfox/workflow-plugin/tree/rendezvous-step)

Alternatively, for solution #2 you could have them ‘whitelist’ the IP address of your load client(s) in the LB to go around the problem of stickiness. Another way is to use IP spoofing, here’s a tutorial to do that in JMeter [https://blazemeter.com/blog/using-ip-spoofing-simulate-requests-different-ip-addresses-jmeter](https://blazemeter.com/blog/using-ip-spoofing-simulate-requests-different-ip-addresses-jmeter) I assume there’s gotta be a way to accomplish the same in Gatling.

Cheers,  
Carlos

---

<div class="post-metadata">

**Author:** ![Carlos\_Torres1](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@Carlos\_Torres1](https://community.gatling.io/u/Carlos_Torres1)\
**Post date:** [July 8, 2015, 8:17pm UTC](https://community.gatling.io/t/distributed-execution-and-per-virtual-user-http-configuration/2379/3 "2015-07-08T20:17:00Z")

</div>

Recently localAddress was contributed that can help with the IP spoofing:  
[https://github.com/gatling/gatling/issues/2725](https://github.com/gatling/gatling/issues/2725)

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [July 9, 2015, 9:02am UTC](https://community.gatling.io/t/distributed-execution-and-per-virtual-user-http-configuration/2379/4 "2015-07-09T09:02:48Z")

</div>

The term “IP spoofing” is an abuse: AFAIK it’s impossible to do IP spoofing on the JVM.  
The only thing you can do is to bind on a valid local hostname. You can’t impersonate whatever hostname.
