转载

C100DBA认证讲解 MongoDB replication 原理

C100DBA认证讲解 MongoDB replication 原理

C100DBA认证讲解 MongoDB replication 原理

dbDao 百度贴吧:http://tieba.baidu.com/dbdao

MongoDB技术学习QQ群: 421431253

题目正文:

which of following is true of mechanics of replication in MongoDB?

  1. Clients read from nearest member of a replica set by default
  2. Members of a replica set may replicate data from any other data-bearing member of set .
  3. Operations on the primary are recorded in a capped collection called oplog

翻译:

下面关于Mongodb的replication复制技术细节描述正确的是?

  1. 复制集成员会默认从复制集中最近的成员哪里读取数据
  2. replica set 复制集中的成员可能从其他任何承载数据的节点上复制数据
  3. 在primary上的操作将会被记录到一个capped collection(受限集合)中称之为oplong

Replica set members replicate data continuously after the initial sync. This process keeps the members up to date with all changes to the replica set’s data. In most cases, secondaries synchronize from the primary.

http://docs.mongodb.org/manual/core/replica-set-sync/

==>默认情况下从Primary同步数据,而不是复制集中最近的成员

For a member to sync from another, both members must have the same value for the buildIndexes setting.

Beginning in version 2.2, secondaries avoid syncing from delayed members and hidden members .

从2.2开始secondaries会避免从延迟成员和隐藏成员哪里同步数据,所以复制集中的成员可能从其他任何承载数据的节点上复制数据是错误的

The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. MongoDB applies database operations on the primary and then records the operations on the primary’s oplog. The secondary members then copy and apply these operations in an asynchronous process. All replica set members contain a copy of the oplog, in the local.oplog.rs collection, which allows them to maintain the current state of the database.

http://docs.mongodb.org/manual/core/replica-set-oplog/

选项Operations on the primary are recorded in a capped collection called oplog是正确的。

正文到此结束
Loading...