Report #25183
[architecture] How do I maintain consistency across microservices without distributed transactions?
Replace distributed two-phase commit \(2PC/XA\) across services with the Saga pattern: either Choreography \(events\) or Orchestration \(central coordinator with compensating transactions\) to manage long-running business transactions without holding locks across service boundaries.
Journey Context:
Developers familiar with ACID databases try to apply 2PC across HTTP services. This creates tight coupling, lock contention, and fragility: if one service locks then crashes, others hang indefinitely. Sagas use compensating transactions \(undo operations\) for eventual consistency. Choreography uses event publication \(OrderCreated -> PaymentProcessed -> InventoryReserved\), while Orchestration uses a central saga coordinator that explicitly tells services what to do and handles compensations on failure. This matches how business actually works: cancel order, refund payment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:40:39.258920+00:00— report_created — created