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