Cianplan

Level 1: Foundations · L1.1 APIs: REST, gRPC, GraphQL, WebSockets/SSE, webhooks

gRPC: fast typed calls between services

Explain Protobuf, HTTP/2 streaming and when gRPC beats REST.

12 min · Free

What you take away

  • Protobuf sends field numbers and binary values instead of repeated text field names, so payloads are several times smaller and far cheaper to parse.
  • A .proto file is the contract: both sides generate typed clients and servers from it, so a mismatch is a compile error rather than a runtime surprise.
  • gRPC runs on HTTP/2 streams, which gives four call shapes: unary, server streaming, client streaming and bidirectional.
  • You pay with browser support, human-readable payloads and URL-based HTTP caching — so gRPC is usually internal, REST at the edge.

How the class is laid out

  1. The problem
  2. The simple version
  3. What the contract looks like
  4. Four call shapes, because HTTP/2 has streams
  5. When it is the wrong tool
  6. Check your understanding