0

I use mongodb 4.0.10. I want to establish a quorum for a cluster of one primary node and two secondary nodes as written here. When the number of nodes is less than the quorum, 3 nodes in my case, cluster goes to readonly (no election).

I`ve tried to set priority of two nodes to 0, in this case if primary goes down, there is no election, but if one of secondaries goes down, old primary still exists.

UPDATE: According to MongoDB docs terminology is it possible to set a replica set Fault Tolerance to zero? It means that if any of cluster nodes goes down new primary will not be elected.

Andrii Matiiash
  • 499
  • 6
  • 18
  • What is the goal you're trying to achieve? – kevinadi Jun 04 '19 at 01:45
  • @kevinadi, cluster consistency. Quorum rule ensures the system's consistency when dividing the cluster into parts in case of network failure. – Andrii Matiiash Jun 04 '19 at 05:11
  • Do you mean that you want to have a primary up at all times, even when the majority of the nodes offline? – kevinadi Jun 04 '19 at 06:09
  • No, I mean that primary should change the status to secondary if any of other two nodes goes down. And if the primary goes down (two secondaries remain in the cluster) - new primary should not be elected. – Andrii Matiiash Jun 08 '19 at 09:50

1 Answers1

0

As I understand there is no quorum mechanism in mongodb replica set, but expected possibility to perform write operations only if all nodes are alive can be achieved by deploying two-members cluster or by setting a write concern to 3 in the mongodb client as mentioned here.

Andrii Matiiash
  • 499
  • 6
  • 18