Jmeter loadtesting for WebApp -Load not distributed to all API servers

180 Views Asked by At

I have a webapp to be tested. The current configuration is with 4 API servers with hash method as load balancer.

    upstream example{
      hash $remote_addr consistent;
      server abc;
      server def;
       ---
       ---
}

While performing the load testing, im observing its hitting only 1 server and not all 4 servers. I also tried using load balancer methods as "ip_hash","round robin" and "sticky cookie srv_id;" as i have server with nginx-plus but the application is not working as it needs persistent server for completing 1 user session (uses sticky session).

Is there any way to distribute the load to all servers? Or Am I missing out something Kindly help me.

1

There are 1 best solutions below

1
On

Try adding a DNS Cache Manager to your Test Plan, it might be the case JMeter is caching the IP address of the one server and doesn't resolve it on subsequent iterations.

More information: The DNS Cache Manager: The Right Way To Test Load Balanced Apps