MongoDB Replica Set Maintenance

Source: Internet
Author: User

MongoDB replica Set Maintenance main work:

1. View replica set status (cluster status, synchronization delay, single library run status Mongostate)

2, delete nodes, stop node shutdown


MongoDB replica set cluster synchronization mechanism

    1. The purpose of data replication is to maximize the availability of data, redundancy, and avoid single points of failure.

    2. Only one server can be written at the same time in a replica set, primary the main library, synchronizing data from the library

    3. Replica set master-slave replication is also the process of asynchronous synchronization. Slave gets the log from the primary and then performs the logged operation in full sequence on its own (the log does not log query operations, only records update operations). The synchronized log is the Oplog.rs table in the local library, which occupies a larger space and has a disk size of 5%. Startup parameter settings oplog.rs size:--oplogsize 1000, Unit m. In the production environment, it is recommended that the settings be larger to prevent the synchronization situation from occurring.



View cluster status

    1. Rs.status ()

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/11/wKiom1hg1xiBP7bjAADBMNj_mvU878.png "title=" Rsstats.png "alt=" Wkiom1hg1xibp7bjaadbmnj_mvu878.png "/>

2.db.printslavereplicationinfo ()

650) this.width=650; "src=" Http://pic002.cnblogs.com/images/2012/184465/2012072515021832.png "/>

3.mongostat

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8C/11/wKiom1hg1pXTgeHtAACXCt8ELss730.png "title=" Mongostat.png "alt=" Wkiom1hg1pxtgehtaacxct8elss730.png "/>


MongoDB Replica Set Maintenance

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.