awesome-everything RU
↑ Back to the climb

Distributed Systems

Sagas: free-recall review

Crux Free-recall prompts across the sagas unit. Answer each in your own words first, then reveal the model answer and compare.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 14 min

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the saga’s tradeoffs stick when you face them in a real design review.

Goal

Reconstruct the unit’s spine without looking back: why 2PC fails across services, what makes a compensation different from a rollback, choreography vs orchestration, the isolation anomalies, and the application-level fixes — including idempotency.

Recall before you leave
  1. 01
    Why is two-phase commit unusable across microservices, even though it is correct?
  2. 02
    Explain why a compensating transaction is not a database rollback, and how that changes how you order steps.
  3. 03
    Contrast choreography and orchestration, and give the heuristic for choosing.
  4. 04
    What does it mean that a saga is 'ACID minus I', and which three anomalies follow?
  5. 05
    Name the application-level countermeasures for a saga's lost isolation and what each one does.
  6. 06
    Why must saga steps and compensations be idempotent, and how do you make a charge step idempotent?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: 2PC is correct but holds cross-service locks behind a blocking coordinator, so sagas trade the global transaction for local commits plus hand-written compensations that are new forward actions (order the irreversible ones last). You wire steps with choreography or orchestration on a complexity heuristic, you pay for losing isolation with semantic locks, commutative updates, and version checks, and because delivery is at-least-once, every step and compensation must be idempotent.

Continue the climb ↑Sagas: code reading
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.