Last mongo replica set becomes secondary?

后端 未结 1 661
谎友^
谎友^ 2021-01-25 20:33

I have 3 mongo nodes set up as replica sets. The following scenario is occurring:

  • Node 1 is primary, node 2 is secondary, node 3 is secondary.
  • Nodes 2 and
相关标签:
1条回答
  • 2021-01-25 20:44

    With a 3 node replicaset you need a minimum of 2 nodes up. The docs refer to a 'majority' required to elect a new primary. Therefore with a 3 node RS, there needs to be at least 2 nodes running for one node to be assigned as primary.

    This page has a quite useful table showing the fault tolerance for replicasets with different numbers of nodes: https://docs.mongodb.org/manual/core/replica-set-architectures/

    0 讨论(0)
提交回复
热议问题