Learn MongoDB (ii) Replica set cluster configuration

Source: Internet
Author: User

1. Official website: https://docs.mongodb.org/manual/tutorial/deploy-replica-set-for-testing/

2, Replica set Introduction: https://docs.mongodb.org/manual/core/replica-set-members/

3. Briefly describe what is replica Set:

If we use a single MongoDB database, then there will be a single point of failure and so on, MongoDB allows us to make a number of single MongoDB database ("Cluster replica Set") to provide a unified service.

  ("Cluster replica Set") has the following characteristics:

1: Data synchronization between nodes automatically, that is, the data between nodes is consistent.

2: Inter-node Health check, failure automatic switch, no impact on the client.

  ("Cluster replica Set") Role:

1, the primary node (primary) is responsible for receiving client read and write requests.

2. The secondary node (secondary) automatically replicates the data from the primary node, and can handle the client's read request (which must not be processed by the client).

  ("Cluster replica Set") runs the process:

1, the master node (primary) records all the operations to their own log, the secondary node (secondary) will automatically go to the Master node copy log, and then synchronize the data changes to their own database, so as to ensure data consistency.

2, if the primary node (primary) in the cluster fails, then the remaining secondary node (secondary) will automatically elect a new master node, such as.

  

3, if the original failure of the primary node and recovery is available, then he will join the cluster, then he will become a secondary node (secondary), and then immediately go to the current master node synchronization data, so that the formation of a new cluster, is not very powerful.

Learn MongoDB (ii) Replica set cluster configuration

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.