Book Image

MongoDB High Availability

By : Afshin Mehrabani
Book Image

MongoDB High Availability

By: Afshin Mehrabani

Overview of this book

Table of Contents (17 chapters)
MongoDB High Availability
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Overview of replica sets


There are two ways to deploy a replica set, for production or development, and testing. In this chapter, we will deploy replica set for production use. The same procedure is used to deploy a replica set in a development environment, but the requirements are different.

A three-member replica set can provide enough power to overcome network and server issues. To have a smooth election process, it's recommended that you have an odd number of members in a replica set.

The following diagram shows a replica set with three members:

Likewise, for production use of a replica set, each replica set should be hosted on different machines. As you are aware, each machine can face network or hardware failure, so by hosting Missing object type instance on different machines, we can make sure that if a machine fails, we won't lose all the mongod processes.