Priority 0 Replica Set members
Once the priority is set to 0, the slave node cannot be promoted to the primary node. A member with a priority of 0 does not trigger an election, and in addition, the node has no difference from the other nodes, the node with priority 0 has the same data set as the master node, can receive read requests, and participates in voting. By setting the priority of the slave node to 0, preventing it from being promoted to the primary node can play a very good role in the structure of the Distributed data center.
Only three members of the data set, the master node and the slave node are located in one data center, and the other priority is 0 from the node in another data center:
Primary 0 Members as Standbys
In some situations where the hardware environment or the architecture is geographically diverse, a standby node with a priority of 0 can ensure that the eligible nodes are upgraded to the primary node.
Primary 0 Members and Failover
When you configure a node with a priority of 0, you need to consider possible failover scenarios, such as network failures.
Hidden Replica Set Members
A hidden node has the same set of data as the master node and is not visible to the application. A hidden node can be isolated from other nodes in the replica set and should be used for special needs. A hidden node is a node with a priority of 0. The function Db.ismater () will not hide the node. Hidden nodes are allowed to vote in an election.
Behavior Read Operations
The client will not distribute the read request to the hidden node. A hidden node can be used for a report node or a backup node. The deferred node should also be a hidden node.
In a shard cluster, MONGOs will not communicate with the hidden nodes.
Voting
Hidden nodes are involved in voting. When closing a hidden node, make sure that the number of nodes in the replica set is sufficient for the election in case the primary node demotion causes the replica set to be unavailable externally.
Delay Replica Set Members Considerations Requirements Behavior sharding Example Configuration
Mongodb-replication Secondary Members