Code Room
System designHard
Question
Design distributed transactions across three independent services — Inventory, Payments, and Orders — each with its own database, so that placing an order either fully succeeds or fully rolls back at 5k orders/sec. Compare two-phase commit (2PC) and a saga, pick one, and explain how you handle a coordinator crash mid-commit and a partial failure where Payments succeeds but Inventory is sold out.
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.