문제

I am using MongoDB for persisting data, and Redis for session storage. I need to cache a complex aggregation query done on MongoDB, so I was wondering what your opinions are on Caching on NodeJS, specifically caching with Redis or CouchDB.

Which one is more performant? Correct me if I'm wrong, but is having a different database specifically for cache better in terms of scalability?

도움이 되었습니까?

해결책

It depends what you want to do; but basically, Redis is much more performant than CouchDB, and it is much more suitable for a cache system. Redis is an in-memory database (with options to sync to disk), with features for expiring data after a certain time.

Redis is used often for caching, so it may be better in terms of scalability. If you already have Redis running now, then you will have no additional maintenance overhead compared to CouchDB.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top