Alex Rivera | Logout

Memcached vs. Redis?

Asked 2012-05-11T20:52:48.313
1481

We're using a Ruby web-app with Redis server for caching. Is there a point to test Memcached instead?

What will give us better performance? Any pros or cons between Redis and Memcached?

Points to consider:

  • Read/write speed.
  • Memory usage.
  • Disk I/O dumping.
  • Scaling.
Edit
Report

2 Answers

46

Memcached is good at being a simple key/value store and is good at doing key => STRING. This makes it really good for session storage.

Redis is good at doing key => SOME_OBJECT.

It really depends on what you are going to be putting in there. My understanding is that in terms of performance they are pretty even.

Also good luck finding any objective benchmarks, if you do find some kindly send them my way.

answered 2012-05-11T23:27:34.110
7

One major difference that hasn't been pointed out here is that Memcache has an upper memory limit at all times, while Redis does not by default (but can be configured to). If you would always like to store a key/value for certain amount of time (and never evict it because of low memory) you want to go with Redis. Of course, you also risk the issue of running out of memory...

answered 2013-03-01T09:45:27.077

Your Answer