The minimum recommended configuration for a replica set is a three member replica set with three data-bearing members: one primary and two secondary members.
Primary
Secondary
Arbiter
The primary is the only member that receives all write operations.
MongoDB applies write operations on the primary and then records the operations on the primary's oplog. Secondary members replicate this log and apply the operations to their data sets.
All members of the replica set can accept read operations. by default, an application directs its read operations to the primary member.
The replica set can have at most one primary. [2] If the current primary becomes unavailable, an election determines the new primary.
Secondaries replicate operations from the primary to maintain an identical data set.
To replicate data, a secondary applies operations from the primary's oplog to its own data set in an asynchronous process.
A replica set can have one or more secondaries.
Although clients cannot write data to secondaries, clients can read data from secondary members.
A secondary can become a primary. If the current primary becomes unavailable, the replica set holds an election to choose which of the secondaries becomes the new primary.
An arbiter participates in elections for primary but an arbiter does not have a copy of the data set and cannot become a primary.
An arbiter has exactly 1 election vote. By default an arbiter has priority 0.
If you need to add a new secondary to an existing replica set to increase read capacity, what steps would you take and what role does that member play?
During a simple deployment, you notice that one member is showing state PRIMARY while another shows SECONDARY. What does that tell you about the replica set members?
Your application is experiencing intermittent read errors after a network partition. How would you investigate which replica set member is causing the issue?
You need to reconfigure a replica set to add an arbiter without downtime. Explain why you would choose an arbiter and what impact it has on the member composition.
At scale, you have a replica set spread across three data centers. How do you decide the distribution of voting members and secondaries to balance latency and fault tolerance?
During a rolling upgrade, a secondary member fails to catch up and remains in RECOVERING state. What are the possible reasons related to its member configuration, and how would you resolve it?
Your organization is migrating from multiple independent replica sets to a sharded cluster with replica set shards. How would you plan the transition of member roles to ensure continuity and minimal impact on write availability?
When designing a global multi‑region deployment, how would you leverage replica set member configurations (e.g., priority, hidden, delayed) to meet both low‑latency reads and disaster‑recovery requirements?