<p>I have a a 3 nodejs grpc server pods and a headless kubernetes service for the grpc service (returns all 3 pod ips with dns tested with getent hosts from within the pod). However all grpc client request always end up at a single server.</p>

<p>According to <a href="https://stackoverflow.com/a/39756233/2952128">https://stackoverflow.com/a/39756233/2952128</a> (last paragraph) round robin per call should be possible Q1 2017. I am using grpc 1.1.2</p>

<p>I tried to give <code>{"loadBalancingPolicy": "round-robin"}</code> as options for <code>new Client(address, credentials, options)</code> and use <code>dns:///service:port</code> as address. If I understand documentation/code correctly this should be handed down to the c-core and use the newly implemented round robin channel creation. (<a href="https://github.com/grpc/grpc/blob/master/doc/service_config.md" rel="noreferrer">https://github.com/grpc/grpc/blob/master/doc/service_config.md</a>)</p>

<p>Is this how round-robin load balancer is supposed to work now? Is it already released with grpc 1.1.2?</p>

<p>After diving deep into Grpc-c core code and the nodejs adapter I found that it works by using the option key <code>"grpc.lb_policy_name"</code>. Therefore, constructing the gRPC client with</p>

<pre><code>new Client(address, credentials, {"grpc.lb_policy_name": "round_robin"})
</code></pre>

<p>works.
Note that in my original question I also used <code>round-robin</code> instead of the correct <code>round_robin</code></p>

<p>I am still not completely sure how to set the <code>serviceConfig</code> from the service side with nodejs instead of using client (channel) option override.</p>
