|内容||A pattern for online migrations|
Moving millions of objects from one database table to another is difficult, but it’s something that many companies need to do.
There’s a common 4 step dual writing pattern that people often use to do large online migrations like this. Here’s how it works:
Dual writing to the existing and new tables to keep them in sync.
Changing all read paths in our codebase to read from the new table.
Changing all write paths in our codebase to only write to the new table.
Removing old data that relies on the outdated data model.