Which of the following best explains why replication is needed in MongoDB?
Think about what happens if one database server stops working.
Replication creates copies of data on multiple servers. This helps keep data available even if one server fails, and MongoDB can automatically switch to a backup server.
What main problem does replication solve in a database system like MongoDB?
Consider what happens if the main database server crashes.
Replication keeps copies of data on different servers so that if one server crashes, data is not lost and can be recovered from another server.
Given a MongoDB replica set, what does the command rs.status() return?
rs.status()
Think about what information you want to see about the replica set members.
The rs.status() command returns detailed information about each member's state in the replica set, such as which is primary or secondary, and their health.
How can replication improve read performance in MongoDB?
Think about how having multiple copies of data can help with reading data.
Replication allows applications to read from secondary members, spreading the read load and improving performance.
Which of the following best describes a key benefit of replication for disaster recovery in MongoDB?
Think about how replication helps when a whole server or data center goes down.
Replication keeps data copies on different servers, often in different locations, so if one site fails, data is still safe and can be recovered quickly.