Overview
gRPC is an RPC framework from Google that has gained traction for service-to-service communication. This article organizes gRPC at the level you need to make an adoption decision: when to choose it and what trade-offs it brings. It focuses on design decisions rather than implementation details.
For a Go implementation walkthrough, see the separate post What is gRPC? A Practical Introduction to gRPC with Go. This article sticks to adoption and operations.
Key characteristics of gRPC
Three points matter when you weigh adoption.
It follows the RPC model
gRPC calls a remote method as if it were a local function (Remote Procedure Call). Where REST centers on resources, gRPC centers on operations.
It builds on HTTP/2
gRPC runs on HTTP/2 and uses header compression, multiplexing, and bidirectional streaming directly. A single connection handles many requests in parallel, which keeps communication efficient.
It defines contracts with Protocol Buffers
You describe the API in Protocol Buffers, an interface definition language. The .proto file becomes the contract between services, and you generate server and client code from it. It serializes to binary, so payloads stay smaller and faster than JSON.
gRPC offers four communication styles.
- Unary (one request, one response)
- Server streaming (one request, many responses)
- Client streaming (many requests, one response)
- Bidirectional streaming
Handling streaming across languages is a trait REST lacks.
Where it fits and where it does not
Where it fits
- Internal service-to-service traffic that needs low latency and high throughput
- Polyglot environments, since you generate code for each language from one
.protoand keep contracts aligned - Workloads that need streaming, such as real-time updates or sequential transfer of large data
- Cases that demand a strong typed contract, where the schema comes first and breaking changes surface early
Where it does not fit
- APIs that browsers call directly. Browsers cannot use every HTTP/2 feature, so you add a layer such as gRPC-Web or gRPC-Gateway
- Public APIs. When outside developers consume them, REST or GraphQL tends to offer friendlier tooling and docs
- Situations where you want to read the traffic directly. The binary format makes
curlchecks and log inspection harder
Trade-offs
This table pairs each benefit with its cost.
| Aspect | Benefit | Cost |
|---|---|---|
| Contract | The .proto acts as one contract, and code generation reduces drift |
You must manage the schema and keep it compatible |
| Performance | Binary plus HTTP/2 keeps overhead low | No native browser support, so you add a layer |
| Features | Bidirectional streaming works without extra setup | The learning curve is steep |
| Visibility | Strong typing catches mistakes early | Binary traffic makes debugging and monitoring harder |
Operational concerns
These points start to matter once you run gRPC in production.
- Load balancing: gRPC keeps connections open, so an L4 balancer skews load. Prefer L7 balancing or client-side balancing
- Schema compatibility: set rules that keep backward compatibility, such as never reusing field numbers and never deleting existing fields
- Observability: because the traffic is binary, build in metrics and tracing from the design stage. Instrumentation such as OpenTelemetry becomes a baseline
- Deployment: confirm that the proxy or load balancer terminating HTTP/2 supports it
Choosing between REST, gRPC, and GraphQL
- REST fits public APIs, simple CRUD, and cases that value human readability or HTTP caching
- gRPC fits internal service-to-service calls, low latency, streaming, and shared contracts across languages
- GraphQL fits clients that fetch exactly the data they need, and aggregation across several APIs
The three are not exclusive. A common layout uses REST or GraphQL at the edge and gRPC internally.
Summary
A gRPC adoption decision comes down to a few questions.
- Does a browser call this path directly? If so, consider REST or gRPC-Gateway
- Do you need low latency, several languages, or streaming? If so, gRPC is a strong fit
- Can you absorb the operational cost of schema management and observability?
When internal service traffic values performance and a strong contract, gRPC makes a powerful option. When browser support or readability matters, REST or GraphQL reads more naturally. Choose based on your requirements and your operational capacity.