Local replica set failover

Hello Experts
Need your expert advice

I ve configure 3 node(1 primary, 2 secondary nodes) replica set. Based on technology when primary is down 1 of the ro nodes become primary. So operation runs with 1 primary and 1 secondary. In this situation if primary node goes down , secondary node remains secondary.

Questions

  1. Is there any setting that I need to tweak to make surviving node primary
  2. When secondary nodes come back, will they b able to sync back data.

Thanx

Hi @Manamohan_PK, welcome to the community!

This is automatic. Votes and priority of the members can change how this happens, but in a normal deployment it just works.

Yes, as long as there is enough oplog to cover the period it/they were down for.

Hi, I went thru documentation. I dont see any setting that would allow a single node to run as primary(rw mode) when 2 nodes have failed.

What I can do is to start the node without cluster settings and later rebuild a new cluster.
Is my understanding correct ?

I did not get the meaning of your original post. Losing quorum does mean the cluster is read only. In this scenario the replicaset can be force reconfigured so that the unavailabe member have no votes and no priority. This allows the remaining host to become primary. This is not a desirable situation, adding additional member to provide greater availability is a better option.

If enough Oplog is available reconfiguring as above allows the down hosts to catch up. Removing cluster settings will make some mongodb features unavailable and yes the cluster would have to be reinitialised.