Replication set initial setup

If I have a single node mongo instance with around 1TB of data and then I convert it to a replica set by adding second node then on the initialization, will it actually copy the entire 1TB data to second node [initial sync] ?? And will it do the same if I add third node in cluster? How can we monitor the progress of that copy??

Thanks

Hi @daljit,

In a replica set, all the nodes contain the same data and hence no matter how many nodes you add to your replica set (In principle not more than 50. You should never be anywhere close to this number if we are talking about performance and other metrics), if it is going to be a data bearing and non-delayed node then it will have the same data after initial sync.

You can use the replSetGetStatus command to look at the status of the node. Mostly you are going to be interested in this parameter.

replSetGetStatus.initialSyncStatus

Note : Do not take my word as a recommendation. For any production environment related advice please consult any professional :slight_smile:

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Support Engineer