Recall & Review
beginner
What is a primary node in MongoDB?
A primary node is the main server in a MongoDB replica set that receives all write operations. It replicates data to secondary nodes.
Click to reveal answer
beginner
What is a secondary node in MongoDB?
A secondary node is a server in a MongoDB replica set that copies data from the primary node and can serve read operations.
Click to reveal answer
beginner
Why does MongoDB use primary and secondary nodes?
To ensure data is safe and available. The primary handles writes, and secondaries keep copies to protect against failure and allow reads.
Click to reveal answer
intermediate
What happens if the primary node fails in MongoDB?
The replica set automatically elects a new primary from the secondary nodes to keep the database working without interruption.
Click to reveal answer
beginner
Can secondary nodes accept write operations directly?
No, only the primary node accepts writes. Secondary nodes replicate data from the primary and can serve reads if configured.
Click to reveal answer
What role does the primary node play in a MongoDB replica set?
✗ Incorrect
The primary node handles all write operations and replicates data to secondary nodes.
What is the main purpose of secondary nodes?
✗ Incorrect
Secondary nodes replicate data from the primary node to keep copies of the data.
If the primary node fails, what happens next?
✗ Incorrect
MongoDB elects a new primary from the secondary nodes to maintain availability.
Can secondary nodes serve read requests in MongoDB?
✗ Incorrect
Secondary nodes can serve read requests if the system is set up to allow it.
Which node type in MongoDB replica set accepts write operations?
✗ Incorrect
Only the primary node accepts write operations in a MongoDB replica set.
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 what happens during a primary node failure in MongoDB.
Focus on failover and election process.
You got /4 concepts.