Change Data Capture & Event Sourcing
7 min read.
See dual writes leave a search index out of sync, then fix it by feeding every copy from the database’s change log, and rebuild state by replaying events.
Think of it this way: A bank keeps one ledger of every deposit and withdrawal. Your balance, your monthly statement and the fraud team’s report are all worked out from that ledger. Nobody updates them separately, so they can be late but never contradict each other.
color = green
color = green
The app writes to the database and then to the search index itself. Two users change the same product at once.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Dual writes or change data capture?
Sort each trait into the approach it describes.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Dual writes
Drop items hereChange data capture
Drop items hereQuiz
8 questionsWhy can dual writes leave two systems disagreeing?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.