gRPC
gRPC runs over HTTP/2 with native multiplexing — 4 simultaneous streams can flow on a single TCP connection. The animation renders 4 parallel lanes with chips at different phases, showing the multiplex visually.
Animation
Engineering pitfalls
Head-of-line blocking at TCP layer
HTTP/2 multiplexes streams but TCP still has head-of-line blocking at the transport layer. A single dropped packet stalls ALL streams. HTTP/3 (QUIC) solves this — consider for high-loss networks.
Deadline propagation across services
gRPC supports per-call deadlines. Without propagation through your call graph, child services may exceed parent's deadline and waste resources. Use context-passing in every handler.
Server-side streaming backpressure
Sending faster than client can consume bloats server memory. Implement flow-control with explicit `Send` returning early on slow consumer; gRPC's default isn't enough.
References
Primary sources
- Google — gRPC Protocol Specification.
- RFC 9113 — HTTP/2.
- Google SRE Book — Cascading Failures (gRPC deadlines chapter).