Use protobuf for internal RPC
Context
order-routing-v2 needs single-digit-ms internal serialization to hit a <200ms p95. Current stack is JSON over HTTP for everything, including service-to-service. Live preview in rules-engine-customer-ui also needs an 80ms RPC budget.
Decision
Move internal RPC to protobuf over gRPC. JSON remains at the edge (customer-facing APIs, webhooks) — no public-API breakage.
Why
- Driven by order-routing-v2 needing single-digit-ms internal serialization.
- Schema-first is easier to evolve than ad-hoc JSON; we've had two recent prod incidents from silent JSON shape drift.
- Devon's team has prior gRPC experience. No greenfield risk.
Consequences
- New
pbgenstep in CI; one-time investment. - Existing internal endpoints migrate over Q2-Q3; no big-bang.
- Edge stays JSON; customers see no change.
- Audit log (audit-log-v2) sits on the same RPC bus — single migration, two beneficiaries.
Backlinks · 6
↪meetings/2026-04-18-acme-qbr…ue 2026-05-01 ## Notes - VP Eng asked deep questions about use-protobuf-internal — they've been burned by gRPC mismatches in the past. Comfo…↪people/devon-kim…ncts. ## Threads - order-routing-v2 (owner) - use-protobuf-internal (co-decider) - single-region-eu (decider)…↪projects/audit-log-v2…llout ## Notes - Built atop the same protobuf RPC bus from use-protobuf-internal.↪projects/order-routing-v2…ce ask from northwind-supply) ## Decisions - use-protobuf-internal — internal RPC moves to protobuf; JSON only at the edge…↪projects/rules-engine-customer-ui…real-but-sampled traffic (no shadow infra) ## Decisions - use-protobuf-internal — affects the live-preview round-trip budget - No modal for…↪strategy/rules-engine-narrative…The rules engine is the wedge. - Latency is a feature (cf. use-protobuf-internal). - The UI is the point of differentiation, not the API.…