Kim Spasaro

Robomongo Now Supports Replica Sets

April 25, 2017

Robomongo is a graphical user interface for managing Mongo databases. In other words, Robomongo is to MongoDB what PHPMyAdmin is to MySQL. Traditionally it has been difficult to manage MongoDB replica sets with Robomongo. However, the official release of Robomongo 1.0 last week provides a number of new features, including–you guessed it–support for replica sets!

MongoDB and Replica Sets

replica set is a cluster of MongoDBs where each member replicates the same database (contrast this to a sharded cluster). At any given time, a single node is the primary member of the replica set. All other members are considered secondary. The primary receives all write operations for the replica set. It logs operations to the oplog so that the secondary members can replicate any database changes, thereby keeping all members of the set in sync. If the primary ever becomes unavailable, secondaries hold an election process to determine the new primary.

Robomongo 1.0

In the past it has been difficult to manage replica sets using Robomongo. You couldn’t make changes to a database unless you knew which member was the primary for your replica set. If you did find and connect to the primary, you still ran into trouble anytime a different node was elected to become the new primary. However, Robomongo 1.0 provides full support for replica sets. When creating a new connection just change the connection type from Direct Connection to Replica Set and voila! Robomongo takes care of the rest.