← All MongoDB Flashcard Decks

MongoDB Replication and Replica Sets Flashcards

6 cards from real MongoDB practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 MongoDB Replication and Replica Sets flashcards as text
  1. What is the purpose of the 'priority' field in a replica set member configuration?

    Answer: Influencing which member is most likely to be elected primary

    The priority field (default 1) influences election outcomes. Members with higher priority are preferred as primary candidates. Setting priority to 0 prevents a member from becoming primary — useful for secondaries in remote data centers or dedicated reporting nodes.

  2. What happens to a replica set member whose oplog window is exceeded by replication lag?

    Answer: It enters RECOVERING state and must be resynced from another member

    If a secondary falls too far behind and the primary's oldest oplog entry is newer than the secondary's last applied operation, the secondary can no longer replicate incrementally. It enters RECOVERING state and requires a full resync (initial sync) from a healthy member.

  3. What is the secondaryPreferred read preference in MongoDB?

    Answer: Prefer reading from a secondary; fall back to primary if no secondary is available

    secondaryPreferred directs reads to available secondary members when possible, distributing read load away from the primary. If no secondary is available, it falls back to the primary. This is useful for scaling read-heavy workloads while tolerating slightly stale data.

  4. Which command initiates an election to step down the current primary in MongoDB?

    Answer: rs.stepDown()

    rs.stepDown() causes the current primary to step down and initiate an election among eligible secondaries. It takes an optional stepDownSecs parameter specifying how long to remain ineligible for re-election, allowing another member to become primary.

  5. What is the purpose of readConcern 'linearizable' in MongoDB?

    Answer: Reads reflect the majority-committed state at the start of the read operation

    readConcern 'linearizable' ensures that read operations reflect all successful majority-acknowledged writes that completed before the read began. It provides the strongest consistency guarantee but requires confirmation from a majority, making it slower than other read concerns.

  6. What is an initial sync in MongoDB replica set replication?

    Answer: A full copy of a data-bearing member's data to a new or recovering member

    Initial sync is the process of fully copying all data from a source member (primary or secondary) to a new or recovering member. MongoDB copies all collections, builds indexes, and then applies any oplog entries that occurred during the copy to bring the member up to date.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. 10geneducation.zendesk.com — Test dates, score release, passing score, test delivery, retake policy · verified Oct 2026
  2. learn.mongodb.com — Eligibility, fees, exam format, time limit · verified Oct 2026