Boosting MongoDB Availability with Arbiters

Learn about the role of arbiters in replica-set, PSA Architecture, and more

Ayush Gupta
4 min readSep 26, 2024

--

Not a Medium Member, read this article here.

A MongoDB Arbiter is a special type of mongod instance used in a replica set.

Its role is to provide a vote during elections to determine which node becomes the primary (i.e., the node responsible for handling writes) when there is a failure.

This feature is crucial in cases where having an additional data-bearing node is not feasible due to resource constraints​

Why is it Required?

Arbiters are used in specific scenarios where you need high availability but cannot afford to maintain an additional replica node due to cost or hardware limitations.

In MongoDB, a majority of nodes must be available for a replica set to elect a primary.

An arbiter participates in elections for primary but an arbiter cannot become a primary. An arbiter has exactly 1 election vote.

With a Replica Set of 2 data nodes, losing 1 server brings you below your voting minimum (which is “greater than N/2”). An arbiter solves this.

--

--

Ayush Gupta
Ayush Gupta

Written by Ayush Gupta

Generalist || Sharing what I know || Software Engineering || AI || Game Theory || Life