Reputation: 11
I am using Consul for Service Discovery; and supply list of servers in NameResolver.start(Listener listener) during Client startup.
Thank you in Advance
Upvotes: 1
Views: 1256
Reputation: 2248
In here I use consul as my registry. It works correctly.
It contain both example of Eureka and consul.
https://github.com/WThamira/gRpc-spring-boot-example
Upvotes: -1
Reputation: 11
I wrote my own LoadBalancer; and @Override pickTransport() to RoundRobin healthy gRPC servers from Consul.
Upvotes: 0
Reputation: 26474
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.
Upvotes: 0