Dual writes and their alternatives
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
explain why dual writes corrupt data and what to do instead.
Planned topics
- Two writes to two systems cannot be atomic; a failure in between leaves them different.
- Retries, ordering, and races create drift that is hard to detect.
- Alternatives: single writer, CDC from the owner, outbox plus events.
- If a temporary dual write is unavoidable, add reconciliation and a deadline.
Draft outline details
Demonstration
a failure timeline: write to monolith succeeds, write to new service times out; the systems now disagree. Next to it, the outbox version.
Check your understanding
Why are dual writes unsafe?
Show answer
No atomicity across two systems.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.