A Connection Problem
gRPC runs over a long lived HTTP version two connection. A simple network load balancer sees one connection and pins all calls to one backend, which defeats balancing.
Two Ways To Balance
Because connections are sticky, gRPC needs balancing that understands individual calls.
- Client side balancing lets the client know all backend addresses and pick one per call, often round robin.
- Proxy balancing uses a smart proxy that understands gRPC and spreads calls across backends.
Why Discovery Matters
Either approach needs a way to learn the current set of healthy backends.
- A name resolver turns a service name into a list of addresses.
- A balancing policy chooses among those addresses per call.
- Backends that fail health checks are removed from the pool.
Client side balancing avoids an extra hop but pushes discovery logic into every client. A proxy centralizes that logic at the cost of one more network hop. The right choice depends on how much you want clients to know about your topology.
Key idea
Because gRPC pins calls to long lived connections, balancing must work per call through client side policies or a gRPC aware proxy, both relying on name resolution to track the healthy backend pool.