Pattern 45 / CONSENSUS

Saga Pattern

Use this when coordinating distributed work without one global transaction.

Pressure
Coordinating distributed work without one global transaction
Mechanism
Chain local transactions and define compensating actions when later steps fail
Toll
Compensation is business-specific and final state is eventually consistent
Architecture plate45
Diagram for Saga Pattern
Executive brief

Saga Pattern fits when coordinating distributed work without one global transaction. Mechanism: chain local transactions and define compensating actions when later steps fail. Use it for orders, bookings, payments, inventory, and multi-service business processes. The toll: compensation is business-specific and final state is eventually consistent.

Use when

Orders, bookings, payments, inventory, and multi-service business processes.

Example

Reserve hotel, charge card, then release reservation if charge fails.

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Consistency Patterns

44Two-Phase Commit (2PC)46Quorum47Vector Clocks
โ† 4446 โ†’