Replica Set Read and Write Semantics
From the perspective of a client application, whether a MongoDBinstance is running as a single server (i.e. “standalone”) or areplica set is transparent. However, MongoDB providesadditional read and write configurations for replica sets.
Note
Sharded clusters where the shards are alsoreplica sets provide the same operational semantics with regards towrite and read operations.
- Write Concern for Replica Sets
- Write concern describes the level of acknowledgement requestedfrom MongoDB for write operations.
- Read Preference
- Read preference specifies where (i.e. which members of the replicaset) the drivers should direct the read operations.
- Server Selection Algorithm
- Describes the mechanics of read preference.