Get the App
SLTechnology News&Howtos  ›  Database  › 

The difference between memcache Database and redis Database (Theory)

Shulou Source: shulou.com Published: 2022-06-01 10:02:40 10月01日 Update

After learning about memcache clusters and redis clusters, I have some problems:

Redis clusters support more storage types than memcache clusters, while redis clusters support data persistence and better protect data integrity.

So, why are some enterprises still keen on memcache clusters? Let's think about it together.

Differences in data storage:

In redis clusters, not all data is kept in memory all the time.

The data of memcache is kept in memory all the time.

Differences in the use of resources:

Redis uses a single core, while memcache can use multiple cores.

Differences in performance:

When the data on each core is less than 100K, redis is faster, and vice versa, memcache is faster.

However, this is not the point of the difference between the two, because the number of requests processed per second will not be the bottleneck between the two.

Differences in data recovery:

Redis has data persistence and master-slave replication. After power outage and restart, the data can be restored.

Memcache does not have these functions, and data is lost after power outage and restart.

Which cluster to choose depends on the business requirements. If data loss is not allowed, you can only choose redis.

Differences in the category of stored data:

Redis supports special storage tables: key-value, hash, list, etc.

Memcache only supports key-value, but memcache can cache pictures, videos, and so on in memory.

Tags: Data clustering storage support memory selection database business master-slave enterprise function picture integrity performance data recovery times bottlenecks categories types cache Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MariaDB OPPO Reno Linux Shulou Technology