Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top