What they're testing
Whether you think about intermediate states and the business meaning of cancellation, or only the happy path.
The short answer~30 seconds
A saga: split into local steps, give each a COMPENSATING action, and when a step fails run the compensations for the completed steps in reverse. The important point is that compensation isn't rollback: you don't erase history, you emit a new event — a refund rather than an un-charge — and some things can't be compensated at all, such as an email already sent.
The long answer
Two coordination styles. Choreography: each service listens for events and decides its own next step — less infrastructure, but nobody can see the whole flow and debugging becomes reading logs in four places. Orchestration: one coordinator calls each step and holds the state — one more component, in exchange for the flow living somewhere readable. For anything beyond three steps I nearly always choose orchestration.
What you must accept is that a saga gives ATOMICITY but not ISOLATION: between steps the world sees a half-done state — stock reserved, payment not taken. Others can make decisions on that state. The usual handling is making the intermediate state a legitimate, displayable BUSINESS state — "reserved", "awaiting payment" — rather than pretending it doesn't exist.
And compensations can fail too. That's where a saga differs sharply from a transaction: if the refund fails, there is no layer beneath to save you. In practice you need retries on compensations, a "needs manual intervention" state, and a queue for a human to work. Saying that marks someone who has operated a saga rather than drawn one.
What they'll ask next
?How do you know a saga is stuck?
Each saga instance needs its own timeout and a durable state. Alert on the age of unfinished sagas rather than on errors — a stuck saga usually throws nothing at all, it just stops progressing, which is the quietest kind of incident there is.
These lose points
- Proposing a 2PC distributed transaction. Kafka and most brokers don't support XA, and a dead coordinator leaves every participant in doubt.
- Assuming every step is compensable. A sent email and a fired push notification are not.