Hidden Replica Set Members
cookqq ›博客列表 ›MongoDB

Hidden Replica Set Members

2015-11-25 17:25:13.0|分类: MongoDB|浏览量: 1765

摘要: 隐藏成员保持复制数据功能,但是客户端程序不可见。隐藏成员必须是优先级0成员并且不能成为主副本

Hidden Replica Set Members

A 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.

Diagram of a 5 member replica set with a hidden priority 0 member.

Behavior

Read Operations

Clients 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.

Voting

Hidden 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 Reading

For more information about backing up MongoDB databases, see MongoDB Backup Methods. To configure a hidden member, see Configure a Hidden Replica Set Memb


一键分享文章

分类列表

  • • struts源码分析
  • • flink
  • • struts
  • • redis
  • • kafka
  • • ubuntu
  • • zookeeper
  • • hadoop
  • • activiti
  • • linux
  • • 成长
  • • NIO
  • • 关键词提取
  • • mysql
  • • android studio
  • • zabbix
  • • 云计算
  • • mahout
  • • jmeter
  • • hive
  • • ActiveMQ
  • • lucene
  • • MongoDB
  • • netty
  • • flume
  • • 我遇到的问题
  • • GRUB
  • • nginx
  • • 大家好的文章
  • • android
  • • tomcat
  • • Python
  • • luke
  • • android源码编译
  • • 安全
  • • MPAndroidChart
  • • swing
  • • POI
  • • powerdesigner
  • • jquery
  • • html
  • • java
  • • eclipse
  • • shell
  • • jvm
  • • highcharts
  • • 设计模式
  • • 列式数据库
  • • spring cloud
  • • docker+node.js+zookeeper构建微服务
版权所有 cookqq 感谢访问 支持开源 京ICP备15030920号
CopyRight 2015-2018 cookqq.com All Right Reserved.