What does gRPC typically offer over JSON/REST?
Options
- Human-readable payloads that are easy to inspect by hand
- Binary Protobuf over HTTP/2, strict contracts and streaming (Correct option)
- Native browser support, without any proxy in between
- No need for schemas, because messages describe themselves
Answer
Binary Protobuf messages over HTTP/2, strict contracts and bidirectional streaming
Why
gRPC defines services and messages in a .proto file and generates client and server code from it, so both sides share a strict contract.
Messages are compact binary (Protobuf) over HTTP/2, which is fast and supports streaming in both directions.
Great for internal service-to-service calls. Downsides: not readable by humans, and browsers need a proxy (gRPC-Web).
Remember
gRPC = fast, typed, binary; best between internal services.