Code Room
System designHard
Question
Design effectively-once event publishing from a service that also writes to its primary database. A user action must (a) commit a row to the DB and (b) publish an event to a stream — with the guarantee that the event is published if and only if the DB write committed, exactly once, even across crashes, retries, and broker failovers. Scale: 80K transactions/sec. Consumers downstream must also process each event effectively once.
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.