Code Room
System designHard
Question
Design exactly-once processing for a payment-events pipeline where an upstream service emits 'payment.captured' events to Kafka and a downstream consumer must, per event, post to the ledger and send one receipt email — each side effect exactly once, despite Kafka's at-least-once delivery, consumer crashes, and rebalances that replay messages. ~25,000 events/sec. Describe how the producer avoids losing/duplicating events and how the consumer achieves exactly-once side effects.
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.