Saga
A sequence of local transactions; if one fails, compensations run that undo the earlier ones.
Example
Booking flight, hotel and car: if the car fails, the hotel and flight are canceled.
Test yourself: Saga
Sagas
What is a saga?
Flight, hotel and car are 3 local transactions in 3 services, one after another.
Sagas
What advantage does a saga have over 2PC?
Each of the 4 services commits in milliseconds, without waiting for the rest.
Sagas
Why is testing a saga hard?
A 4-service saga needs all 4 up at once to test 1 purchase.
0/3
â–¶ Play