Reprinted from: Http://stackoverflow.com/questions/10558465/memcached-vs-redis
Updated 10/9/2014
Today marks the day this memcached no longer has a significant advantages over Redis and while Redis continues to having many Distinct advantages over memcached. Today, Redis 3.0, which includes Redis Cluster, entered the Release candidate stage. previously when looking at memcached vs Redis might has been inclined to choose memcached due to the 3rd party CL Ustering tools available. Now Redis offers clustering, and unlike memcached are provided out-of-the-box. Being Built-in provides a more robust solutionthat's easier to administrate. Combined with other high availability tools In-the-box like replication and Sentinel (monitoring), Redis clearly have t He more compelling scalingthe story today.
As of today every major feature and strength memcached offers is now a subset of Redis ' features and strengths. Any use case you might use memcached for Redis can solve equally well. They is both lightning fast as volatile caches. While that's all this memcached is it's only the tip of the Redis iceberg.
Memcached is a volatile in-memory Key/value store. Redis can act like one (and does that job as well as memcached), but it's a data structure server.
The Redis superset
Here is a few of the features that Redis offers which memcached doesn ' t and allows Redis to be used as a "real" data stor e instead of just a cache.
- Powerful data types and powerful commands to leverage them. Hashes, Sorted sets, Lists, and more.
- Persistence to disk , by default.
- transactions with optimistic locking (watch/multi/exec)
- pub/sub. Extremely fast.
- Values up to 512MB in size (memcached limited to 1MB per key)
- Lua scripting (as of 2.6)
- Built in Clustering (as of 3.0)
- extremely fast at everything. Benchmarks was often conflicting, but this much was clear:when used like memcached Redis falls somewhere between nearly as Fast or maybe even a little faster. Like memcached it's often bound by available network or memory bandwidth instead of CPUs or other bottlenecks and would rar Ely was the culprit when your app was slowing down.
The powerful data types is particularly important. They allow Redis to provide a fantastic GKFX queue (lists), a great messaging solution (pub/sub), a good place for s Toring sessions (hashes), and a compelling place for high score tracking (sorted sets). These is just a few examples that scratch the surface.
Conclusion
To answer your original question:the performance and memory usage of Redis compared to memcached should be relatively Similar. Close enough that for most uses any performance difference in either direction are academic as neither is likely Bottleneck.
unless you already has a large investment in memcached, going forward redis is the obvious solution. For solutions both tools would solve, go with the one that offers more flexibility for new use cases and also provides bet ter out-of-the-box availability, scalability, and Administration:redis.
About the difference between Redis and memcached (reprinted from StackOverflow)