I have a grpc client pointing to a url which resolves to 2 IP addresses. The problem is when one server node goes down and then gets back, it's not picked by the grpc client and all the load goes to a single node.
I tried recommendation to change networkaddress.cache.ttl propetty but it didn't help.
My code (in Scala)
java.security.Security.setProperty("networkaddress.cache.ttl", "30")
System.setProperty("networkaddress.cache.ttl", "30")
val channel = NettyChannelBuilder.forAddress(host, port).nameResolverFactory(
new DnsNameResolverProvider).usePlaintext().build
val client = MyServiceGrpc.newStub(channel)
grpc version: 1.32.1