MongoDB offers most of the advantages for using a replica set and then some more:
- Protecting from data loss
- High availability of data
- Disaster recovery
- Avoiding downtime for maintenance
- Scaling reads since we can read from multiple servers
- Helping design for geographically dispersed services
- Data privacy
The most notable item missing from the list in the introduction to our chapter is scaling writes. This is because in MongoDB, we can only have one primary and only this primary can take writes from our application server.
When we want to scale write performance, we typically design and implement sharding, which is the topic of the next chapter.
Two interesting properties of the way MongoDB replication is implemented are geographically dispersed services and data privacy.
It is not uncommon for our application servers to be located in multiple...