Database Reference
In-Depth Information
Learning about a replica set
The replica set is a collection of mongod processes. Each replica set has one and only one
primary mongod process that accepts all write and read operations from the clients. All
other mongod processes are known as secondaries; they copy all operations from the
primary node and apply them so that all secondaries have the same data at once, along
with the replication log at varying speeds. This lag depends on the amount of data, network
speed, and so on.
The data synchronization procedure happens with the help of replication. To support replic-
ation, the primary node will record all write operations in its oplog .
The following diagram illustrates the relations between clients, primary , and second-
ary nodes:
Search WWH ::




Custom Search