title: GRPC client side load balancing : One of node goes down
body: <p>For Grpc service client side load balancing is used.</p>
  
  <p><strong>Channel creation</strong> </p>
  
  <pre><code>ManageChannelBuilder.forTarget("host1:port,host2:port,host3:port").nameResolverFactory(new CustomNameResolverProvider()).loadBalancerFactory(RoundRobinBalancerFactory.getInstance()).usePlaintText(true).build();
  </code></pre>
  
  <p>Use this channel to create stub.</p>
  
  <p><strong>Problem</strong> </p>
  
  <p>If one of the service [host1] goes down then whether stub  will handle this scenario and not send any further request to service [host1] ?</p>
  
  <p>As per documentation at <a href="https://grpc.io/blog/loadbalancing" rel="nofollow noreferrer">https://grpc.io/blog/loadbalancing</a> </p>
  
  <blockquote>
    <p>A thick client approach means the load balancing smarts are
    implemented in the client. The client is responsible for keeping track
    of available servers, their workload, and the algorithms used for
    choosing servers. The client typically integrates libraries that
    communicate with other infrastructures such as service discovery, name
    resolution, quota management, etc.</p>
  </blockquote>
  
  <p>So is it the responsibility of ManagedChannel class to maintain list of active server or application code needs to maintain list of active server list and create instance of ManagedChannel every time with active server list ?</p>
  
  <p><strong>Test Result</strong></p>
  
  <p>As per test if one of the service goes down there is no impact on load balancing and all request are processed correctly. </p>
  
  <p>So can it be assumed that either stub or ManagedChannel class handle active server list ?</p>
  
  <p>Answer with documentation will be highly appreciated.</p>