0

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 Answers1

0

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

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • thankyou. I have added DNS cache manager, but still the load is going to only one server. I tried with distributed load generators aswell but still the same. Kindly suggest if there is any other solution – prasanna Jun 10 '22 at 08:43