A way to manage data consistency across microservices in distributed transaction scenarios. A saga is a sequence of transactions that updates each service and publishes a message or event to trigger the next transaction step. If a step fails, the saga executes compensating transactions that counteract the preceding transactions : https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/saga/saga
Context and problem
Transactions within a single service are ACID (atomic, consistent, isolated, and durable), but cross-service data consistency requires a cross-service transaction management strategy.Solution
Choreography pattern allows a transaction to be executed in parallel steps and/or in sequences.
Features : Orchestration starts with an event and can end with an ending event (event as message, file transfer, entry in table, etc.); coordination is centralized; orchestrator is responsible for the integrity of the transaction.Challenges