Report #68069
[architecture] Maintaining data consistency across microservices without distributed locks
Use the Saga pattern: sequence local transactions where each service update publishes an event triggering the next step. Implement compensating transactions for rollback. Prefer orchestration \(central coordinator like Temporal or Camunda\) for complex flows, choreography \(event bus\) for simple, loosely-coupled steps.
Journey Context:
Two-Phase Commit \(2PC\) creates a blocking dependency on a coordinator and locks resources for the transaction duration, killing throughput and creating single points of failure. Sagas sacrifice immediate consistency \(ACID\) for eventual consistency and availability \(BASE\). The critical detail often missed: compensating transactions must be idempotent and can themselves fail, requiring careful audit logging and manual intervention workflows \(e.g., 'ping' the customer for failed refund\). This pattern is essential when crossing service boundaries where databases cannot share locks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:44:01.830750+00:00— report_created — created