1. Redis & memecached Comparison
|
Memory management |
Persistence of |
Data type |
Client Support |
Concurrency performance |
Memcached |
How the memory pool is pre-allocated |
Persistence is not supported |
Support for simple key-value storage |
Rich and diverse client support |
Weaker than Redis |
Redis |
On-site application of memory to store data |
Support Persistence |
Supports multiple data structures |
Rich and diverse client support |
Excellent performance |
2. The difference between Redis and memcached:
(1) Redis not only supports simple k/v types of data, but also provides storage of data structures such as List,set,zset,hash.
(2) Redis support data backup, that is, Master-slave mode of data backup.
(3) Redis support data persistence, you can keep the in-memory data on the disk, restart the time can be loaded again for use.
3. Redis usage Scenario (1) The best way to use Redis is to in-memory all data. (2) Redis more scenes are used as substitutes for memcached. (3) Redis is more appropriate when it is necessary to support more data types than Key/value. (4) Using Redis is more appropriate when the stored data cannot be excluded.
Redis VS Memcached