当前位置:网站首页>谁说Redis不能存大key
谁说Redis不能存大key
2022-06-09 17:10:00 【InfoQ】
一、社区版Redis的大key痛点

- 内存消耗不均衡,大key所在分片有OOM风险
- 扩容时需要搬迁部分数据,大key耗时久,会导致访问阻塞甚至数据丢失
- 删除或过期大key时,业务访问被长时间阻塞,甚至导致主从同步中断
二、华为云GaussDB(for Redis)的大Key解决方案
1. 高斯Redis支持大key存储,不用担心分片OOM
- 社区版Redis存储大key会导致分片内存消耗不均,随着集群整体数据量水位提升,大key所在分片随时有OOM风险。

- 高斯Redis支持大key可靠存储,且不会导致分片OOM。需要注意的是,虽然高斯Redis适合用来可靠存储大key,但从网络链路角度考虑,业务应避免对大key执行诸如hgetall等风险命令。

2. 高斯Redis在大key场景中也支持秒级无损扩容
- 社区版Redis在扩容时,由于要搬迁数据,此时画风是这样的:

- 高斯Redis支持秒级扩容,并支持升规格、加节点、加存储容量3种手段灵活扩容,运维体验极佳。

3. 高斯Redis删除/过期大key时,业务0阻塞
- 社区版Redis大key的删除/过期都会导致访问严重阻塞。实测删除/过期一个大hash key(包含1000w个元素),社区版Redis访问阻塞长达整整14秒。

- 高斯Redis从根本上解决了大key删除/过期操作隐患。在高斯Redis中,对任何数据执行删除/过期,都是立刻执行成功且0阻塞。这是由于底层采用了真正的“标记删除”,因此完全不影响业务访问。实测删除/过期一个大hash key(包含1000w个元素),高斯Redis仅毫秒级。

三、总结

边栏推荐
猜你喜欢

使用tesseract识别图片中的文字

idea卸载教程

nlp网络中两种残差结构对网络的影响

文心 ERNIE 3.0加持!小样本也可实现全量数据99%的效果!

秒云云原生信创全兼容解决方案,推动信创产业加速落地

About not adding mysql data. DLL

Error occurred when pychart installs the scratch Library‘
Android 缓存机制 LRUCache
How to use cloud notes to record and sort out the graduation notes given by teachers to students

项目右键添加引用,提示:对COM组件的调用返回了错误HRESULT E_FAIL
随机推荐
pyepics CA -- 3
How to use cloud notes to record and sort out the graduation notes given by teachers to students
c语言解决爬楼梯问题
JLINK RTT can be opened but cannot display problems and bin file output considerations on the desktop
Interview questions - Supplement of Huawei computer test knowledge points
主动预防-DWS关键工具安装确认
Memory concept
C语言选举人投票功能
Experience sharing in application for assessment of doctor of management - Information Collection
二叉树遍历与线索化
14届数独-真题标准数独-Day 5-20220120
使用tesseract识别图片中的文字
[East China Normal University] information sharing for the first and second examinations
八连冠!浪潮云连续8年蝉联中国政务云市场第一位
Key ideas of enterprise service end defense
Leetcode 1967. The number of strings that appear in a word as substrings
【重磅】云商店品牌全新升级,惊喜大奖来袭!参与互动抽华为最新折叠手机
CPU program interrupt
常用数的集合
Pyepics -- alarm: respond when a PV is out of range