MongoDB Tutorial 0/120 lessons ~6 min read Lesson 82
Replica Sets
A replica set is a group of MongoDB instances that maintain the same data.
Course progress0%
Focus
2 guided sections
Practice signal
Concept-first lesson
Career prep
Foundation builder
Introduction
A replica set is a group of MongoDB instances that maintain the same data. One is primary (accepts writes), the rest are secondaries (replicate the oplog). If the primary fails, secondaries elect a new one — automatic failover in seconds.
Syntax reference
bash
Primary ◄── writes│ oplog├──► Secondary 1└──► Secondary 2
Ready to mark this lesson complete?Track your journey across the entire course.