← Lessons

quiz vs the machine

Gold1350

Networking

The gRPC Streaming Modes

Unary, server, client, and bidirectional message flows.

5 min read · core · beat Gold to climb

More Than One Shape

A gRPC method is not limited to one request and one response. Because it runs over a multiplexed transport, it supports four streaming modes.

The Four Modes

Each mode differs in how many messages flow on each side.

  • Unary sends one request and gets one response, the classic call.
  • Server streaming sends one request and receives a stream of responses.
  • Client streaming sends a stream of requests and gets one response.
  • Bidirectional streaming sends and receives streams at the same time.

When To Use Each

The right mode follows the data flow you actually have.

  • Use server streaming to push many results, such as search hits or live updates.
  • Use client streaming to upload many chunks and get one summary.
  • Use bidirectional streaming for chat like or interactive exchanges.

All four modes still ride one logical call with one set of metadata and one final status. Streaming keeps a connection open, so you must handle backpressure and decide what happens if either side stops reading.

Key idea

gRPC offers unary, server streaming, client streaming, and bidirectional modes, letting you match the call shape to your data flow while still keeping one logical call with one final status.

Check yourself

Answer to earn rating on the learn ladder.

1. Which mode sends one request and many responses?

2. What do all four modes share?

3. Which mode suits an interactive chat style exchange?