gRPC & Protocol Buffers
gRPC is a high-performance RPC framework built on HTTP/2. Instead of JSON over REST, you define your API in a .proto file and generate strongly typed client and server code. Protocol Buffers serialize data in a compact binary format — smaller payloads and faster parsing than JSON.
gRPC supports four call types: unary (one request, one response), server streaming, client streaming, and bidirectional streaming. For internal microservice meshes where both ends run gRPC, it routinely outperforms REST. The downside: browsers need a gRPC-Web proxy, and debugging binary payloads is harder than reading JSON in DevTools.
Check your understanding
What does a .proto file buy you?Show answerHide answer
Answer
A typed contract and generated clients/servers — many shape mistakes become compile-time errors.Name one reason REST may still win at the edge.Show answerHide answer
Answer
Browser clients, human-readable JSON debugging, and no gRPC-Web/proxy requirement.Name four gRPC call types.Show answerHide answer
Answer
Unary, server streaming, client streaming, and bidirectional streaming.