前言
Reprinted from: https://mp.weixin.qq.com/s?__biz=MzI3ODcxMzQzMw==
主要有以下方式
- Shorten the storage length of key-value pairs;
- Use the lazy free (delayed deletion) feature;
- Set the expiration time of the key value;
- Disable long time-consuming query commands;
- Use slowlog to optimize time-consuming commands;
- Use Pipeline to manipulate data in batches;
- Avoid simultaneous failure of a large amount of data;
- Client use optimization;
- Limit Redis memory size;
- Use a physical machine instead of a virtual machine to install the Redis service;
- Check the data persistence strategy;
- Disable THP feature;
- Use distributed architecture to increase read and write speed.
For more details, check out the reprinted article