gRPC
ActiveDescription
Google's open-source high-performance RPC framework supporting cross-language service communication as the core infrastructure of microservice architectures.
Key Features
- HTTP/2 multiplexing — Low-latency bidirectional streaming via HTTP/2 protocol
- Protocol Buffers IDL — Define service interfaces in .proto files, auto-generate multi-language client and server code
- 10+ language SDKs — Official bindings for C++, Python, Java, Go, Node.js, Ruby and more
- Bidirectional streaming RPC — Server push and client streaming for real-time communication
- Resilient communication — Built-in retry, timeout, circuit-breaker, and load-balancing
- Pluggable authentication — TLS, ALTS, OAuth2, and custom credential providers
Use Cases
Categories
Quick Start
# Install gRPC
pip install grpcio grpcio-tools
# Write .proto service definition
# greeter.proto:
# syntax = "proto3";
# service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} }
# Generate Python code
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. greeter.proto
# Run
python greeter_server.py
python greeter_client.py