← All posts
Why We Migrated from REST to gRPC (and What Broke)
Service-to-service JSON over HTTP was costing us in latency and schema drift. gRPC fixed two problems and created one.
Internal services talked JSON-over-HTTP. It was easy to debug and easy to break — every team had a slightly different idea of what a "user" was.
Why gRPC
- One schema, enforced. Protobuf is the contract. Drift becomes a compile error, not a 2am page.
- Smaller, faster payloads. Binary framing beat our gzipped JSON by a wide margin on hot paths.
service Billing {
rpc GetInvoice(GetInvoiceRequest) returns (Invoice);
}
message GetInvoiceRequest { string invoice_id = 1; }What broke
Streaming. Our load balancer terminated HTTP/2 in a way that quietly killed long-lived streams after 60 seconds. The fix was unglamorous: configure idle timeouts end-to-end and add keepalive pings.
Migrations are never "flip the switch." Budget for the one thing that breaks that you didn't predict.
More to read