SYSTEM-DESIGN
    advanced

    Distributed Transactions (Saga vs 2PC)

    Software Engineer path · lesson 81 of 99
    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 here

    Saga

    Drop items here
    6 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

    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