· 5 min read
ArchitectureUpdate your database and publish an event atomically — without two-phase commit — by writing events to an outbox table first.
Read article· 5 min read
5 articles
Update your database and publish an event atomically — without two-phase commit — by writing events to an outbox table first.
Decoupling with events buys scalability and resilience, but you pay in eventual consistency, ordering bugs, and harder debugging.
You can't BEGIN..COMMIT across services. Sagas trade atomic transactions for choreographed steps and compensating actions.
A client retries a payment after a timeout and the customer gets billed twice. Idempotency keys make retries safe by design.
Microservices promise scale and autonomy, but the real bill arrives as operational tax, network failure modes, and cognitive load.