Loading pattern...

What is gRPC?

gRPC is a high-performance RPC (Remote Procedure Call) framework using Protocol Buffers for serialization. Faster and more efficient than JSON REST APIs—binary format, HTTP/2, bidirectional streaming. Call remote service methods like local functions. Created by Google, used for microservice-to-microservice communication where performance matters. Not great for browser/mobile clients (use REST/GraphQL). Best for backend-to-backend communication.

When Should You Use This?

Use gRPC for internal microservice communication (service A calls service B frequently), when performance matters (high-throughput, low-latency), when you need bidirectional streaming, or in polyglot environments (gRPC generates clients for many languages). Don't use for browser clients (limited support) or public APIs (REST/GraphQL easier for developers). gRPC shines in backend systems.

Common Mistakes to Avoid

  • Using for public APIs—REST/GraphQL better for external developers
  • Browser clients—gRPC-Web exists but limited, REST simpler for browsers
  • No versioning strategy—protobuf changes can break clients
  • Over-engineering—if REST works fine, gRPC adds complexity
  • Ignoring monitoring—binary format harder to debug than JSON

Real-World Examples

  • Google—gRPC for internal microservice communication at massive scale
  • Netflix—gRPC for backend services, REST for client APIs
  • Uber—gRPC for service mesh communication
  • Microservice architectures—gRPC for fast service-to-service calls

Category

System Design Patterns

Tags

grpcrpcprotocol-buffersmicroserviceshigh-performance

Permalink