gRPC lets you define four kinds of service method. Unary RPCs are the simplest: the client sends a single request and gets a single response back, just like a normal function call. Server streaming RPCs return a stream in response to one client request; the client reads from the returned stream until there are no more messages, and gRPC guarantees message ordering within an individual call. Client streaming RPCs let the client write a sequence of messages over a stream, then wait for the server to read them and return its single response, again with ordering guaranteed. Bidirectional streaming RPCs give both sides a read-write stream; the two streams operate independently, so client and server can read and write in whatever order they like — waiting for all client messages before responding, or alternating a read and a write in ping-pong fashion — while the order of messages in each stream is preserved. Choose the simplest kind that fits the data flow; preferring unary unless a message sequence is genuinely needed is Koskamo editorial guidance. Scope: gRPC. Reviewed October 4, 2026.
The four kinds of RPC
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- grpc.io
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.