Report #9509
[architecture] Maintaining consistency across microservices without two-phase commit \(2PC\)
Use the Saga pattern: model business transactions as sequences of local ACID operations with compensating transactions \(undo logic\); choose Orchestration \(central coordinator\) for complex workflows requiring visibility, or Choreography \(event-driven\) for loose coupling, ensuring each service emits domain events after local commit.
Journey Context:
2PC is a blocking, fragile anti-pattern in distributed systems: the coordinator is a single point of failure, and locks held during the uncertain phase cause resource starvation. Sagas accept eventual consistency between services while maintaining strong consistency within each service's boundary. Common mistakes: failing to design compensating actions for irreversible operations \(e.g., email sent\), or mixing orchestration and choreography haphazardly creating spaghetti dependencies. Orchestration fits complex approval workflows \(e.g., travel booking with human steps\); choreography fits analytics pipelines. Critical: implement semantic locks \(pending states\) to prevent inconsistent reads during saga execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:19:28.224045+00:00— report_created — created