📜  Redis和Memcached之间的区别

📅  最后修改于: 2021-08-27 04:43:46             🧑  作者: Mango

1. Redis:
Redis是一个开源的键值NoSQL数据库。它是一种内存中数据结构,用于存储从内存提供的所有数据,并使用磁盘进行存储。它提供了独特的数据模型和高性能,可支持各种数据结构,例如字符串,列表,集合,哈希,可将其用作数据库缓存或消息代理。它也称为数据结构服务器。它不支持架构RDBMS,SQL或ACID事务。

2. Memcached:
Memcached是一个简单的开源内存中缓存系统,可用作临时内存中数据存储。内存中存储的数据具有很高的读写性能,并且可以将数据分配到多个服务器中。它是存储在内存中的字符串对象的键值,并且该API适用于所有语言。 Memcached对于网站而言非常有效。 Redis和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 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.