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 –
|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 diffcult 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.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Redis and MongoDB
- Difference between Redis and MariaDB
- Difference between Redis and MS SQL Server
- Difference between Cassandra and Redis
- Difference between Redis and MySQL
- Difference between CouchDB and Redis
- Difference between Couchbase and Redis
- Difference between Redis and IBM Db2
- Difference between Neo4j and Redis
- Difference and Similarities between PHP and C
- Difference between Stop and Wait protocol and Sliding Window protocol
- Similarities and Difference between Java and C++
- Difference between Yaacomo and and XAP
- Difference between VoIP and and POTS
- Difference between ++*p, *p++ and *++p
- Difference Between DOS and Windows
- Difference between User Level thread and Kernel Level thread
- What’s difference between The Internet and The Web ?
- Difference between Priority Inversion and Priority Inheritance
- What’s difference between Linux and Android ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.