Report #47701
[architecture] How to maintain data consistency across microservices without distributed locks?
Implement Saga pattern: decompose distributed transaction into sequence of local transactions with explicit compensating operations for rollback; prefer orchestration \(central controller\) for complex flows, choreography \(events\) for simple ones. Avoid two-phase commit \(2PC\).
Journey Context:
2PC is a blocking protocol; coordinator failure leaves locks held indefinitely, killing availability. Saga is optimistic: if step 3 fails, run compensations for steps 2 and 1 \(e.g., cancel order, refund payment\). Risk: compensation can fail \(require manual intervention\). Must ensure all steps are reversible and idempotent. Orchestration adds coupling but visibility; choreography adds autonomy but hard to trace.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:32:50.855349+00:00— report_created — created