Tackling transactions in Microservices applications
summary
ACID across services is unavailable so two‑phase commit introduces blocking, a coordinator single point of failure and poor scalability, while the SAGA pattern splits a global transaction into sequential or parallel steps with compensating actions and eventual consistency. Implementation uses a durable distributed log (e.g. Kafka or Kinesis) and an execution coordinator that writes each step to the log before sending requests, requires idempotent compensation and commutative requests, and recovers by retrying or running compensations until the saga reaches a consistent outcome.
AI-written summary · about
chapters (10)
- 0:00Introduction and setup
- 1:05Why monoliths become problematic
- 6:05Moving to microservices
- 7:15Two-phase commit protocol
- 14:16Introducing Sagas
- 19:32Choreography vs orchestration
- 25:00Implementing saga execution
- 39:57Handling coordinator failures
- 42:50Benefits of Sagas
- 46:10Q&A
related talks
54mTackling transactions in a Microservices application
36mLost In Transaction
50mTransactional solutions for microservices
28mPractical Approaches To Scaling Distributed Transactions
46mMicroservices architecture and data consistency
41mTransactions in Your Micro-Services Architecture
17mSaga Pattern for Distributed Transactions
51mPatterns & Practices of Implementing Event-driven MicroSvc...
