Skills101
← All practice quizzes

Quiz: Distributed Transactions and Sagas

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

One database gives you ACID transactions for free; five microservices do not. See why a food order across payment, restaurant and rider services can end half-done, and learn the three standard answers: two-phase commit, sagas with compensating actions, and the transactional outbox, with Python and SQLite demos.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Why can't a food order across payment, restaurant and delivery microservices use one normal ACID transaction?

  2. Question 2

    In two-phase commit, what happens if one participant votes "no" in the prepare phase?

  3. Question 3

    What is a major drawback of 2PC between microservices?

  4. Question 4

    What does this print?

    done = ["charge", "accept"]
    undo = {"charge": "refund", "accept": "cancel"}
    print([undo[s] for s in reversed(done)])
    
  5. Question 5

    In a saga, what is a compensating action?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →