C100DBA · Question #105
You have designed a web application with mongoDB. You have configured replication. The replica set is in place and function properly. What happens in case of failure?
The correct answer is B. Failover happens automatically. MongoDB replica sets are designed with automatic failover built in: when the primary node becomes unavailable, the remaining secondary nodes hold an election and automatically promote a new primary - no human intervention required. Why the distractors are wrong: A & C (Switchover
Question
You have designed a web application with mongoDB. You have configured replication. The replica set is in place and function properly. What happens in case of failure?
Options
- ASwitchover needs to be done manually
- BFailover happens automatically
- CSwitchover happens automatically
- DFailover needs to be done manually
How the community answered
(33 responses)- A6% (2)
- B91% (30)
- D3% (1)
Explanation
MongoDB replica sets are designed with automatic failover built in: when the primary node becomes unavailable, the remaining secondary nodes hold an election and automatically promote a new primary - no human intervention required.
Why the distractors are wrong:
- A & C (Switchover): A switchover is a planned, manual transition between nodes (e.g., for maintenance). The question describes an unplanned failure, so "switchover" is the wrong term entirely.
- D (Manual failover): This contradicts MongoDB's core design goal - the replica set's election protocol exists precisely to eliminate the need for manual intervention during failures.
Memory tip: Think of it this way - Failover = Fast and Fully automatic (MongoDB handles it). Switchover = you Switch it yourself. The key word in the question is failure, which maps to failover, and MongoDB replica sets make failover automatic.
Topics
Community Discussion
No community discussion yet for this question.