Recall & Review
beginner Click to reveal answer
What is a MongoDB replica set?
A MongoDB replica set is a group of mongod processes that maintain the same data set, providing redundancy and high availability.
beginner Click to reveal answer
What is the role of the primary node in a replica set?
The primary node receives all write operations and replicates data to secondary nodes.
beginner Click to reveal answer
How does a secondary node in a replica set function?
A secondary node copies data from the primary and can serve read operations if configured, providing data redundancy.
intermediate Click to reveal answer
What is the purpose of the replica set configuration document?
It defines the members of the replica set, their roles, priorities, and settings for replication behavior.
intermediate Click to reveal answer
What happens if the primary node in a replica set fails?
The replica set automatically holds an election to select a new primary from the secondary nodes to maintain availability.
What is the main function of the primary node in a MongoDB replica set?
✗ Incorrect
The primary node handles all write operations and replicates data to secondaries.
Which of the following is true about secondary nodes in a replica set?
✗ Incorrect
Secondary nodes replicate data and can become primary if elected.
What does the replica set configuration document NOT include?
✗ Incorrect
User authentication credentials are managed separately, not in the replica set config.
How does a replica set maintain high availability?
✗ Incorrect
Replica sets use automatic failover and elections to keep the system available.
Which command initializes a replica set in MongoDB?
✗ Incorrect
The rs.initiate() command starts the replica set configuration.
Explain the roles of primary and secondary nodes in a MongoDB replica set.
Think about who writes data and who copies it.
You got /4 concepts.
Describe how a MongoDB replica set ensures data availability when a node fails.
Focus on what happens when the primary goes down.
You got /4 concepts.
