Mastering Replication
Replication has been one of the most useful features of MongoDB since the very early days. In general, replication refers to the process of synchronizing data across different servers. The benefits of replication include protection from data loss and high availability of data. Replication also provides disaster recovery, avoidance of downtime for maintenance, and scaling reads since we can read from the primary and any of the secondary servers. In this chapter, we will cover the following topics:
- Replication
- An architectural overview
- How do elections work?
- What is the use case for a replica set?
- Setting up a replica set
- Connecting to a replica set
- Replica set administration
- Cloud options for a replica set
- Replica set limitations
By the end of this chapter, you will have mastered the underlying theory and concepts as well as the practical implementation of replication using MongoDB.