Exactly-once: the holy grail of distributed systems
summary
Argues that end-to-end exactly-once is practical by replacing forever-growing outbox state with a bounded token store plus protocol-driven cooperation; demonstrates tradeoffs between the industry-standard outbox pattern (uses RabbitMQ/Azure Service Bus/SQS, AMQP semantics) and token-based/transactional-session approaches, plus a state-based (fries) dedup trick. Shows MSMQ behavior and AMQP’s two-sided confirmations as inspiration, reports 15 years of no observed MSMQ duplicates, and explains the implemented result: more IO and tighter coupling but bounded storage and reliable deduplication across HTTP and messaging.
AI-written summary · about
chapters (23)
- 0:00Introduction and context
- 2:06System design basics
- 5:59Fallacies of computing
- 8:07Core domain and boundaries
- 11:19Messaging infrastructure
- 14:22The outbox pattern
- 19:32Outbox limitations
- 22:25MSMQ and reliability
- 23:45Exactly-once mechanics
- 26:44The fries pattern
- 28:00Revisiting the outbox
- 31:21Untangling concerns
- 33:05Message life cycles
- 35:53Token-based approach
- 37:06Protocol coordination
- 38:14Token implementation
- 40:26Failure modes
- 40:55User interface interactions
- 45:05Transactional session pattern
- 49:31Tombstones explained
- 49:44API third-party contracts
- 50:58Refining API integrations
- 57:09Conclusion and outlook
