Why is a saga only eventually consistent rather than immediately consistent?
A saga is built from a sequence of separate local transactions, each completed fully on its own service, one after another, rather than one single transaction spanning every service at once. Between the moment the first step commits and the moment the last step either succeeds or triggers a full chain of compensations, the overall system is genuinely in a state that hasn't finished settling yet — for example, a loan record can exist for a real span of time before the corresponding account deposit has actually happened. Any code that reads this data during that window needs to account for that possibility rather than assuming every step of a business process always completes as one atomic unit. This eventual consistency is the direct trade-off for gaining independent availability and scalability across the services involved, since none of them needs to hold a lock waiting on the others.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response