What is gRPC
High-performance RPC framework
gRPC is a high-performance Remote Procedure Call (RPC) framework developed by Google for inter-service communication.
Key Features
- Protocol Buffers — binary data serialization format
- HTTP/2 — multiplexing, header compression
- Streaming — support for streaming data transfer
- Code generation — automatic client and server generation
Communication Types
- Unary — one request, one response
- Server streaming — one request, stream of responses
- Client streaming — stream of requests, one response
- Bidirectional streaming — two-way stream
Advantages
- Performance — up to 10x faster than REST/JSON
- Type safety — strict contracts via .proto files
- Polyglot — supports 10+ programming languages
Applications
Ideal for microservice architecture, real-time applications, and systems with high performance requirements.