7
votes

Can we use Cassandra as a distributed in-memory cache database by utilizing its file level caching, key cache, and row cache?

I don't want to overload each node and I want to add more nodes to the cluster when the data grows to make this effective (to let most of my data be cached). Especially since 40% of my column families are static, and updates/insertions to other tables are not much.

The primary aim of ours is that we need an elastic realtime data store (faster around as in memory dB)

3

3 Answers

12
votes

Cassandra was not born for the goal but after many optimizations it has become also a tool for in-memory caching. There are a few experiments -- the most significant I know is the one reported by Netflix. In Netflix they replaced their EVCache system (whom was persisted by a Cassandra backend) with a new SSD cassandra-based cache architecture -- the results are very impressive in term of performance improvements and cost-reduction.

Before choosing Cassandra as a replacement for any cache system I'd recommend to deeply understand the usage of row-caching and key-caching. More, I've never used Datastax Enterprise but it has an interesting in memory table feature.

HTH, Carlo

5
votes

I guess you could but I don't think that's correct use-case for Cassandra. Without knowing more about your requirements, I'd recommend you have a look at products like e.g. Hazelcast which is an in-memory distributed cache and sounds more like a fit for your use-case.

1
votes

I know its a little late but I've just come accross this post doing some research on Cassandra.

I've seen success with Tibco's AST (recently rebranded to DTM) for in memory caching.

I've also played around with Pivotal's gemfire (this uses Geode under the covers), which has shown some promise.