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. 从客户端应用程序的角度来看,MongoDB实例是作为单个服务器(即“独立”)运行还是作为副本集运行是透明的。However, MongoDB provides additional read and write configurations for replica sets.但是,MongoDB为副本集提供了额外的读写配置。

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 acknowledgement requested from MongoDB for write operations.写入关注点描述了从MongoDB请求的写操作确认级别。
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.描述读取首选项的机制。
←  Rollbacks During Replica Set FailoverWrite Concern for Replica Sets →