System design · Patterns: the problems hiding inside most prompts

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.

24 min read Full lesson in the app Patterns: saga, compensating action, transactional outbox, durable execution

What you'll be able to do

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 continue

The first module of every track is free to read on the web: see what's open in System design.