SYSTEM-DESIGN
advanced
Distributed Transactions (Saga vs 2PC)
Software Engineer path · lesson 81 of 99Learn how microservices maintain data consistency across multiple databases using Two-Phase Commit and Saga patterns.
Transaction Coordinator
Payment DB
Inventory DB
Click Simulate 2PC to begin
2PC or saga?
Sort
Sort each trait into the distributed-transaction approach.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Two-phase commit
Drop items hereSaga
Drop items here6 pieces left to place
Test your knowledge
21 questions
Question 1 of 21
Score: 0
In the Saga pattern, how do you handle a failure in the final step of a transaction?
Interview Questions
Uber
Amazon
Stripe
Google
Meta
Stripe
Netflix
Amazon
Microsoft
References & Further Reading
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required