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.