Redis vs Memcached

Rajendra Uppal
Software Architecture
1 min readAug 24, 2017

--

  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!

--

--

Rajendra Uppal
Software Architecture

Senior Software Engineering Manager at Microsoft, Avid Reader, Ex Adobe, IIT Delhi, www.linkedin.com/in/rajendrauppal