Transactional and Data Integrity in Microservices Systems – Do We Need a Two-Phase Commit?
summary
Argues that two‑phase commit is unnecessary for most microservice systems and shows two practical alternatives: optimistic concurrency with a shared database solves transactional integrity when a bounded context maps to a single large aggregate, while event sourcing with Kafka and consumer groups handles cross‑service flows and eventual consistency. Gives concrete tradeoffs: large aggregates keep strong consistency but cause contention and failed user updates; small aggregates plus Kafka remove coupling, require ordering and idempotent handlers, and replace atomic commits with reliable event streams.
AI-written summary · about
chapters (9)
- 0:00Introduction and background
- 3:49Pain points of legacy systems
- 8:43Two-phase commit in SOA
- 13:41Expecting failure in microservices
- 15:25Domain driven design basics
- 23:42Aggregate models in microservices
- 27:15Optimistic concurrency approach
- 27:59Event sourcing with Kafka
- 35:00Summary and Q&A
related talks
27mData Consistency in Microservices Architecture
55mTackling transactions in Microservices applications
50mDeveloping Microservices with Aggregates
46mMicroservices architecture and data consistency
30mThe Architecture of Microservice Transaction Based on Distributed Consensus with Kubernetes
53mEffective Microservice Communication and Conversation Patterns
39mManaging Consistency, State and Identity in Distributed Microservices
46mLost in transaction? Strategies to deal with (in-)consistency in distributed systems
