We are running a MongoDB database in HA mode on our k8s cluster. Our helm chart defines three replicas (with persitence: enabled: false) and one arbiter.
Since 3 replicas 1 arbiter is an evil even number, I would love to know if the arbiter only comes into play when one replica goes down to ensure an odd number of electors to determine the new primary node, or is using an arbiter wrong when having defined an odd number of replicas?
CodePudding user response:
Option 1: ( Better option since having more ARBITER's is easy in k8s)
You may need to add 1x more ARBITER , 5x total voting members will allow you to keep the PRIMARY even 2x of the DATA members die simultaneously at the same time.
Option 2:
You remove the ARBITER since with 4x members and two down the PRIMARY will switch to SECONDARY since there will be no majority , but if you keep it election expected to be faster with 3x votes when only one member die.