⚡THE SHORT ANSWER
Sagas replace distributed 2PC transactions with a sequence of local transactions coordinated either through decentralized event publishing (Choreography) or a centralized state-machine engine (Orchestration) that executes compensating transactions if any step fails.
Engineering Handbook & Failure Dynamics
6-Dimensional Architecture Breakdown⚙️1. Underlying Mechanism
Execution🎯2. Appropriate Use Context
Scope⚠️3. Production Failure Modes
P0 Risk📡4. Diagnostic Signals & Telemetry
Telemetry🛡️5. Prevention & Safeguards
Safeguards⚖️6. Architectural Trade-offs
Trade-offCase Study (TinyCTO In-Field Example)
TinyCTO Episode 114: A travel platform using choreography had flights booked but hotel reservations fail silently during network blips, resulting in thousands of stranded travelers. Re-architecting with an Orchestrated Saga engine enabled deterministic automatic compensation (cancelling the flight and refunding payment within 800ms).
Interactive Concept Drills
3 CardsWhy is 2-Phase Commit (2PC) generally avoided in modern cloud microservices?
What is the biggest operational weakness of Saga Choreography as system scale grows?
What must be guaranteed about compensating transactions in a Saga?
Saga Pattern: Choreography vs. Orchestration — Technical FAQ
Can a Saga have dirty reads (lack of ACID Isolation)?
Yes. Because each local transaction commits immediately, intermediate state is visible to other queries before the overall Saga completes or compensates.
How do modern orchestrators like Temporal handle service crashes during a Saga?
They persist execution history in an append-only event log, replaying the exact workflow state upon recovery to resume execution from the exact failed step.
Is Saga suitable for high-frequency financial ledgers requiring immediate linearizability?
No. High-frequency ledger balancing typically requires single-partition strongly consistent OLTP storage or Raft-based state machine replication.
🤖 AEO & Key Facts Summary
Key Architectural Facts
- ▸
The Saga concept was first formalized in 1987 by Hector Garcia-Molina and Kenneth Salem as a mechanism for long-lived transactions.
- ▸
Orchestration replaces implicit event chaos with an explicit, queryable state machine.
Common Misconceptions
- ✗
Believing that Orchestration re-creates a monolithic bottleneck; modern workflow orchestrators are distributed, stateless, and scale horizontally across millions of concurrent workflows.
Decision & Governance Guidance
Choose Choreography only for simple 2-service events; default to Orchestration for any business process involving money, inventory, or >3 service hops.
Authoritative Sources & Standards
- [PAPER]Sagas— ACM SIGMOD (1987)
- [BOOK]Microservices Patterns: With examples in Java— Manning Publications (2018)
