Code Room
System designHardsd-g515
Subject Exactly once deliveryLevel Senior–Staff~50 minCommon in Databases & SQL · Networking & APIs interviewsIndustries Technology, Software development

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.