Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using cassandra instead of memcache?

I keep reeding those articles from different sources that big sites are switching from memcache to cassandra. Coming from a mySQL background, I'll get a slight headache trying to see the pros/cons when compared to each other.

Can you help me out to learn more about this?

like image 502
Industrial Avatar asked May 19 '10 11:05

Industrial


People also ask

When should you not use Cassandra?

When you want many-to-many mappings or join tables. Cassandra doesn't support a relational schema with foreign keys and join tables. So if you want to write a lot of complex join queries, then Cassandra might not be the right database for you.

Can Cassandra be used as cache?

Cassandra's built-in key and row caches can provide very efficient data caching. Already, several Cassandra users who care deeply about read performance have leveraged these caching features to effectively pry dedicated caching tools such as memcached completely out of the stack.

Should I use Memcache or Redis?

Redis uses a single core and shows better performance than Memcached in storing small datasets when measured in terms of cores. Memcached implements a multi-threaded architecture by utilizing multiple cores. Therefore, for storing larger datasets, Memcached can perform better than Redis.

Is Cassandra faster than Redis?

Redis is faster than Cassandra in form of big data fetching and storing especially in the case of live streaming. Redis normally maintained a disk backed in-memory database. It normally maintained master-slave architecture (as the following a line with Hadoop Architecture).


1 Answers

It would be silly to replace memcached as a cache with Cassandra in most situations.

What companies like Digg are doing is, replacing the database+memcached pair with Cassandra: Cassandra provides both durable storage, and an integrated, high performance cache (the "row cache"). This prevents problems like memcached being populated from an out of date slave (what Twitter calls "potential consistency") and simplifies cluster management.

like image 94
jbellis Avatar answered Oct 03 '22 00:10

jbellis