Mongodb – Two arbiters in mongodb architecture

high-availabilitymongodb-3.2

I am distributing several instances of mongoDB between two datacenters (DC). I want to have high availability (HA), which means that three instances must always be active if one of DC goes down.

My decision has been:

  • DC1:

    • Primary
    • Secondary
    • Arbiter
  • DC2:

    • Secondary
    • Hiden
    • Arbiter

Can I choose 2 arbiters for HA? Or it is a mistake?

Best Answer

Your suggested configuration still allows a split-brain situation to occur. If the link between the two datacentres goes down, both arbiters will nominate their local nodes as the primary. The two DCs will continue independently, and will not be able to reform the cluster when the connection is re-established.

The ideal configuration has a single arbiter in a 3rd location. We put ours in the cloud. It's a really good use-case for that.