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).…