4

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?

David Oliveros
  • 661
  • 8
  • 12
  • What happened when you tested it? – WiredPrairie Sep 23 '13 at 10:52
  • Do not close this question. I am a CouchDB developer. I know for a fact Redis makes a better cache. It is not a matter of opinion. – JasonSmith Sep 23 '13 at 11:43
  • 1
    I didn't actually benchmark both databases, but after some further research, Redis seems the right way to go for caching. CouchDB is used for other purposes. JasonSmith's answer on this question explains the differences pretty well: http://stackoverflow.com/questions/4720508/redis-couchdb-or-cassandra/4720977#4720977 – David Oliveros Sep 24 '13 at 02:15

1 Answers1

3

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.

JasonSmith
  • 72,674
  • 22
  • 123
  • 149