All Questions
Api Design hard

Your webhook system guarantees at-least-once delivery (retries). Customers complain about duplicate events causing double-processing. How do you help them achieve exactly-once?

  1. A Include a cryptographically signed event_id in every payload, and advise customers to implement an idempotent receiver pattern by persisting and checking for previously seen IDs.
  2. B Transition the entire webhook delivery infrastructure to a strictly synchronous HTTP protocol that requires an atomic acknowledgment from the receiver before the next event is sent.
  3. C Eliminate the retry mechanism entirely to ensure that if a transmission fails, the event is never repeated, thereby theoretically preventing any possibility of a duplicate execution.
  4. D Leverage an underlying UDP-based transmission protocol to ensure that packets are delivered as a single unit without the inherent retransmission logic found in TCP-based systems.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions