Mongo DB Replica set redundancy test

Source: Internet
Author: User
Testing process:
1, three machines are alive in the case, the display status is as follows:


Description: The third machine 10.253.4.191 displayed as primary. The remaining 2 display states are secondary.
2, testing the current three survival time data, the set name is dictionary. Three data shows as follows:


Description: The last piece of data shows test11.
3. Deactivate the server process for the primary collection. View the collection status in any of the remaining 2 Taichung tables. As follows:

Description: The current primary status is displayed on the second server "ip:10.139.39.61" and the third State is unreachable.
4, in the current situation, through the service window to add a test data Testone. as follows:

Description: Testone data added successfully
5. Start the third service process. Look at the synchronization of the data as follows:

Description: After the third service process started, it succeeded to synchronizing the data to the current primary.

Conclusion: The Mongo DB replica set is tested to meet the needs of the rest of the server to take over the read and write tasks after the primary server in the three services.
Defect: When a machine is on three servers, one can be automatically selected as the primary server by the remaining 2 Taichung computers. If at this time the Machine Master service process, will not be the remaining one as the primary service process, the data will be unable to read and write. This occurs because the MONGO DB replica set requires at least three nodes to meet the data migration requirements.

Mongo DB Replica set redundancy test

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.