Apache 2.0Open-source RPC framework
gRPC - Fast, Typed Communication Between Services
gRPC is an open-source framework for fast, strongly typed communication between services. It pairs Protocol Buffers with HTTP/2 and generates client and server code for many popular programming languages.
- Apache License 2.0
- Built on HTTP/2
- CNCF project
- Source on GitHub
What Is gRPC?
gRPC lets one program call a method on another machine almost as simply as calling a local function.

gRPC is a high-performance remote procedure call (RPC) framework. You describe a service and its messages in a .proto file, and the framework generates code that sends requests, receives replies and reports errors in a consistent way across languages.
Under the hood, messages are encoded with Protocol Buffers and carried over HTTP/2, which supports many concurrent calls on one connection and long-lived streams. That combination makes gRPC a popular choice for microservices, mobile backends and infrastructure software.
Google released the framework as open source in 2015, and it is now hosted by the Cloud Native Computing Foundation, with implementations maintained in public repositories on GitHub.
Core Features of gRPC
gRPC combines a typed contract, an efficient transport and production-ready tooling in a single framework.
Protocol Buffers Contracts
Services and messages are defined once in a .proto file, giving every client and server the same strongly typed contract.
HTTP/2 Transport
Calls share multiplexed connections with header compression and flow control, reducing connection overhead between busy services.
Four Call Types
Unary, server-streaming, client-streaming and bidirectional-streaming methods cover request–reply and continuous data flows.
Code Generation
The protoc compiler and language plugins generate client stubs and server base classes, removing hand-written networking code.
Deadlines and Cancellation
Clients set a time limit for each call, and cancellation propagates to the server so abandoned work stops promptly.
Interceptors and Metadata
Interceptors add logging, metrics, tracing and authentication in one place, while metadata carries headers alongside each call.
Pluggable Authentication
TLS encrypts traffic, and credentials such as tokens can be attached per call or per channel through the credentials API.
Name Resolution and Load Balancing
Built-in resolvers and balancing policies spread calls across server instances without an extra hop in many deployments.
Health Checking and Reflection
A standard health service supports orchestrators and load balancers, and reflection lets tools discover methods at runtime.
How gRPC Works in Four Steps
gRPC development follows the same short loop in every language, from contract to working remote call.
- Step one
Define the Service
Describe methods and messages in a
.protofile using Protocol Buffers syntax. - Step two
Generate the Code
Run
protocwith a language plugin to create typed stubs and server base classes. - Step three
Implement the Server
Fill in each method with business logic, register the service and listen on a port.
- Step four
Call From a Client
Open a channel, create a stub and call remote methods as though they were local functions.
Supported Languages and Packages
gRPC implementations are maintained for many languages, each installed through its usual package manager or build tool.
pip install grpcio grpcio-toolsio.grpc:grpc-netty-shaded via Maven or Gradlego get google.golang.org/grpcnpm install @grpc/grpc-jsdotnet add package Grpc.Net.Clientgem install grpcpecl install grpcdart pub add grpcOperating system support, including Linux, macOS, Windows, Android and iOS, varies by language. Check each repository's README for current requirements.
Where gRPC Fits Best
gRPC is chosen wherever strict contracts, efficient calls or streaming data matter more than browser-friendly text APIs.
Service-to-Service Communication
Internal services benefit most from typed contracts and efficient binary messages. Teams agree on a .proto file, generate code on both sides and catch interface mismatches during builds rather than in production.
- Typed requests between backend services
- Consistent errors through shared status codes
- Deadlines that propagate across call chains
- Interceptors for tracing every hop
Mobile Clients and APIs
Mobile applications gain from compact payloads and long-lived connections, which suit variable networks. The Java implementation supports Android with a lightweight transport, and Swift and Dart implementations serve iOS and Flutter teams.
- Smaller payloads on metered connections
- Generated clients for Android and iOS
- Streaming for live updates in the app
- One contract shared with backend teams
Real-Time and Streaming Data
Streaming methods keep a single call open while messages flow in one or both directions. This pattern suits chat, telemetry, progress reporting and live dashboards without adding a second protocol.
- Server streaming for feeds and results
- Client streaming for uploads in chunks
- Bidirectional streams for chat and control
- Back-pressure through HTTP/2 flow control
Systems Built in Several Languages
Organizations often run services written in Go, Java, Python and Node.js side by side. A shared contract with generated code in each language keeps them compatible without hand-maintained client libraries.
- Same contract across every language
- Generated clients removed from manual upkeep
- Field numbering for safe schema evolution
- Common tooling such as grpcurl for all services
Infrastructure and Control Planes
Cloud-native infrastructure frequently relies on gRPC for control traffic. The Kubernetes Container Runtime Interface and the etcd v3 API both define their interfaces with gRPC, which shows its suitability for low-level system components.
- Plugin interfaces between system components
- Efficient calls for frequent control traffic
- Well-defined contracts for extension points
- Streaming watches for configuration changes
Why Teams Choose gRPC
gRPC brings practical gains to day-to-day engineering work, beyond its list of technical features.
Fewer Integration Errors
Generated types make mismatched fields or method names visible at compile time in statically typed languages.
Leaner Network Traffic
Binary encoding and shared connections usually mean less data and fewer handshakes than text-based APIs.
Safer Schema Evolution
Numbered fields allow new data to be added while older clients keep working unchanged.
Shared Language for Teams
A single contract becomes the agreed reference for backend, mobile and platform engineers.
Consistent Error Handling
Standard status codes give every language the same vocabulary for failures and retries.
Simpler Observability
Interceptors and metadata provide natural hooks for metrics, logs and distributed tracing.
Set Up gRPC in Minutes
gRPC setup follows four short stages; choose your language to see the exact commands.
Install the Runtime
Add the gRPC library for your language through its usual package manager.
Add the Code Generator
Install protoc support, bundled for Python and handled by build plugins for Java.
Generate the Stubs
Compile your
.protofile into client and server code for the project.Run and Test
Start the server, call it from a client and confirm replies with grpcurl if needed.
# Install the runtime and code generator
$ pip install grpcio grpcio-tools
# Generate messages, type hints and service stubs
$ python -m grpc_tools.protoc -I. --python_out=. --pyi_out=. --grpc_python_out=. helloworld.proto
# Start the server
$ python greeter_server.py# Clone the Java implementation and build its examples
$ git clone https://github.com/grpc/grpc-java.git
$ cd grpc-java/examples
$ ./gradlew installDist
# Run the example server
$ ./build/install/examples/bin/hello-world-server# Add the module and the code generator plugins
$ go get google.golang.org/grpc
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# Generate Go code
$ protoc --go_out=. --go-grpc_out=. helloworld.proto# Install the pure JavaScript implementation and loader
$ npm install @grpc/grpc-js @grpc/proto-loader
# Load the .proto file at runtime in your code:
# protoLoader.loadSync("helloworld.proto")
$ node greeter_server.js# Clone a release tag together with its submodules
$ git clone --recurse-submodules -b <release-tag> https://github.com/grpc/grpc
$ cd grpc && mkdir -p cmake/build && cd cmake/build
$ cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF ../..
$ make -j 4 && make installDownload gRPC
gRPC source code downloads directly from the grpc/grpc repository on GitHub as a ZIP archive.
gRPC Source Code Archive
The archive contains the C-based core, the C++, Python, Ruby, PHP and Objective-C implementations, runnable examples and project documentation.
Download gRPCDownload and Usage Safety
gRPC is a development library, so safe use comes down to trusted sources and careful version management.
Use Trusted Sources
Download only from the grpc organization on GitHub or from official package registries for your language.
Prefer Tagged Releases
The archive here tracks the development branch; production projects should pin a published release.
Pin Your Dependencies
Lock files and fixed versions keep builds reproducible and make unexpected changes easy to spot.
Apply Updates Promptly
Read release notes and security advisories, then upgrade libraries regularly across services.
Strengths and Limitations
gRPC suits many systems well, yet a balanced view helps you decide where it belongs in yours.
Pros
- Strongly typed contracts generated for many languages
- Efficient binary messages over multiplexed HTTP/2 connections
- Built-in streaming in both directions
- Deadlines, cancellation and status codes shared by every implementation
- Free, open-source software under the Apache License 2.0
Cons
- Browsers need gRPC-Web and a compatible proxy
- Binary payloads are harder to inspect than plain JSON
- Protocol Buffers and code generation add a learning curve
- Proxies and load balancers must support HTTP/2 end to end
- Less natural than REST for public APIs that rely on HTTP caching
gRPC Release History
gRPC has grown from a single company project into a widely adopted community framework.
- 2015
Released as Open Source
Google published gRPC, drawing on years of experience with its internal RPC system, Stubby.
- 2016
Version 1.0
The 1.0 release marked the framework as ready for general production use.
- 2017
Joined the CNCF
gRPC became a Cloud Native Computing Foundation project, broadening community governance.
- Today
Regular Releases
Each repository publishes new versions on its GitHub Releases page; check there for the current version and notes.
Common Problems and Quick Fixes
gRPC problems usually reveal themselves through status codes, which point straight to a likely cause.
UNAVAILABLE on Every Call
Confirm the server is running on the expected host and port, and that both sides agree on TLS or plaintext.
DEADLINE_EXCEEDED
Measure server latency first, then adjust the deadline or optimize slow downstream work.
UNIMPLEMENTED Method
Check package and service names in the .proto file, regenerate code and register the service.
Message Too Large
Many implementations default to a 4 MB receive limit; raise it on both sides or stream the data in chunks.
C++ Build Fails From the ZIP
Archives exclude submodules; clone with --recurse-submodules before running CMake.
pip Compiles grpcio Slowly
Upgrade pip and use a supported Python version so that a prebuilt wheel is selected.
Frequently Asked Questions
gRPC questions from developers, grouped into fundamentals and practical setup.
gRPC Basics
gRPC is used for fast, strongly typed communication between services, mobile apps and backends, and infrastructure components. It is especially common between internal microservices.
gRPC stands for "gRPC Remote Procedure Calls", a recursive name. The project also gives the "g" a different playful meaning in each release.
Yes. gRPC is open-source software released under the Apache License 2.0, so it can be used in personal and commercial projects without charge.
gRPC began at Google and is now a Cloud Native Computing Foundation project, maintained by contributors from Google and the wider community.
gRPC uses typed service contracts, Protocol Buffers and HTTP/2 with built-in streaming. REST models resources with URLs and usually exchanges JSON, which is easier for browsers and public APIs.
Protocol Buffers are the default and best-supported format. Other serialization formats are possible through custom marshallers, but most tooling and documentation assume Protocol Buffers.
Implementations exist for C++, Java, Kotlin, Go, Python, Node.js, C#, Ruby, PHP, Dart, Swift and Objective-C, among others.
The four types are unary, server streaming, client streaming and bidirectional streaming, all declared in the .proto service definition.
Not with native gRPC. Browser applications use gRPC-Web together with a compatible proxy such as Envoy, or call JSON endpoints produced by transcoding.
gRPC supports TLS encryption and per-call credentials such as tokens. Security depends on configuration, so production services should enable TLS and authentication.
Download and Setup
The source code is hosted in the grpc organization on GitHub. The download section on this page links to the grpc/grpc source archive, and language packages are available from each official registry.
It downloads a ZIP archive of the master branch of grpc/grpc directly from GitHub, containing the C-based core, several language implementations, examples and documentation.
GitHub archives exclude Git submodules, so the dependencies under third_party are missing. Clone the repository with --recurse-submodules to build the C++ core.
Run pip install grpcio grpcio-tools, ideally inside a virtual environment. The tools package includes the protoc compiler and the Python plugin.
Add the io.grpc transport, protobuf and stub artefacts through Maven or Gradle, and configure the protobuf build plugin to generate code.
Run go get google.golang.org/grpc and install the protoc-gen-go and protoc-gen-go-grpc plugins for code generation.
It depends on the language. Python bundles it in grpcio-tools and Java build plugins download it, while Go and C++ workflows typically need protoc installed.
gRPC runs on Linux, macOS and Windows, with mobile support on Android and iOS. Exact platform support varies by language, so check each repository.
Use a tool such as grpcurl. With server reflection enabled, it can list services, describe methods and send JSON requests from the terminal.
Follow the GitHub Releases page for your language, read release notes before upgrading and keep all gRPC packages in a project on matching versions.