Millions of O & M Experience 1: Mongodb and Redis data cannot be stored on the same server

Source: Internet
Author: User

At the beginning, Mongodb and Redis were put on one server to save servers. Every peak period of a website is particularly slow, and 502 is frequently used. After looking for a long time, I found that the hard disk has a large write data and high IOPS, and I have not found many reasons for troubleshooting. Then I carefully studied the monitoring and found that the operation on the hard disk was regular. I wrote the hard disk frequently every few minutes. I thought that the interval from synchronizing data from Redis to the hard disk was several minutes, so I began to suspect that it was caused by Redis. So I added a server and put Redis alone there. I found that the website was getting faster and 502 problems were no longer encountered. It was really a painful experience. As for the solution of placing Mongodb and Redis on different hard disks of the same server, I have not tested it. It is estimated that it will also affect Mongodb, because Redis synchronizes data to the hard disk, the CPU usage is relatively high. The server that stores Redis is a quad-core CPU. When synchronizing data to the hard disk, the CPU usage is as high as 60%. It may also be related to poor hard disk write performance. Redis is very memory-consuming, it occupies hard disk IO resources.

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.