2

I have a replicaSet of mongo running , I just want to have another read only clone of same replicaSet(slave) ,with all the data in it is in sync with replicaSet(master). I had come across a solution available here . But could not exactly figure out the way it works . Any suggestion or approach to implement the same.

Community
  • 1
  • 1
Prateek
  • 299
  • 3
  • 18

1 Answers1

4

If you want to add a further node which will always be read-only, that means you can't allow it to be the Primary. To do that, you need to set the member's priority to 0; you can also set its votes attribute to 0 too, if you want to make it completely passive in the replica set.

The documentation describes this method of simulating a master-slave relationship within a replica set.

Vince Bowdren
  • 8,326
  • 3
  • 31
  • 56