2015-11-25 17:25:13.0|分类: MongoDB|浏览量: 1610
Hidden Replica Set MembersA hidden member maintains a copy of the primary’s data set but is invisible to client applications. Hidden members are good for workloads with different usage patterns 模式 from the other members in the replica set. Hidden members must always be priority 0 members and so cannot become primary. Thedb.isMaster() method does not display hidden members. Hidden members, however, may vote inelections. 隐藏成员保持复制数据功能,但是客户端程序不可见。隐藏成员必须是优先级0成员并且不能成为主副本 In the following five-member replica set, all four secondary members have copies of the primary’s data set, but one of the secondary members is hidden. BehaviorRead OperationsClients will not distribute reads with the appropriate read preference to hidden members. As a result, these members receive no traffic other than basic replication. Use hidden members for dedicated tasks such as reporting and backups. Delayed members should be hidden. In a sharded cluster, mongos do not interact with hidden members. VotingHidden members may vote in replica set elections. If you stop a voting hidden member, ensure that the set has an active majority or the primary will step down. For the purposes of backups, you can avoid stopping a hidden member with the db.fsyncLock() anddb.fsyncUnlock() operations to flush all writes and lock the mongod instance for the duration of the backup operation. Further ReadingFor more information about backing up MongoDB databases, see MongoDB Backup Methods. To configure a hidden member, see Configure a Hidden Replica Set Memb |