title: Gatling with load balanced IP hash Nginx
body: <p>I'm load testing a Tomcat web application with 4 nodes. Those nodes are configured through Nginx with ip_hash:</p>
  
  <pre><code>ip_hash;
  server example:8888 weight=2 max_fails=3 fail_timeout=10s;
  server example:8888 weight=4 max_fails=3 fail_timeout=10s;
  server example:8888 weight=2 max_fails=3 fail_timeout=10s;
  server example:8888 weight=2 max_fails=3 fail_timeout=10s;
  </code></pre>
  
  <p>Anyway, I use Gatling for load and performance testing but everytime when I start a test all traffic is routed to one node.. Only when I change the load balance node to least_conn of round robin then the traffic is divided. But this application needs a persistent node to do the work. </p>
  
  <p>Is there any way to let Gatling route the traffic to all 4 nodes during a run? Maybe with a setup configuration? I'm using this setUp right now:</p>
  
  <pre><code>setUp(scenario1.inject(
    atOnceUsers(50),
    rampUsers(300) over (1800 seconds),
    ).protocols(httpConf)
  )
  </code></pre>
  
  <p>Thank you! </p>