Load balancing over pool of bidirectional streams

42 views
Skip to first unread message

Matt Mitchell

unread,
Apr 6, 2019, 1:21:41 PM4/6/19
to grpc.io
Hi. Does gRPC Java now provide ways to load balance across a set of StreamObservers? I came across this: https://github.com/grpc/grpc/blob/master/src/proto/grpc/lb/v1/load_balancer.proto and wondering if there might be a bidi LB example which implements that?

Thanks,
- Matt

Carl Mastrangelo

unread,
Apr 9, 2019, 12:38:35 PM4/9/19
to grpc.io
Not sure what you mean.    gRPC Channels are loadbalanced, but not the messages on individual RPCs.   If you repeatedly fire unary RPCs on your stub (or Channel) they will be load balanced across all the backends.

matt.m...@lucidworks.com

unread,
Apr 12, 2019, 12:14:48 AM4/12/19
to grpc.io
Ok, that's what I figured. I was looking into ways that a server might round-robin the messages it's sending to a set of client bidi streams. We're using a pretty naive approach, but it seems to work pretty well.

- Matt
Reply all
Reply to author
Forward
0 new messages