Guidance on Live Migration of Clusters with Enabled Search Nodes

Hello Community,

I am currently planning to reorganize a MongoDB Atlas setup (using MongoDB version 6.0.18) and would greatly appreciate your guidance on a specific point regarding the migration process.

Migration Plan:

I intend to create a new project and migrate certain clusters into this new project using MongoDB’s live migration service.

Question:

My main concern relates to the search nodes that are enabled for the clusters being migrated. I would like to confirm whether the live migration service will automatically migrate these search nodes and their configurations along with the clusters. If not, could you please advise on the best approach to migrate or recreate the search nodes in the new project without losing functionality?

Thank you in advance for your support!

Hi @Artur_Arakelyan

What you will do here is add search nodes to the target cluster and then create the search indexes once the migration is complete. At present, search indexes are not copied over the network. They are rebuilt on newly deployed/scaled search nodes.

You can also try creating search indexes at the same time as starting migratio to the target cluster. We can build these indexes as the data comes into your collections. However, this likely won’t save you much time. So our general recomendation is to create and build the search indexes after the migration is complete.

Seth

1 Like

As a follow-on note, mongosync / live migration requires the migration to be cut over for consistent reads on the destination cluster (see mongosync docs and Live Migrate docs for more details). If building the Atlas Search index mid-sync, there may be some lag time between when the migration is completed and the Atlas Search Index being consistent, as Atlas Search Indexes are also eventually consistent.
Echoing Seth’s recommendation above, Atlas Search Indexes should be built on the destination after the migration is cut over. Note also that writes should not be accepted on the destination cluster until after Atlas/mongosync indicates that it is safe to do so.

1 Like

Thank you, @Maria_van_Keulen and @Seth_Payne , for the detailed response—I appreciate your help. I have a follow-up question: Is there a faster way to recreate search indexes on the destination cluster after cutover? I’m hoping for a more efficient approach than manually creating each index. Your continued support is greatly appreciated.

Hi Artur. Not at the moment, no. We will see some improvements early next year that will reduce initial index builds. But we will always need to do rebuild indexes. However, we are also going to allow the backup/restore of Atlas search indexes using the existing Atlas backup/restore functionality. Depending on the specifics of the migration, it may be possible to use this to accelerate restoring indexes. This is something we are currently investigating so we wouldn’t see it in the short to medium term.