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
Glowing service nodes exchanging remote procedure calls over a network
About

What Is gRPC?

gRPC lets one program call a method on another machine almost as simply as calling a local function.

Cloud-based application communicating with multiple backend services

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.

2015Open-sourced by Google
CNCFHosting foundation
Apache 2.0Software licence
Features

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 It Works

How gRPC Works in Four Steps

gRPC development follows the same short loop in every language, from contract to working remote call.

  1. Step one

    Define the Service

    Describe methods and messages in a .proto file using Protocol Buffers syntax.

  2. Step two

    Generate the Code

    Run protoc with a language plugin to create typed stubs and server base classes.

  3. Step three

    Implement the Server

    Fill in each method with business logic, register the service and listen on a port.

  4. Step four

    Call From a Client

    Open a channel, create a stub and call remote methods as though they were local functions.

Compatibility

Supported Languages and Packages

gRPC implementations are maintained for many languages, each installed through its usual package manager or build tool.

LanguageRepositoryPackage or setup
Pythongrpc/grpcpip install grpcio grpcio-tools
Java, Kotlin, Androidgrpc/grpc-javaio.grpc:grpc-netty-shaded via Maven or Gradle
Gogrpc/grpc-gogo get google.golang.org/grpc
Node.jsgrpc/grpc-nodenpm install @grpc/grpc-js
C++grpc/grpcBuild with CMake or Bazel
C# and .NETgrpc/grpc-dotnetdotnet add package Grpc.Net.Client
Rubygrpc/grpcgem install grpc
PHPgrpc/grpcpecl install grpc
Dartgrpc/grpc-dartdart pub add grpc
Swiftgrpc/grpc-swiftSwift Package Manager

Operating system support, including Linux, macOS, Windows, Android and iOS, varies by language. Check each repository's README for current requirements.

Use Cases

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
Benefits

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.

Installation

Set Up gRPC in Minutes

gRPC setup follows four short stages; choose your language to see the exact commands.

  1. Install the Runtime

    Add the gRPC library for your language through its usual package manager.

  2. Add the Code Generator

    Install protoc support, bundled for Python and handled by build plugins for Java.

  3. Generate the Stubs

    Compile your .proto file into client and server code for the project.

  4. 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
Download

Download gRPC

gRPC source code downloads directly from the grpc/grpc repository on GitHub as a ZIP archive.

Glowing source code package representing a gRPC installation

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.

  • ZIP file generated by GitHub from the master development branch.
  • Released under the Apache License 2.0.
  • Git submodules are not included; clone with --recurse-submodules to build C++.
  • For application work, language packages such as grpcio or grpc-java are usually simpler.
Download gRPC
Safety

Download 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.

Pros and Cons

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
Release Information

gRPC Release History

gRPC has grown from a single company project into a widely adopted community framework.

  1. 2015

    Released as Open Source

    Google published gRPC, drawing on years of experience with its internal RPC system, Stubby.

  2. 2016

    Version 1.0

    The 1.0 release marked the framework as ready for general production use.

  3. 2017

    Joined the CNCF

    gRPC became a Cloud Native Computing Foundation project, broadening community governance.

  4. Today

    Regular Releases

    Each repository publishes new versions on its GitHub Releases page; check there for the current version and notes.

Troubleshooting

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.

FAQ

Frequently Asked Questions

gRPC questions from developers, grouped into fundamentals and practical setup.

gRPC Basics

Download and Setup