Redis vs Memcached

Rajendra Uppal
Aug 24, 2017 · 1 min read
  1. Memcached is in-memory key value store whereas Redis is in-memory data structures store.
  2. Memcached supports only string data type which is ideal for storing read-only data. Redis supports almost all types of data.
  3. Redis can also be used as a messaging system such as pubsub. Memcached cannot be used as a pubsub system.
  4. Memcached is more memory efficient than Redis. Redis is more memory efficient only after you use hashes.
  5. Memcached is volatile store and Redis is non-volatile. Means that data might be lost in Memcached after a reboot of the server/machine. On the other hand, Redis can handle persistent data, and by default Redis syncs data to the disk at least every 2 seconds.
  6. Memcached does not support replication, whereas Redis supports master-slave replication.
  7. Memcached stores variables in memory and retrieves data directly from server memory. Redis is like a database that resides in memory.
  8. Memcached is very good at handling high traffic websites. It can read lot of information at a time and have a great response time. Redis can not handle heavy traffic on read/write.
  9. Memcached maximum key length is 250 bytes whereas Redis has a maximum of 2gigs.

Cheers!

Software Architecture

All things software design and architecture

)
Rajendra Uppal

Written by

AVP Engineering @ inFeedo | www.linkedin.com/in/rajendrauppal

Software Architecture

All things software design and architecture

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade