Report #29907
[architecture] How to maintain data consistency across microservices without using distributed locks or 2PC
Implement Saga pattern using orchestration \(central coordinator with defined steps and compensations\) for complex business flows; use choreography \(event-driven\) only for simple 2-3 step flows with clear event contracts; ensure each service implements idempotent compensating transactions for rollback
Journey Context:
2PC is blocking, coordinator is SPOF, and doesn't scale; Sagas accept eventual consistency and split long transactions into steps; orchestration centralizes complex logic \(e.g., 'if payment fails, cancel inventory AND shipping'\); choreography decouples services but creates 'event spaghetti' and hard-to-debug flows; compensations must handle partial failure \(e.g., inventory already shipped\)
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:35:11.810162+00:00— report_created — created