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
- The problem
- The simple version
- What the contract looks like
- Four call shapes, because HTTP/2 has streams
- When it is the wrong tool
- Check your understanding