Code Room
System designHardsd-g123
Subject IdempotencyLevel Senior–Staff~50 minCommon in Networking & APIs interviewsIndustries Technology, Software development

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.

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