MongoDB Grooming notes Reduce node

Source: Internet
Author: User

When applying pressure hours, you can reduce the cost of hardware resources by reducing the number of nodes; This is a long-term and ongoing work.

The following two new nodes just added 28013 and 28014 from the replication set to remove, just execute the rs.remove instructions can be, specifically as follows:

Rs1:primary> rs.remove ("localhost:28014""OK": 1 }rs1:primary> Rs.remove ("localhost:28013"  "OK": 1}

Viewing the replication set status, you can see that now only 28010, 28011, 28012 of these three members, the original 28013 and 28014 were successfully removed

Rs1:primary>Rs.status () {"Set": "Rs1","Date": Isodate ("2012-05-31t14:08:29z"),"MyState": 1,"Members" : [{"_id": 0,"Name": "localhost:28010","Health": 1,"State": 1,"Statestr": "PRIMARY","Optime" : {"T": 1338473273000,"I": 1},"Optimedate": Isodate ("2012-05-31t14:07:53z"),"Self":true},{"_ID": 1,"Name": "localhost:28011","Health": 1,"State": 2,"Statestr": "Secondary","Uptime": 34,"Optime" : {"T": 1338473273000,"I": 1},"Optimedate": Isodate ("2012-05-31t14:07:53z"),"Lastheartbeat": Isodate ("2012-05-31t14:08:29z")},{"_ID": 2,"Name": "localhost:28012","Health": 1,"State": 2,"Statestr": "Secondary","Uptime": 34,"Optime" : {"T": 1338473273000,"I": 1},"Optimedate": Isodate ("2012-05-31t14:07:53z"),"Lastheartbeat": Isodate ("2012-05-31t14:08:29z")}],"OK": 1}rs1:primary>
View Code

MongoDB Grooming notes Reduce node

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.