Skip to main content

Category

Distributed-systems reliability: outbox, inbox, locking, reconciliation and exactly-once

Reliable distributed systems are designed on the assumption that messages arrive at least once, out of order, and that every step can fail. Record the business update and the event in one transaction (outbox), give dispatch workers ownership that survives COMMIT so nothing is sent twice by accident (dispatcher), commit the receipt record and the business update together (inbox), serialize races on rows that do not exist yet with advisory locks, and converge whatever drift remains by reconciling against the source of truth. Separate exactly-once delivery, processing and effect, and use idempotency keys and retries to make the business effect happen once — that is the scope of this cluster.

10 articles in total

Foundational guide

Foundational guide (start here)

アーキテクチャ設計
AWS
冪等性
決済
メッセージング

The Transactional Outbox Pattern: Make the DB Update and Event Publishing Atomic, and Cut Off Lost Events and Double Publishing

An implementation guide to the transactional outbox pattern that solves the dual-write problem of distributed systems. Write to the outbox in the same transaction as the business update, publish reliably with a relay (polling/CDC), and make downstream idempotent. We explain ordering guarantees, at-least-once, and reconciliation in real code.

24 min read

Related practical articles