_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

gRPC — faster communication between microservices

17. 10. 2018 1 min read CORE SYSTEMSdevelopment

Our microservices communicate via REST with JSON. It works, but JSON serialization is slow, there’s no schema, and streaming is a hack. gRPC solves all three problems.

What is gRPC

An RPC framework from Google. Protocol Buffers for serialization (binary, compact, typed) and HTTP/2 as transport (multiplexing, streaming).

syntax = "proto3";
service OrderService {
  rpc CreateOrder (CreateOrderRequest) returns (Order);
  rpc StreamUpdates (GetOrderRequest) returns (stream OrderUpdate);
}
message Order {
  string id = 1;
  string status = 2;
}

Performance difference

  • Serialization: protobuf 3-5x faster than JSON
  • Payload: protobuf 2-3x smaller
  • Latency: gRPC ~30% lower thanks to HTTP/2
  • Streaming: gRPC native

When to use gRPC, when REST

gRPC: internal service-to-service, high-throughput streaming. REST: public APIs, browsers, third parties. Envoy can handle gRPC-JSON transcoding at system boundaries.

gRPC is ideal for internal microservices

For public APIs use REST, for internal communication use gRPC — typed contracts, high performance, and native streaming. We’re migrating gradually.

grpcprotocol buffersmicroservicesperformance
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us