gRPC (gRPC Remote Procedure Call) is an open-source, high-performance remote procedure call framework developed by Google and released in 2015, built on HTTP/2 transport and Protocol Buffers as the interface definition language and serialisation format. It supports four communication patterns—unary, server-streaming, client-streaming, and bidirectional streaming—enabling efficient, strongly typed, low-latency communication between services in polyglot distributed systems. gRPC generates client and server stubs in over a dozen programming languages from a single .proto service definition, making it the dominant choice for internal microservices communication in cloud-native architectures. Its binary encoding and multiplexed HTTP/2 connections deliver significantly lower overhead than REST/JSON at high throughput.

Content

  • gRPC was designed to solve a specific problem that arose at Google’s scale: how to provide a consistent, efficient, and language-agnostic mechanism for hundreds of internal services to call each other across a polyglot environment. Before gRPC, teams maintained bespoke RPC implementations or relied on REST with JSON, which imposed serialisation overhead and lacked formal schema enforcement. By requiring all services to define their interface in a .proto file, gRPC makes breaking changes explicit and enables automated generation of type-safe stubs in Go, Java, Python, C++, Rust, and many other languages.
  • HTTP/2 is central to gRPC’s performance characteristics. Unlike HTTP/1.1, which requires a new TCP connection per request-response cycle, HTTP/2 multiplexes multiple streams over a single persistent connection, eliminating head-of-line blocking and reducing connection establishment overhead. This makes gRPC particularly efficient for high-frequency service calls, where the cumulative cost of connection establishment in REST/HTTP/1.1 architectures becomes a significant bottleneck. Combined with Protocol Buffers’ compact binary encoding—typically three to ten times smaller than equivalent JSON—gRPC reduces both latency and bandwidth consumption.
  • gRPC’s four communication modes address different architectural needs. Unary RPCs mirror traditional request-response semantics and replace most REST endpoints in inter-service communication. Server-streaming allows a single client request to receive a continuous stream of responses, useful for subscription feeds and progress notifications. Client-streaming allows a client to send a sequence of messages before the server responds—appropriate for chunked uploads or sensor data ingestion. Bidirectional streaming enables full-duplex communication over a single connection, supporting interactive use cases such as real-time collaborative editing and live telemetry.
  • In the Cloud-Native Applications ecosystem, gRPC integrates tightly with Kubernetes through service meshes such as Istio and Linkerd, which intercept gRPC traffic to provide circuit breaking, retries, and distributed tracing without application-level changes. The Envoy proxy, the most widely deployed data plane for service meshes, has native gRPC support and can transcode between gRPC and REST, enabling gradual migration of legacy REST services. gRPC’s adoption extends beyond microservices into mobile and IoT contexts, where its efficient encoding reduces battery and bandwidth consumption compared to REST/JSON alternatives.