Hi All,

I am trying to use Eureka as a discovery server and do roundrobin 
clientside load balancing in the grpc client level.I have 3 GRPC server 
nodes registered in Eureka.

Here is the way I create a ManagedChannel in  the client.

EurekaClientConfig eurekaClientConfig = new DefaultEurekaClientConfig();
ManagedChannel channel =  ManagedChannelBuilder
               .forTarget("eureka://" + 
"service-aeroline-passenger-messaging")                
                .nameResolverFactory(new 
EurekaNameResolverProvider(eurekaClientConfig, "9071"))
                
.loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance())
                .usePlaintext(true)
                .build();

My question is is it ok to create one channel and share across the client 
application presuming that channel rotation across various nodes of GRPC 
server is taken care by
the ManagedChannel it self.  i.e if server1 goes down does the channel 
automatically diverted to server2 without creating a new channel object???

Thanks,
Isuru


-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/44852269-d9ff-4169-898d-001e395654d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to