nerdexam
MongoDB

C100DBA · Question #23

Which node in a replica set does accept write operation?

The correct answer is C. primary. In a MongoDB replica set, only the primary node accepts write operations - all writes are directed to it, and changes are then replicated asynchronously to secondaries. An arbiter (A) participates in elections to break ties but holds no data and cannot serve reads or writes…

Replication

Question

Which node in a replica set does accept write operation?

Options

  • Aarbiter
  • Bhidden
  • Cprimary
  • Dsecondary

How the community answered

(32 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    88% (28)
  • D
    6% (2)

Explanation

In a MongoDB replica set, only the primary node accepts write operations - all writes are directed to it, and changes are then replicated asynchronously to secondaries. An arbiter (A) participates in elections to break ties but holds no data and cannot serve reads or writes. Hidden nodes (B) are special secondaries that are invisible to client applications and can only serve internal purposes like backups - no direct writes. Secondary nodes (D) replicate data from the primary and can serve reads (if enabled), but never accept writes directly.

Memory tip: Think "Primary = Pen" - only the primary holds the pen to write.

Topics

#replica set#primary node#write operations

Community Discussion

No community discussion yet for this question.

Full C100DBA Practice