In a MongoDB replica set, what event causes the automatic failover process to start?
Think about what happens if the main server stops working.
Automatic failover starts when the primary node is unreachable or stops responding, so a new primary can be elected to keep the database available.
Given a MongoDB replica set with 3 members: one primary and two secondaries, if the primary goes down, what will be the state of the replica set after automatic failover?
Think about how MongoDB keeps the database available after failure.
When the primary fails, one of the secondaries is elected as the new primary to maintain availability.
Which MongoDB shell command correctly shows the current status of the replica set, including primary and secondaries?
It is a method of the rs object.
The rs.status() command returns detailed information about the replica set's current state.
Which configuration change can reduce the time it takes for automatic failover to complete in a MongoDB replica set?
Failover speed depends on how quickly nodes detect primary failure.
Lowering electionTimeoutMillis makes secondaries detect primary failure faster, triggering quicker elections.
A MongoDB replica set does not perform automatic failover when the primary node goes down. Which of the following is the most likely cause?
Think about what is needed for an election to succeed.
Failover requires a majority of voting members to be available to elect a new primary. If the majority is not reachable, failover cannot occur.