IT lexicon Database Saga

Saga

Database På svenska → Updated: 2026-05-23

Pattern for distributed transactions — instead of 2PC, run a sequence of local transactions and define compensating actions for rollback.

Original paper by Garcia-Molina & Salem (1987), intended for long-running transactions in a single database; rediscovered in the microservices era where 2PC is impractical. Two flavours: choreography (each service listens to events and decides on its own) and orchestration (a central coordinator drives the steps, e.g. Temporal, Camunda).

Gives eventual consistency, not atomicity — the compensation can fail or run in the wrong order. Idempotency at every step is a requirement, not a nice-to-have.

← Back to the lexicon