Monoliths and Microservices
الوحدة 6
Saga Pattern
A business transaction as a sequence of local transactions, each with a compensating action — and an honest account of why compensation is a business design problem rather than an undo button.
33 min2 lessons
ابدأ الوحدةما ستصبح قادرًا عليه
- Model a multi-service business operation as a saga with explicit compensations.
- Design a compensating action for a step that cannot be technically reversed.
- Choose between choreography and orchestration using observability and coupling criteria.
- Handle a compensation that itself fails, and know when to stop automating.
- Make saga state visible to the people who have to answer for it.
- 11 min
01Sagas, and Why Compensation Is a Business Decision
A saga trades atomicity for availability: each step commits locally, and a failure later runs compensating actions. What "compensate" means is a question for the business.
- 11 min
02Choreography or Orchestration
Two ways to run a saga: services reacting to each other's events, or one component directing the sequence. The choice is mostly about observability and about who owns the flow.
Saga Pattern
6 questions · pass at 75%