Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the maximum number of nodes in a MongoDB Replica Set exactly 12?

Sorry for that dumb question, but why exactly that number? At first I thought it must only be odd number, but actually it is 7 as the maximum voting node, and overall a maximum of 12 nodes. If you wish to run more than this, you must use the deprecated master/slave configuration.

So how to explain this number?

like image 251
Abdelouahab Avatar asked Oct 27 '25 14:10

Abdelouahab


1 Answers

All members of a replica set maintain knowledge of the current state of each of the other members. This is the rationale for limiting the total number of nodes to twelve - more than that would introduce too much overhead in heartbeats between each pair of nodes.

Maximum of seven voting members is to avoid slowing down elections - since you need to have a consensus election to select a new primary limiting the number of nodes that need to coordinate amongst themselves will keep things faster.

like image 174
Asya Kamsky Avatar answered Oct 29 '25 04:10

Asya Kamsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!