For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Replica Set Read and Write Semantics

From the perspective of a client application, whether a MongoDB instance is running as a single server (i.e. "standalone") or a replica set is transparent. However, MongoDB provides additional read and write configurations for replica sets.

Note

Sharded clusters where the shards are also replica sets provide the same operational semantics with regards to write and read operations.

Write Concern for Replica Sets

Write concern describes the level of acknowledgment requested from MongoDB for write operations.

Read Preference

Read preference specifies where (i.e. which members of the replica set) the drivers should direct the read operations.

Server Selection Algorithm

Describes the mechanics of read preference.