If mongodb is used as a persistent storage database, is it necessary to use redis for another layer of cache?
滿天的星座
滿天的星座 2017-05-16 13:19:03
0
3
1078

Mongodb is used as a persistent storage database. Is it necessary to use redis for another layer of cache?

ps: I have observed that the mongodb server process takes up more than 1g of memory when running even if the data volume is very small (more than 1g capacity). Could it be that mongodb itself has implemented a set of methods to store hot data in memory? cache?

滿天的星座
滿天的星座

reply all(3)
阿神

Redis does caching just to speed up application or website access and reduce database pressure. This is the purpose of caching.
If the access speed of mongodb is normal and the pressure is not great, then there is no need to use cache.

滿天的星座

You guessed it right, mongoDB tends to store data in memory as much as possible; redis is not needed if the pressure is not high.

大家讲道理

Could it be that mongodb has implemented a cache of hot data in memory?

Correct.

Mongodb is used as a persistent storage database. Is it necessary to use redis for another layer of cache?

If you don’t feel it’s necessary, it’s not necessary. For MongoDB, generally only content that requires a lot of calculations needs to be placed in the cache.

In addition, Redis can not only be used as a cache, but also has many other uses.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!