DNS caching using closed work

i’m using closed work load model to generate the load and using only one user for each scenario, i hit the load balancer and behind the load balancer i have 2 servers, when one of the server is removed all the requests should be going to the second server but the requests are still being sent to the first server.
JVM TTl is set as below
sun.net.inetaddr.ttl=0

.inject(rampUsers(1) during (FiniteDuration(60, TimeUnit.MINUTES))

need help in making sure the ip’s are not cached

i hit the load balancer and behind the load balancer i have 2 servers, when one of the server is removed all the requests should be going to the second server but the requests are still being sent to the first server

This has nothing to do with Gatling, nor actually and client connecting to your system. Clients only see and connect to the load balancer. How your load balancer is routing traffic to the servers is not something the client side has control over.

DNS resolution has nothing to do with your issue: Gatling resolves the address of your load balancer, not of the balanced servers.

You have to check how your load balancer works, but that’s not something we can help with.

Thanks slandelle.

i’m new to gatling and i’m trying to get around it. one of my colleague was investigating this for me and came back saying “The loadbalancer gives out two address on each DNS request, gatling requests are holding onto one, and not moving to the second at all, nor is it doing a new DNS lookup for new addresses”.

its a closed workload model and .inject(rampUsers(1) during (FiniteDuration(60, TimeUnit.MINUTES)).

any help is much appreciated.

  1. Check your Gatling version. Make sure to use the latest version 3.9.2). If you’re not, please upgrade.
  2. If you still have an issue, please provide a reproducer as required

its a closed workload model and .inject(rampUsers(1) during (FiniteDuration(60, TimeUnit.MINUTES)).

This is not a closed workload model, please properly read the documentation. This is one single virtual user, most likely looping for a very long duration.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.