I am using Consul for Service Discovery; and supply list of servers in NameResolver.start(Listener listener) during Client startup.
- How can i add new Servers that Joined-in as Service Providers (in Consul)
- I am using Round Robin; and when one of the server dies; it keeps hitting the dead server
- Would you have a sample to retry on UNAVAILABLE exception? I just want to retry atleast once before giving up on the Client side.
Thank you in Advance
When the list of servers change (in Consul), call
NameResolver.Listener.onUpdate(), which you should be calling at least once already.The load balancing implementations and APIs are receiving a massive rework, which should greatly improve round robin.