-
Notifications
You must be signed in to change notification settings - Fork 97
Migrating Replica Sets
When migrating from a basic MongoDB replica set, there are two strategies to choose from: "offline" or "online".
An offline migration requires that the application be down while the migration takes place, which is a dump from MongoDB and an import into TokuMX. The benefits to an offline migration are:
- The migration process is simple and fast. You simply dump the MongoDB
data and restore it into TokuMX, then copy the restored
dbpath
to all secondaries. - The migration can be done on the existing machines provisioned for MongoDB, no additional servers or capacity is required.
The obvious drawback of an offline migration is that it requires a maintenance window that can be very long for large data sets.
An online migration is done by having TokuMX sync from MongoDB until the application can be switched over to TokuMX. This allows the application to continue operating normally with MongoDB until the very instant it is switched over to TokuMX. This is the obvious benefit of an online migration, however, the drawbacks of an online migration are:
- The migration process is more complicated and can take longer, as TokuMX will need to catch up with the running MongoDB database, which will have processed more writes while TokuMX was bulk importing data.
- The migration requires that a MongoDB replica set and a TokuMX replica set be online simultaneously. While it is possible to put the TokuMX instances on the same physical or virtualized machines that are running MongoDB, TokuMX will use some of the system resources, so this is dangerous for MongoDB databases that are running close to their machine's maximum capacity.
Ultimately, your application will dictate which is the right migration procedure.