Delivery Semantics in Distributed Systems

#60 - Software Tradeoffs and How to Make Good Programming Decisions - Tomasz Lelek

Topic 8 of 10

Published Oct 18, 2021 · Clip 33:02–40:44 (7:42)

Tomasz explains the three delivery semantics—at-least-once, at-most-once, and (effective) exactly-once—using the example of a lost response between two HTTP microservices. At-least-once requires retries and consumer idempotency (e.g., sending whole state, or UUID-based deduplication with atomic compare-and-set persistence). At-most-once risks data loss but is fine for metrics. Effective exactly-once hides duplicates or uses transactions and is hard and costly. He recommends at-least-once with idempotent design for most use cases and notes Kafka can be configured for either semantics (chapter 11 of his book).