📜  Redis 和 Memcached 的区别

📅  最后修改于: 2021-09-11 06:21:25             🧑  作者: Mango

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

2.内存缓存:
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 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.