Suggest an editImprove this articleRefine the answer for “What does the primary node do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The primary node in a Replica Set is the main node that accepts every write operation and acts as the source of data for the other nodes: it records every change in the oplog (an operations log), which secondaries read and replay to stay an exact copy. **Key point:** by default the primary also handles reads (the "read your own writes" principle), and if it goes down, the other nodes hold an election and pick a new primary - the system doesn't sit idle.Shown above the full answer for quick recall.Answer (EN)ImageThe primary node in a Replica Set is the **main node that accepts every write operation and acts as the source of data for the other nodes**. It's the one that defines the "current state" of the collections at any given moment. ### The primary's main responsibilities 1. **Accepts all writes** Every `insert`, `update`, `delete` operation always goes to primary first. Secondaries never write directly, they only copy. 2. **Records changes in the oplog** Primary writes every change to the **oplog**, an operations log. Secondaries read it and replay the same operations on themselves, staying an exact copy. 3. **Handles reads by default** If the client hasn't changed `readPreference`, reads (`find`, `aggregate`) also go to primary. That's how consistency is achieved under the *read your own writes* principle. 4. **Takes part in elections and quorum management** If the Replica Set has a failure and primary disappears, the other nodes hold an `election` and pick a new primary. But while it's alive, it's the center of replication. ### Primary's defining characteristics - the sole write point in the Replica Set - the source of truth (the actual state) - every other node stays synchronized with it ### Why a primary is needed in this model To ensure: - **data consistency**, no conflicting writes from different nodes - **simplified replication**, changes propagate from a single center - **automatic failover**, a new primary is elected on failure, and the system doesn't sit idle ### Summary Primary is the central node that accepts writes, records them in the oplog, and serves as the synchronization source for every secondary. It keeps the data current and drives the main flow of operations in the Replica Set.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.