← 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 a hidden replica set member used for?

    Answer: Serving as a dedicated reporting or analytics node invisible to client applications

    Hidden members maintain a copy of the primary's data but are invisible to client read preferences. They can hold votes but have priority 0 (cannot become primary). Common use cases include dedicated reporting, analytics, or backup nodes that must not receive application traffic.

  2. What is replication lag in a MongoDB replica set?

    Answer: The time difference between oplog entries on the primary and their application on a secondary

    Replication lag is the time delay between when an operation is written to the primary's oplog and when it is applied on a secondary. High replication lag can cause stale reads from secondaries and risks the secondary falling off the oplog if lag exceeds the oplog window.

  3. What read preference should be used to always read from the primary in MongoDB?

    Answer: primary

    The 'primary' read preference (the default) directs all read operations to the primary member, ensuring the most up-to-date data. It is the only read preference that guarantees reading the latest committed writes at the cost of increased primary load.

  4. A delayed replica set member with a delay of 1 hour is useful for:

    Answer: Providing a point-in-time recovery window to recover from accidental data deletions

    A delayed secondary applies oplog entries with a configurable delay (e.g., 1 hour). This creates a rolling backup window. If a developer accidentally drops a collection, the delayed member provides a recovery point before the destructive operation was applied.

  5. What does rs.status() return in the MongoDB shell?

    Answer: The current status of all replica set members including health, state, and replication lag

    rs.status() returns detailed information about each replica set member, including its state (PRIMARY, SECONDARY, ARBITER), health, uptime, last heartbeat time, and optionally replication lag (optimeDate difference from primary). It is the primary diagnostic command for replica sets.

  6. Which write concern provides the lowest durability but the highest write throughput in MongoDB?

    Answer: { w: 0 }

    { w: 0 } is 'fire and forget' — MongoDB does not wait for any acknowledgment before returning to the client. This gives maximum throughput but offers no durability guarantee. The write may be lost if the server crashes before it is persisted.

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