microservice-patterns-saga-and-compensation
Installation
SKILL.md
Microservice Patterns Saga And Compensation
Use When
- Business workflow updates data in multiple services
- Two-phase commit is not feasible or too costly
Workflow
- Define local transactions and compensation actions for each step.
- Choose choreography or orchestration based on ownership and visibility needs.
- Persist saga state and step execution history.
- Implement idempotent command and event handlers.
- Add timeout, retry, and dead-letter handling for stuck steps.