Are you saying you want "connections" to multiple servers available at the same time vs only 1 server at a time (load balancing etc.)? If so, then yes, a channel per server is the way. What are you trying to achieve though (in terms use case)?
On Wednesday, September 18, 2019 at 2:30:46 PM UTC-4, Gautham Bhat wrote: > > I need to have a multiple servers(not back-end) how can I connect from > one client to multiple servers easily. The usual way is by creating stubs > to each servers(sepearte channel to each server) other than this any other > way of achieving this, > > On Wed, Sep 18, 2019, 11:55 PM 'Lidi Zheng' via grpc.io < > [email protected] <javascript:>> wrote: > >> What's the down side of creating multiple channels in your case? Can you >> describe more about your use case? >> >> On Wed, Sep 18, 2019 at 10:53 AM Gautham Bhat <[email protected] >> <javascript:>> wrote: >> >>> I don't want to use the load balancing policy, my use case is to >>> connect to different systems. Is it possible to connect through single stub >>> and channel? >>> >>> On Wed, Sep 18, 2019, 11:03 PM 'Lidi Zheng' via grpc.io < >>> [email protected] <javascript:>> wrote: >>> >>>> Yes. By "multiple servers", if you mean multiple backends of the same >>>> service, then it is possible. You can achieve this by: >>>> 1. Resolve the backend endpoint URL to multiple backend IP. >>>> 2. Set the load balance policy to "round_robin". >>>> >>>> You can take a look at the C++ example >>>> https://github.com/grpc/grpc/tree/master/examples/cpp/load_balancing. >>>> >>>> On Sunday, September 15, 2019 at 10:22:42 PM UTC-7, Gautham Bhat wrote: >>>>> >>>>> >>>>> Hi All, >>>>> I have an use case where a client connects to multiple servers, how >>>>> can I achieve this? Is it possible to use single channel for multiple >>>>> server connections ? Can someone please help. I am using C++. >>>>> >>>> -- >>>> 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] <javascript:>. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/grpc-io/7da8f049-d820-401f-b331-50207adbd135%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/grpc-io/7da8f049-d820-401f-b331-50207adbd135%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/grpc-io/CAMC1%3Djcr7KTw%3DBDVTkY_6X0d3%2B6Swx_8q-%3Dv99nRZNV0DD4J3g%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/grpc-io/CAMC1%3Djcr7KTw%3DBDVTkY_6X0d3%2B6Swx_8q-%3Dv99nRZNV0DD4J3g%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/880edda5-601a-4159-a6c1-4cd6107f72e2%40googlegroups.com.
