On Thu, Oct 27, 2016 at 5:51 AM, Alex Lamaison <a...@thoughtmachine.net> wrote:
> I'm trying to understand the ways of load balancing gRPC calls and the > trade offs. > > What is the current recommended way of load-balancing gRPC requests? > There is no specific recommendation as it would depend on your deployment scenario and scale etc. If you want maximum performance client-side is the best option but proxy based LB can help with deployment complexity > > How do you load balance gRPC at your company? > > There seem to be three ways to do it: > - Client side - the client maintains a pool of channels (possibly obtained > through a L4 load balancer like ELB to spread them across backend servers) > and chooses a new channel from that pool on each request > - Mixed - as per https://github.com/grpc/grpc/blob/master/doc/load- > balancing.md, the client and server cooperate. Has anyone implemented > this scheme? > These are both client-side LB just with different forms of resolving the working set of servers to talk to. The former being typical DNS-LB has some limitations that the latter works around > - L7 - Clients open a single channel to application-level load balancers > like envoy or linkerd. The load balancer balances the gRPC requests across > backend servers and forward the responses back to the client. > > I'm assuming that all three methods avoid the need to renegotiate a > channel on every request. Using a fresh channel would load-balance using > an L4 load balancer but would incur overhead. Is that correct? > Correct, channels multiplex requests so theres no need to have a channel per request (unlike HTTP/1.1 which would require this) > > Comments an corrections are welcome. > > Thanks, > Alex > > -- > 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 grpc-io+unsubscr...@googlegroups.com. > To post to this group, send email to grpc-io@googlegroups.com. > 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/40aed58b-f889-4654-b1a2-5eb076fc1976%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/40aed58b-f889-4654-b1a2-5eb076fc1976%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. 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/CADQ0XY0Wzk7L8%3Db9i-yzOtA3ftieAkLzO2k6muAuP65%3DkQtCOg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.