Comparison
Dual writevsEvent-carried state transfer
Dual write
you wrote to both databases for the whole migration, and spent a week chasing the rows where only one write landed.
Writing the same data to the old and new stores during a migration so either can serve reads. It is easy to describe and hard to do correctly, because two writes without a shared transaction will eventually diverge, and the divergence is silent. Teams that do it successfully plan for reconciliation from the start — a comparison job, a repair path, and a decision about which store is authoritative at each phase.
Full entry →Event-carried state transfer
the event carries the whole customer record rather than just an id, so the consumer never has to call back and ask.
Publishing enough state inside each event that consumers can maintain their own copy without querying the producer. It removes the runtime coupling of a callback and makes replay meaningful, because the history contains the values and not just the pointers. The trade is size, staleness semantics and versioning: every consumer is now parsing your schema, so the payload is a contract in a way that an id was not.
Full entry →