Spring / Spring gRPC Interview Questions
What is a gRPC channel, and how does it differ from a single HTTP connection?
A ManagedChannel is a virtual, logical connection to a gRPC endpoint. It is not tied to exactly one TCP socket - internally it can manage connection setup, reconnection, and (with the right resolver/balancer configuration) distribute calls across multiple backend addresses.
Application code never talks to raw sockets directly; instead it builds a stub (blocking, async, or future) on top of a channel, and the channel handles the underlying HTTP/2 connection lifecycle transparently. Because creating a channel involves real connection setup cost, channels are meant to be long-lived and reused across many calls rather than created per request - in Spring, the @GrpcClient-managed stub already does this for you.
More Related questions...