Networking & Protocols (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is gRPC Streaming (Client, Server, Bidirectional)?
senior LevelCLIgRPCMicroservices
In Simple Words: Leveraging HTTP/2 multiplexed streams, gRPC supports 4 communication patterns:
- Unary: Simple request-response.
- Server Streaming: Client sends one request; server streams back a continuous sequence of messages (e.g. real-time stock ticker).
- Client Streaming: Client streams a sequence of messages; server responds with a single summary (e.g. uploading a large file in chunks).
- Bidirectional Streaming: Both client and server stream independent read/write messages concurrently over a single HTTP/2 stream.