Core Idea
The Epic Saga Pattern coordinates distributed transactions with synchronous communication, atomic consistency per step, and a central orchestrator that manages workflow state and decides next steps.
The Epic Saga Pattern (SAO) coordinates distributed transactions with three defining properties: Synchronous communication (orchestrator makes blocking calls and waits for each step), Atomic consistency (each step executes as an ACID transaction with immediate consistency), and Orchestrated coordination (a central orchestrator owns workflow state and determines sequencing, branching, and compensation). Named “Epic” because the orchestrator maintains full visibility and centralized control throughout the entire transaction sequence.
How It Works
- Central orchestrator owns state: A single service maintains the current step, execution history, and decision logic for the entire saga
- Synchronous request-response: Orchestrator makes blocking calls to domain services and waits for each to complete before proceeding
- Atomic steps: Each service’s local transaction commits with full ACID guarantees before the orchestrator moves forward
- Compensating transactions on failure: If a step fails, the orchestrator triggers compensating transactions in reverse order (LIFO) to undo committed changes
- Deterministic state: Unlike choreographed patterns, there is no ambiguity about current workflow state—the orchestrator is the single source of truth
Trade-Offs
Advantages:
- Strong consistency—system state is always well-defined and immediately consistent
- Centralized error handling, retry logic, and compensation sequencing in one place
- Clear audit trail maintained by the orchestrator; simplifies compliance and debugging
Disadvantages:
- Lower scalability—orchestrator waits idly while each step executes, reducing throughput
- Orchestrator is a single point of failure; crashes stall the workflow and require state recovery
- Tight temporal coupling—all services must be available simultaneously
- Higher latency—total response time is the sum of all step durations plus network overhead
Related Concepts
- Orchestration—Central coordinator pattern that Epic Saga builds upon
- Atomicity—ACID property that Epic Saga guarantees at each step
- ACID—Transaction properties maintained within each domain service
- Distributed-Transactions—Broader category that sagas address without 2PC
- Saga-Pattern—Foundational pattern; Epic is one specific implementation
- Synchronous-Communication—Communication model Epic Saga depends on
- Software Architecture - The Hard Parts - Ford, Richards, Sadalage & Dehghani - 2022—Primary source defining eight saga variations
Sources
-
Ford, Neal; Richards, Mark; Sadalage, Pramod; Dehghani, Zhamak (2022). Software Architecture: The Hard Parts - Modern Trade-Off Analyses for Distributed Architectures. O’Reilly Media. ISBN: 978-1-492-08689-5.
- Chapter 12: “Transactional Sagas”, pages 325-330
-
Garcia-Molina, Hector and Salem, Kenneth (1987). “Sagas.” ACM SIGMOD Record, Vol. 16, No. 3, pp. 249-259. DOI: 10.1145/38714.38742
-
Richardson, Chris (2025). “Pattern: Saga.” Microservices.io.
-
Hohpe, Gregor and Woolf, Bobby (2003). Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. Addison-Wesley. ISBN: 978-0321200686.
-
Amazon Web Services (2025). “Choosing workflow type in Step Functions.” AWS Step Functions Documentation.
Note
This content was drafted with assistance from AI tools for research, organization, and initial content generation. All final content has been reviewed, fact-checked, and edited by the author to ensure accuracy and alignment with the author’s intentions and perspective.