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))
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.
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)).
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.