Report #92209
[architecture] Data inconsistency when microservices fail mid-multi-step business process
Implement Saga orchestration: track state machine progression, use compensating transactions for rollback, and ensure all steps are idempotent. Prefer orchestration over choreography for complex flows.
Journey Context:
Distributed transactions via 2PC \(Two-Phase Commit\) are blocking, brittle, and create tight coupling between services. The Saga pattern splits long-lived transactions into a sequence of local transactions, each with a compensating action for rollback. 'Choreography' \(event-driven\) risks cyclic dependencies and makes flow logic hard to trace. 'Orchestration' \(central coordinator\) is preferred for business-critical flows \(e.g., e-commerce: Reserve→Charge→Ship\) because it centralizes decision logic and failure handling. The coordinator must persist state and handle 'orphan' steps \(when a service succeeds but the coordinator crashes\) via idempotency and reconciliation loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:21:50.100473+00:00— report_created — created