Database Reference
In-Depth Information
Summary
In this chapter, you learned how to move a MongoDB instance to a new server without
downtime. First of all, you learned that the standalone mongod instance is not highly
available. So, while migrating, you might be faced with a brief outage.
In the first part of this chapter, you learned how to migrate a replica set using the replica-
tion feature of MongoDB. This approach has no downtime and is simple and straightfor-
ward since replication moves the database completely.
Also, you learned that the only concern for this method is that clients cannot perform write
operations during election, and we introduced a hack to perform these operations at an in-
terval. Meanwhile, we learned how to route read operations during election using the
slaveOk function.
Then, you learned how to convert a standalone mongod instance to a replica set and follow
the same approach to migrate a replica set for the standalone instance. Furthermore, we in-
troduced a way to move the database by duplicating the dbpath and pointing the new in-
stance to the existing database directory.
In the next chapter, we will talk about monitoring and diagnosing the MongoDB instance
using different built-in and third-party tools.
Search WWH ::




Custom Search