gRPC is a framework for calling methods on a remote service as if they were local functions. Services and messages are commonly defined with Protocol Buffers.
It is useful for typed service-to-service APIs and streaming blockchain data, where compact messages and explicit contracts matter.
How the gRPC protocol works
A .proto file defines services, methods and message types. Tooling generates client and server code, while data is commonly serialized as Protobuf and transported over HTTP/2. gRPC supports unary, server-streaming, client-streaming and bidirectional calls.
gRPC vs REST
| Criterion | gRPC | REST/JSON |
|---|---|---|
| Contract | Strict .proto schema | OpenAPI is optional |
| Payload | Usually binary Protobuf | Usually readable JSON |
| Streaming | Built into call models | Requires additional patterns |
| Browser use | gRPC-Web or gateway | Native fetch support |
gRPC in blockchain infrastructure
Some blockchain clients expose native gRPC services for blocks, state and subscriptions. Indexers can consume streams, but still need reconnect logic, backpressure, gap detection, reorg handling and catch-up queries.
Benefits and limitations
Benefits
Typed contracts, generated SDKs, compact payloads and streaming.
Limitations
Harder manual inspection, browser adapters and schema-compatibility work.
Choose gRPC
For controlled clients, service-to-service traffic and event streams.
Choose REST
For simple public web APIs and broad browser compatibility.
On this topic
RPC, WebSocket and REST under one key
Build the integration on the free plan, then move production traffic to the endpoint it needs — without running nodes in-house.
See the developer API