Flow Based Load Balancing

48 views
Skip to first unread message

gamer boii

unread,
Nov 8, 2021, 12:35:26 AM11/8/21
to grpc.io
I have a set up where I have 1 gRPC-client serving multiple backend gRPC-servers. Now I want that the packets(flows) in each RPC call are mapped to 1 particular instance of gRPC-server. The mapping could be based on a 5 tuple hash(Source IP, port, Dest IP, port, Protocol)
Is there some way to achieve this?  As I am of the idea that gRPC uses a single long-lived session?

yas...@google.com

unread,
Dec 1, 2021, 1:21:15 PM12/1/21
to grpc.io
I am not sure I completely understand the question but I'll give it a shot. On any new RPC (can either be unary or streaming), after load-balancing is done, gRPC ends up choosing a backend server for that RPC. If there isn't an existing transport connection to that backend, a connection is started and a stream is started on that connection. For the entire duration of the RPC, the stream remains on the same transport and hence the same backend.
Reply all
Reply to author
Forward
0 new messages