0
0
MongoDBquery~5 mins

Replica set configuration basics in MongoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
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.
Click to reveal answer
beginner
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.
Click to reveal answer
beginner
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.
Click to reveal answer
intermediate
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.
Click to reveal answer
intermediate
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.
Click to reveal answer
What is the main function of the primary node in a MongoDB replica set?
AServe only read operations
BHandle all write operations
CBackup data to external storage
DMonitor network traffic
Which of the following is true about secondary nodes in a replica set?
AThey can become primary through an election
BThey reject all read operations
CThey do not replicate data
DThey control the replica set configuration
What does the replica set configuration document NOT include?
AMember roles and priorities
BReplication settings
CList of replica set members
DUser authentication credentials
How does a replica set maintain high availability?
ABy automatic failover and elections
BBy backing up data every hour
CBy limiting connections to one client
DBy disabling writes during failures
Which command initializes a replica set in MongoDB?
Amongo.startReplica()
Bdb.createReplica()
Crs.initiate()
Drs.start()
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.