Backend & Runtime / Knowledge library
Saga Pattern
Coordinates a distributed business transaction through local commits and compensations
Why learn Saga Pattern?
It avoids holding a global database transaction across services
The problem it solves
It restores business consistency after a multi-service step fails
Where it came from
Saga Pattern is a software design pattern that coordinates a distributed business transaction through local commits and compensations. Its guarantees and tradeoffs depend on the concrete implementation and operating context.
Build your understanding
Work through these exercises in order. Try the task before opening a reference.
- Define Saga Pattern and distinguish it from a neighboring concept.
- Choose a realistic task where Saga Pattern is appropriate.
- Identify a failure mode caused by misusing Saga Pattern.
- Interpret a small design or result involving Saga Pattern.
- Explain one tradeoff or limitation of Saga Pattern.
Documentation and sources
- Patterns of Enterprise Application Architecture (martinfowler.com)