Report #45690
[architecture] Two-phase commit blocking services and creating deadlocks across microservices
Implement Saga pattern: sequence of local transactions where each step publishes a domain event triggering the next service; on failure, run compensating transactions \(backward recovery\) to undo previous steps, or retry with forward recovery for transient errors
Journey Context:
2PC is a blocking, synchronous protocol that creates tight coupling and single points of failure \(the coordinator\). Sagas are asynchronous and event-driven, avoiding locks. Two flavors exist: Choreography \(services react to events, decentralized\) and Orchestration \(central coordinator sends commands\). Compensations must be idempotent and handle partial failure \(e.g., refund already issued\). This is right for long-running business transactions \(book hotel\+flight\+car\) where ACID across services is impossible.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:09:56.616477+00:00— report_created — created