What I meant by subsequently created channel is: does every call for 
CreateChannel/CreateCustomChannel perform an explicit DNS lookup, or 
subsequent  call may reuse a cached result of  successful resolution from 
the previous one?
My grpc service has 2 rpc methods. I want to be able to have multiple 
stubs, so all the rpc calls on the same stub are resolved to the same 
endpoint grpc server. But each stub is "connected" to a different endpoint. 
Thanks!

On Tuesday, March 5, 2019 at 2:58:10 PM UTC-5, Eric Anderson wrote:
>
> Is it possible to create a per-connection load balancing? In other words 
>> create a stub on the client side, so that dns resolution will be performed 
>> only on stub creation and all rpc calls on that stub will be invoked on the 
>> same grpc server?
>>
>
> In general, no, there isn't one that does this, although I guess you could 
> create one yourself. It is asking to cause outages it seems, though. What 
> is your actual goal/use-case?
>
> If I use "pick_first"(the default as far as I see), all the rpc calls on 
>> the same stub will go to the same server, which is good, but  from what I 
>> understand every subsequently created channel will also be resolved to the 
>> same server as soon as it is responsive.
>>
>
> Yes, pick_first is the default. Each time a connection needs to be made it 
> will iterate through the address list (only one at a time) and the first 
> address to successfully connect is used. When that connection is no longer 
> available or if the addresses change (and the existing connection's address 
> is no longer present) the process will be repeated.
>
> I don't really understand what you meant by "subsequently created channel 
> will also be resolved to the same server as soon as it is responsive." You 
> won't re-create the Channel for a stub. If you meant connection (like TCP), 
> then it is not guaranteed to resolve to the same server.
>

-- 
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/3fbd8da4-68f5-4293-92de-9676ba8aa67c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to