Report #51247
[architecture] Distributed transaction \(2PC\) locking services and creating unavailable systems during partial failures
Implement Saga pattern: sequence of local transactions with compensating transactions for rollback. Use choreography \(event-driven\) for simple flows, orchestration \(central coordinator\) for complex workflows.
Journey Context:
Two-Phase Commit holds locks across network boundaries; if a coordinator fails, locks persist indefinitely \(blocking\). Sagas sacrifice immediate consistency for availability \(BASE\). Each service updates its own DB and publishes events. Compensating transactions handle failures \(e.g., credit refund for debit failure\); these must be idempotent. Orchestration prevents cyclic dependencies visible in choreography but creates a single point of failure \(mitigated by state machine replication\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:30:14.563265+00:00— report_created — created