简体   繁体   中英

Cassandra Row Cache vs Redis Cache

I am planning to use some cache to avoid frequent read operation (same data). Application is build with Node.js. I am using Apache Cassandra database.

Should I use Cassandra Row Cache or go with Redis cache ?

I am already using Redis server for caching PHP session, GEO spatial search and caching other data for PHP application.

Which will be better for performance ? Cassandra Row Cache or Redis Cache ?

Since you are already using redis server, I would lean towards Redis.
Redis is a pure in-memory solution which competes with oracle coherence etc. You need to do lot of transformations since the column family needs to be mapped to a key value form of redis.

Cassandra cache is just an add-on provided by the database. Building cache would be faster using cassandra cache since there are no additional transformations to be done but performance of redis server would most likely be better

I work for ScyllaDB a Cassandra compatible database written in C++.

There are many reasons why not to place a cache before the database - foremost in my view the application/deployment get much more complex. So if the DB can provide caching that should be selected.

ScyllaDB's cache by default cache's partitions/rows data. If Cassandra's row cache does not serve you well - you can try Scylla.

I gave a talk last year on such a use case with Outbrain on their experience of moving from Cassandra+Memcache to ScyllaDB Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IOPS of Cassandra

You may also find the following post by our CEO and Co-Founder Dor Laor on why placing a cache before the database should be avoided 7 Reasons Why Not to Put a Cache in Front of Your Database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM