![](https://www.pythian.com/hubfs/Imported_Blog_Media/replica_set.png)
I had interesting use case with a MongoDB replica set I'd like to share. When the replica set consists of four nodes and the Primary goes down, no new node is elected to become the new Primary. The replica set is in read only mode. So, what is going on here? At first you may ask, why does the replica set have four nodes? Should there be an odd number of nodes, not even? Well, this is true, there should be an odd number of voting members in a replica set. In this case, there were three voting members and one hidden node, with votes:0. The setup may be seen in the diagram below: [caption id="attachment_104347" align="alignleft" width="607"]
![MongoDB replica set MongoDB replica set](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/replica_set.png?width=607&height=565&name=replica_set.png)
Conclusion
Replica sets provide redundancy and high availability. The failover with MongoDB replica set is automatic, but there must be an eligible secondary member. Running a replica set with priority:1 on only one node is dangerous and may cause downtime. Sometimes it’s hard to figure out why the replica set does not elect a new primary even when there are healthy members as secondary nodes. As much as the configuration options in a replica set provide flexibility for different setups, you should always be cautious.Find out how Pythian can help you with all of your MongoDB needs.
Share this
Previous story
← Big Data on Microsoft Azure – HDInsight
Next story
Azure Backup for SQL Server public preview →
You May Also Like
These Related Stories
An Open Letter to Larry Ellison on AWR and ASH Licensing
An Open Letter to Larry Ellison on AWR and ASH Licensing
Jun 29, 2007
4
min read
Oracle Data Pump Can't Import LONG Columns
Oracle Data Pump Can't Import LONG Columns
Oct 30, 2006
2
min read
Oracle 11gR2 Grid Infrastructure -- Memory Footprint
![](https://www.pythian.com/hubfs/Imported_Blog_Media/DIMMs.png)
Oracle 11gR2 Grid Infrastructure -- Memory Footprint
Mar 6, 2010
5
min read
No Comments Yet
Let us know what you think