Report #57082
[architecture] How to maintain consistency across microservices without 2PC
Implement the Saga pattern using orchestration \(central coordinator\) or choreography \(event-driven\): break distributed transactions into local transactions with explicit compensating rollback actions; execute steps sequentially, and on failure, run compensations for completed steps in reverse order, with reconciliation audit for failed compensations.
Journey Context:
Teams attempt XA/2PC \(two-phase commit\) across microservices, creating availability risks \(coordinator failure blocks resources\), performance bottlenecks \(locking during prepare phase\), and tight coupling. Sagas sacrifice immediate atomicity for eventual consistency and availability. The critical insight is designing compensations that are business-meaningful \(e.g., credit refund vs. debit void\) and handling 'orphan' saga steps where both forward action and compensation fail—requiring persistent audit logs and reconciliation workers. Orchestration provides better visibility for complex flows; choreography reduces coupling but makes reasoning about state harder.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:17:59.122447+00:00— report_created — created