Courseiva

C100DBA · topic practice

Replication practice questions

This domain covers MongoDB replica set behavior: how primaries, secondaries, and arbiters interact; how elections and failover work under network partitions; and how write concern and read preference determine durability, consistency, and availability. Questions are scenario-based, asking you to predict outcomes of node failures, partitions, and member configurations.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Replication

What the exam tests

What to know about Replication

You must predict replica set behavior under failover, partition, and write concern scenarios. The single most important thing: a primary needs majority connectivity to remain primary, and w:1 writes acknowledged but not yet replicated can be rolled back on crash.

Election and failover behavior when a primary loses majority connectivity in a replica set

Member roles: priority 0, hidden, delayed, and arbiter nodes and their election influence

Write concern semantics including w:1, w:majority, and j journaling acknowledgment

Read preference modes such as primary, secondary, and nearest for distributed read routing

Watch out for

Common Replication exam traps

  • ▸Assuming a partitioned primary keeps accepting writes; without majority it steps down and writes fail or roll back.
  • ▸Confusing priority 0 with hidden; priority 0 can still vote and serve reads unless also hidden.
  • ▸Believing w:1 guarantees durability; an unacknowledged write can be lost if the primary crashes before replication.

Practice set

Replication questions

20 questions · select your answer, then reveal the explanation

Which TWO of the following conditions must be met for a replica set member to be eligible to become a primary?

Question 2mediummultiple choice
Read the full Replication explanation →

Which setting should be used in a connection string to ensure that an application only reads from a node that has data at least as fresh as the primary?

Question 3mediummulti select
Read the full Replication explanation →

Which THREE of the following are valid methods to add a new member to an existing replica set?

Question 4hardmultiple choice
Read the full Replication explanation →

Refer to the exhibit. If node 0 (the current primary) goes offline, which node will be elected as the new primary?

Exhibit

rs.conf() output:
{ "_id": "mySet", "members": [
  { "_id": 0, "host": "n0:27017", "priority": 2 },
  { "_id": 1, "host": "n1:27017", "priority": 1 },
  { "_id": 2, "host": "n2:27017", "priority": 0 }
] }
Question 5mediummultiple choice
Read the full Replication explanation →

What is the primary purpose of the 'vote' field in the replica set configuration?

Question 6mediummultiple choice
Read the full Replication explanation →

Which of the following best describes the 'hidden' member status in a replica set?

Question 7mediummulti select
Read the full Replication explanation →

Which TWO of the following configurations are required to ensure that a replica set can survive the loss of a single node without manual intervention?

Question 8hardmultiple choice
Read the full Replication explanation →

Refer to the exhibit. If the primary node crashes, what is the expected outcome of the election process?

Exhibit

rs.status() output:
member[0]: { stateStr: 'PRIMARY', optime: { ts: Timestamp(1600000000, 1) } }
member[1]: { stateStr: 'SECONDARY', optime: { ts: Timestamp(1600000000, 1) } }
member[2]: { stateStr: 'SECONDARY', optime: { ts: Timestamp(1600000000, 1) } }
Question 9hardmultiple choice
Read the full Replication explanation →

Refer to the exhibit. If srv2 goes down, what happens to the primary election?

Exhibit

rs.conf() output:
members: [
  { _id: 0, host: 'srv1:27017', priority: 1 },
  { _id: 1, host: 'srv2:27017', priority: 2 },
  { _id: 2, host: 'srv3:27017', priority: 0 }
]
Question 10mediummultiple choice
Read the full Replication explanation →

Which setting controls how long a secondary node will wait before attempting to reconnect to a primary that has become unreachable?

Question 11mediummultiple choice
Read the full Replication explanation →

Which command is used to view the current replication configuration and status in a MongoDB shell?

Question 12mediummultiple choice
Read the full Replication explanation →

A DBA manages a replica set with members in two data centers: Site A (primary and one secondary) and Site B (one secondary). The DBA wants to ensure that if Site A becomes completely unavailable, the remaining member in Site B does not become primary and accept writes, because the application requires strong consistency. Which replica set configuration setting should the DBA adjust?

Question 13mediummulti select
Read the full Replication explanation →

A DBA is configuring a replica set for a new application that requires high availability and the ability to perform maintenance on secondaries without impacting the primary. The DBA needs to ensure that the replica set can continue to accept writes if the primary becomes unavailable. Which two configuration settings or practices should the DBA implement? (Choose two.)

Question 14hardmultiple choice
Read the full Replication explanation →

You are managing a MongoDB replica set with members in two data centers: Site A (primary and one secondary) and Site B (one secondary). You want to ensure that if Site A fails entirely, the secondary in Site B can become primary and accept writes. What should you do?

Question 15easymultiple choice
Read the full Replication explanation →

You are a DBA for a MongoDB 6.0 replica set. You need to add a new member to the replica set, but you want to minimize the impact on the primary's performance during the initial sync. Which approach should you take?

Question 16mediummultiple choice
Read the full Replication explanation →

A three-member MongoDB replica set (rs0) has members mongodb-1 (priority 1, votes 1), mongodb-2 (priority 0.5, votes 1), and mongodb-3 (priority 0, votes 1). mongodb-3 is configured as a hidden member with votes 1. The primary mongodb-1 becomes unresponsive due to a network partition. Which member will be elected as the new primary?

Question 17mediummultiple choice
Read the full Replication explanation →

You are monitoring a MongoDB 6.0 replica set and notice that a secondary member is significantly behind the primary. You need to determine the replication lag. Which command should you use to check the replication lag on the secondary?

A MongoDB DBA is planning to add a new member to an existing replica set. The new member will be in a remote data center with higher network latency. The DBA wants to ensure the new member can be added successfully and does not negatively impact the existing replica set. Which two actions should the DBA take before adding the new member? (Choose two.)

Question 19mediummultiple choice
Read the full Replication explanation →

In a three-node replica set with default write concern w:1, what happens to an unacknowledged write if the primary crashes immediately after receiving the write command but before replicating it to secondaries?

Question 20easymultiple choice
Read the full Replication explanation →

Refer to the exhibit. What is the primary function of the node with _id 2 in this replica set?

Exhibit

rs.status()
{
  "set": "mySet",
  "members": [
    { "_id": 0, "stateStr": "PRIMARY", "optime": { "ts": Timestamp(1600000000, 1) } },
    { "_id": 1, "stateStr": "SECONDARY", "optime": { "ts": Timestamp(1600000000, 1) } },
    { "_id": 2, "stateStr": "ARBITER" }
  ]
}

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Replication sessions

Start a Replication only practice session

Every question in these sessions is drawn from the Replication domain — nothing else.

Related practice questions

Related C100DBA topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the C100DBA exam test about Replication?
You must predict replica set behavior under failover, partition, and write concern scenarios. The single most important thing: a primary needs majority connectivity to remain primary, and w:1 writes acknowledged but not yet replicated can be rolled back on crash.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Replication questions in a focused session?
Yes — the session launcher on this page draws every question from the Replication domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other C100DBA topics?
Use the topic links above to move to related areas, or go back to the C100DBA question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the C100DBA exam covers. They are not copied from any real exam or dump site.