After understanding the Memcache cluster and the Redis cluster, I have some problems:
Redis cluster supports more storage types than memcache clusters, and Redis cluster supports data persistence, which can protect data integrity better.
So why are some companies still keen on memcache clusters? Let's think about it together.
differences in data storage :
In a Redis cluster, not all of the data is kept in memory,
The memcache data is kept in memory.
differences in Resource usage :
Redis uses a single core, and memcache can use multiple cores.
The difference in performance:
When the data on each core is less than 100K, Redis is faster and vice versa is faster than memcache.
But that's not the point of the difference, because the number of requests per second is not a bottleneck.
Differences in Data recovery:
Redis has data persistence and master-slave replication, and the data can be recovered after the power outage restarts.
Memcache without these features, the data is lost after the power outage restarts.
Select which cluster to choose, this depends on the business requirements, if data loss is not allowed, then you can only choose Redis.
Differences in storage data categories:
Redis supports storage tables: Key-value, hash tables, list tables, etc.
Memcache only supports Key-value, but memcache can cache images, videos, etc. in memory.
The difference between a memcache database and a Redis database (theory)