Open In App

Difference between Redis and Memcached

Improve
Improve
Like Article
Like
Save
Share
Report

1. Redis : 
Redis is an open-source, key-value, NoSQL database. It is an in-memory data structure that stores all the data served from memory and uses disk for storage. It offers a unique data model and high performance that supports various data structures like string, list, sets, hash, which it uses as a database cache or message broker. It is also called Data Structure Server. It does not support schema RDBMS, SQL, or ACID transactions. 

2. Memcached : 
Memcached is a simple, open-source, in-memory caching system that can be used as a temporary in-memory data storage. The stored data in memory has high read and write performance and distributes data into multiple servers. It is a key-value of string object that is stored in memory and the API is available for all the languages. Memcached is very efficient for websites. 

Difference between Redis and Memcached – 

 

Parameter REDIS MEMCACHED
Initial Release It was released in 2009. It was released in 2003.
Developer It was developed by Salvatore Sanfilippo. It was developed by Danga Interactive.
Cores Used It uses single cores. It uses multiple cores.
Length of a key In Redis, maximum key length is 2GB. In Memcached, maximum key length is 250 bytes.
Installation It is simple and easier to install as compared to Memcached. It may be difficult to install.
Data Structure It uses list, string, hashes, sorted sets and bitmaps as data structure. It uses only string and integers as data structure.
Speed It reads and writes speed is slower than Memcached. It reads and writes speed is higher than Redis.
Replication It supports Master-Slave Replication and Multi-Master Replication methods. It does not support any replication method.
Durability It is more durable than Memcached. It is less durable than Redis.
Secondary database model It has Document Store, Graph DBMS, Search Engine, and Time Series DBMS as secondary database models. It has no secondary database models.
Persistence It uses persistent data. It does not use persistent data.
Partitioning method It supports Sharding. It does not support any partitioning method.

 


Last Updated : 10 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads