Mongodb-replication Secondary Members

Source: Internet
Author: User
Tags failover
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.