Replication in MongoDB
Learn about MongoDB replication and how it enables data durability, data recovery, and improved maintenance cycles.
Replication in MongoDB
Unit Overview
In this unit, you'll learn about the importance of replication for a production-ready environment with MongoDB. In addition, you'll learn about elections in MongoDB, the operations log (oplog), and read and write concerns. Finally, you'll learn how to deploy your own replica set.
Prerequisites
Lessons in This Unit
- Lesson 1 – Introduction to Replication
- Lesson 2 – Replication in MongoDB
- Lesson 3 – Automatic Failover and Elections with MongoDB Deployments
- Lesson 4 – The MongoDB Operation Log
- Lesson 5 – Read and Write Concerns with MongoDB Deployments
- Lesson 6 – Deploying a Replica Set in a MongoDB Deployment
- Lesson 7 – Configuring a Replica Set in a MongoDB Deployment
-
01.
-
02.Lesson 2: Replication in MongoDB
- Learn
- Practice
-
03.Lesson 3: Automatic Failover and Elections with MongoDB Deployments
- Learn
- Practice
-
04.Lesson 4: The MongoDB Operation Log
- Learn
- Practice
-
05.Lesson 5: Read and Write Concerns with MongoDB Deployments
- Learn
- Practice
-
06.Lesson 6: Deploying a Replica Set in a MongoDB Deployment
- Learn
- Practice
-
07.Lesson 7: Configuring a Replica Set in a MongoDB Deployment
- Learn
- Practice
-
08.Conclusion
- Learn
Parker Faucher | University Curriculum Engineer
Parker is a Curriculum Engineer on the Education team at MongoDB. Prior to joining MongoDB, he helped maintain a world class developer bootcamp that was offered in multiple universities. He is a self taught developer who loves being able to give back to the community that has helped him so much.
Vick Mena | Director, Curriculum
My name is Vick and I've been in the wild for over 25 years. I grew up at IBM working on the BIOS for the IBM eServer line in Austin, TX before moving to Wall St. I've worked on all phases of software development from low-level to middleware to UI but feel most comfortable in the middle. I also drank the devops kool-aid having moved a product line to AWS while at Dow Jones & Co with the help of an amazing team. I then pivoted into the secure space and worked on software/hardware reverse engineering. I always thought I'd eventually teach and this role lets me leverage all of my experience to lead this motley crew of passionate educators.
Welcome to our unit on replication in MongoDB! In this unit, we’ll start by going over the basics of replication and then take you all the way to deploying and configuring your own MongoDB replica set.
My name is Cam. I’m a Technical Instructor here at MongoDB, and I’ll be your guide through this unit.
Replication is integral to creating a production-ready environment in MongoDB, so it’s crucial to understand how it works.
Replication offers plenty of advantages.
For example, it provides high availability through automatic failover processes.
It also provides additional copies of data so that special reads can be isolated from the rest of the workload.
If some of these terms are unfamiliar to you, don’t worry. This unit is going to cover all of them and more.
In this unit, we’ll first cover what replication is and what high availability means.
Then, we’ll examine how replication works in MongoDB.
You’ll learn how replica sets use elections. And then we’ll move on to understanding how the oplog works.
Next, you’ll learn about read and write concerns when using a replica set and how to configure them. You’ll also learn how to configure read preferences.
All of this will lead up to us deploying our own three-member replica set and configuring it to our specifications.
Throughout this unit, you'll have plenty of opportunities to practice what you learned by completing labs and quizzes that present real-world scenarios. This way, you'll build your knowledge and get comfortable with the software at the same time.
Let’s get started!