gRPC
tags :
Protocol #
A high performance, Open Source universal RPC framework URL
gRPC is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services.

gRPC is a CNCF incubation project
Use Cases #
Good for inter-service communication synchronous within microservices
Supported languages #
Select a language to get started:
REST vs gPRC #
| Attribute | gRPC API | REST API |
|---|---|---|
| What is it? | A framework for creating APIs based on the RPC (Remote Procedure Call) model. | A set of rules for structuring data exchange between client and server. |
| Design Approach | Service-oriented. Requests the server to perform a service, affecting or not affecting resources. | Entity-oriented. Requests involve creating, sharing, or modifying resources. |
| Communication Model | Supports unary, server-streaming, client-streaming, and bidirectional streaming. | Primarily unary, involving single requests and responses. |
| Implementation | Requires gRPC software on both client and server. | Can be implemented in various formats, no common software necessary. |
| Data Access | Accessed through service (function) calls. | Accessed through multiple URL endpoints representing resources. |
| Data Returned | Fixed return type as defined in the Protocol Buffer file. | Typically in a fixed structure like JSON, defined by the server. |
| Client-Server Coupling | Tightly coupled, needs the same Protocol Buffer file on both client and server. | Loosely coupled; client and server need not be aware of each other’s internal details. |
| Code Generation | Has built-in support for automatic code generation. | Typically requires third-party tools for automatic code generation. |
| Bidirectional Streaming | Supports bidirectional streaming. | Does not support bidirectional streaming. |
| Best Suited for | High-performance, data-heavy microservice architectures. | Simple, well-defined resource-based services. |