What Is gRPC? High-Performance RPC Explained
gRPC is a high-performance remote procedure call framework that uses HTTP/2 and binary protocol buffers to let services call each other like local functions.
Where REST and GraphQL favor human-readable JSON over HTTP, gRPC favors speed and strict contracts. You define services and messages in a .proto file, generate client and server code, and calls travel as compact binary frames over HTTP/2. It is common in internal microservice traffic that pipelines build and deploy.
Contracts in protocol buffers
A .proto file declares the service methods and message shapes. Tooling generates strongly typed clients and servers in many languages, so the contract is enforced at compile time rather than by convention.
Built on HTTP/2
gRPC rides HTTP/2, which multiplexes many calls over one connection and supports streaming. This lowers latency for chatty service-to-service traffic compared with opening a connection per request.
Streaming modes
- Unary: one request, one response.
- Server streaming: one request, many responses.
- Client streaming: many requests, one response.
- Bidirectional streaming: both sides stream.
Status codes, but its own set
gRPC has its own status codes such as OK, UNAVAILABLE, and DEADLINE_EXCEEDED, distinct from HTTP codes. UNAVAILABLE typically signals a transient problem worth retrying, while INVALID_ARGUMENT is a permanent client error.
gRPC in CI/CD
Pipelines compile .proto files, run contract checks, and deploy services that speak gRPC internally. A deploy that changes a message shape incompatibly can break callers, which is why proto contract tests run in CI.
Transient gRPC failures
A momentary network drop surfaces as UNAVAILABLE or a deadline exceeded, both commonly retryable. On Latchkey runners, transient transport failures during service calls are retried automatically, while permanent argument or auth errors are surfaced as real failures.
Key takeaways
- gRPC is a binary RPC framework over HTTP/2 with contracts defined in protocol buffers.
- It has its own status codes, where UNAVAILABLE is typically retryable.
- CI runs proto contract checks because incompatible message changes break callers.