API Design · Senior · Question 70 of 75
Why do event-driven APIs usually promise 'at-least-once' rather than 'exactly-once' delivery?
- 1At-least-once is faster to type
- 2Exactly-once is forbidden by HTTP
- ✓Correct answer: Exactly-once across networks and failures is impractical; at-least-once plus idempotent consumers gives the same effective result
Explanation
Document the guarantee and give each event a unique ID for deduplication.