Skip to content
All concepts

Concept

Saga

A saga is a business transaction that spans several services, carried out as a sequence of local transactions. There is no single rollback: if a later step fails, the saga runs compensating actions that undo the earlier steps, such as releasing reserved stock. Each step and each compensation has to be safe to repeat.

  1. Reserve stock (succeeds)
  2. Charge card (fails)
  3. Release stock
  4. Order cancelled
Illustrative: the payment step fails, so the saga compensates by releasing the stock it reserved.

Where you'll see it

Sources: Garcia-Molina and Salem: Sagas (1987, PDF) ↗ · Report a problem

The definition is in our own words.