Glossary

Saga Pattern

Coordinate a transaction across microservices as a chain of local steps, each with a compensating undo.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

Coordinate a transaction across microservices as a chain of local steps, each with a compensating undo.

How it works

You can't hold an ACID transaction across services, so a saga does each step locally and, if a later step fails, runs compensating actions to unwind the earlier ones (refund the charge, release the stock). Choreographed (via events) or orchestrated (a central coordinator). Trades atomicity for availability — the system is only eventually consistent mid-saga.

Common questions

What is Saga Pattern?

Coordinate a transaction across microservices as a chain of local steps, each with a compensating undo.

How does Saga Pattern work?

You can't hold an ACID transaction across services, so a saga does each step locally and, if a later step fails, runs compensating actions to unwind the earlier ones (refund the charge, release the stock). Choreographed (via events) or orchestrated (a central coordinator).…

What is Saga Pattern used for in system design?

You can't hold an ACID transaction across services, so a saga does each step locally and, if a later step fails, runs compensating actions to unwind the earlier ones (refund the charge, release the stock). Choreographed (via events) or orchestrated (a central coordinator).…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →