Multi-step workflows: when one request touches five services
When a single user action has to change state in several services that share no transaction, you cannot make it atomic, so you make it recoverable instead, with sagas and compensating actions, an outbox that never loses the event, and (when the steps are many or slow) a durable execution engine that remembers where the process got to.
What you'll be able to do
- Explain why a distributed transaction (two-phase commit) is rarely the right answer across services and third-party APIs
- Design a saga with compensations, ordered so the step that cannot be undone runs last
- Choose between orchestration and choreography and defend the choice by who needs to see the whole process
- Use a transactional outbox to change state and publish an event without a dual-write gap
- Describe what a durable execution engine checkpoints, and how to change a workflow that is already running
Before this: queues-and-backpressure, replication-and-consistency
Log in to read the rest of this lesson
When a single user action has to change state in several services that share no transaction, you cannot make it atomic, so you make it recoverable instead, with sagas and compensating actions, an outbox that never loses the event, and (when the steps are many or slow) a durable execution engine that remembers where the process got to. This walkthrough runs about 24 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.
Log in to continueThe first module of every track is free to read on the web: see what's open in System design.