intermediatetermWeb foundationsWeb foundations / Backend and APIs / Saga Pattern
IntermediateNot yet reviewed

Saga Pattern

A sequence of local transactions where each transaction updates data within a single service and triggers compensating transactions upon failure.

Definition

A sequence of local transactions where each transaction updates data within a single service and triggers compensating transactions upon failure.

Use case

Canceling a booked flight and hotel reservation sequentially if user payment fails during an itinerary checkout.

Related terms

Articles

Saga pattern

Microservices.io · Article · link checked 2026-10-16

Long workflows as steps with compensation, instead of one big transaction.

Suggest a change