3 ms·
If you want to migrate from system A to system B you don't start writing all data to B immediately. You don't know if B can handle the load, if your code is rig
by Falell 10y ago
If you want to migrate from system A to system B you don't start writing all data to B immediately. You don't know if B can handle the load, if your code is right, if double writing will cause an unacceptable slowdown etc. Instead you mirror a % of all writes from A to B and increase it over time.
Now you have a problem because B only has a % of the data. To fix this you need a separate task that periodically identifies records in A missing from B and syncs them. This is the "backfill" - it isn't part of your running application and is only needed for the duration of the migration.
Once you think you have sufficient data in B you can start checking your work, run a % of your reads from both A AND B and make sure the results match.
Once that matches for a while you can start making a % of reads from B without ever contacting A. When this reaches 100% you stop writing to A.
Each % here is a separate feature flag.
- bogomipz 10y agoYep, makes perfect sense, I've handled this in quite a similar fashion. Thanks for clarifying.