当前位置:网站首页>Who says redis can't save big keys
Who says redis can't save big keys
2022-06-09 20:37:00 【Huawei cloud developer Alliance】
This article is shared from Huawei cloud community 《 Hua Wei Yun GaussDB(for Redis) Uncover secrets 18 period : Who says Redis Cannot save large key》, author : gaussian Redis The official blog .
One 、 Community Edition Redis The big key Pain points
GaussDB(for Redis) Expert Xiaoqiang has been a little busy recently , Because many account managers come to him to consult the community version Redis The big key problem , And all of them are eager for knowledge :
Xiaoqiang slaps his thigh : You really asked the right person !
According to the current network experience , The production environment is large key As a result of Redis Accidents are common , The typical one is capacity expansion failure 、 Request blocking 、OOM Downtime, etc . Inadequate early business planning 、 Message queue consumption is not timely 、 Failure to clean up invalid data in time and other reasons may lead to big key hidden danger .
Community Edition Redis Big key Hidden dangers are common in the following three scenarios :
- Memory consumption is uneven , Big key There are OOM risk
- Some data needs to be moved during capacity expansion , Big key It takes a long time , It will lead to access blocking and even data loss
- Delete or expire large key when , Business access is blocked for a long time , Even lead to master-slave synchronization interruption
Community Edition Redis The architecture is not suitable for reliable storage key, The industry can only recommend prevention 、 Disassemble or timely clean up large key. From a customer perspective , In fact, some scenes need to be big key Of , Such as enterprise ERP System , Massive currency exchange rate storage, etc . At this time, even if it is properly split , Also can not avoid larger HASH key There is .
Two 、 Hua Wei Yun GaussDB(for Redis) The big Key Solution
Xiaoqiang always believes that , A good product should try to leave the complexity to itself , Leave simplicity to users . therefore , Xiaoqiang asks everyone about big key The problem account managers are Amway better Solution ——
Use Huawei cloud enterprise level KV database GaussDB(for Redis)
Big key scenario ,GaussDB(for Redis) It's better than the community version Redis Where is the excellence ? The following from 3 In depth analysis from three angles :
1. gaussian Redis Support big key Storage , Don't worry about fragmentation OOM
- Community Edition Redis Big storage key This will lead to uneven consumption of fragmented memory , As the overall data volume of the cluster rises , Big key At any time, there are OOM risk .
- gaussian Redis Support big key Reliable storage , And will not lead to fragmentation OOM. It should be noted that , Although Gauss Redis Suitable for reliable storage of large key, But from the perspective of network links , The business should avoid large key Perform such as hgetall And so on .
2. gaussian Redis At large key The scene also supports second level lossless capacity expansion
- Community Edition Redis During the expansion , Due to data relocation , At this time, the painting style is like this :
chart : Community Edition Redis At large key Scene expansion , High risk
It can be summarized as : Have big key, Open source Redis Please expand the capacity carefully !
- gaussian Redis Support second level capacity expansion , And support to upgrade the specification 、 Add nodes 、 Add storage capacity 3 Flexible capacity expansion by means of , Excellent operation and maintenance experience .
chart : gaussian Redis At large key The scenario can be safely expanded
As can be seen from the above figure , gaussian Redis By calculation 、 Architecture separation storage , There is no need to move any data during capacity expansion , So speed 、 The stability is far better than the community version Redis. Have big key, gaussian Redis You can safely expand the capacity !
3. gaussian Redis Delete / Overdue large key when , Business 0 Blocking
- Community Edition Redis Big key The deletion of / Expiration will lead to severe access blocking . Measured delete / One big overdue hash key( contain 1000w Elements ), Community Edition Redis Access is blocked for a whole 14 second .
chart : Community Edition Redis At large key Delete the scenario blocking service access
Although the Community Edition Redis Provides “ asynchronous ” Of unlink The command can alleviate the big key Blocking problem , but unlink Not strictly asynchronous , For example, for zset type (skiplist code ) And all string key Can only block deletion , The risk is out of control .
- gaussian Redis It has fundamentally solved the problem of "big..." key Delete / Hidden danger of overdue operation . In Gauss Redis in , Yes whatever Data is deleted / Be overdue , Both are executed successfully and immediately 0 Blocking . This is because the bottom layer adopts the real “ Mark deletion ”, So it doesn't affect business access at all . Measured delete / One big overdue hash key( contain 1000w Elements ), gaussian Redis only millisecond .
3、 ... and 、 summary
According to the above comparative evaluation , It can be seen that compared with the community version Redis The actual performance of , gaussian Redis More suitable for large key Reliable storage scenarios for . In addition to being able to solve business problems key Outside the pain point , gaussian Redis The stability of 、 reliability 、 Security and other aspects have also been comprehensively improved .
Huawei partners and developers conference 2022 The fire is coming , Heavy content can't be missed !
【 Wonderful activities 】
March forward courageously · Be an all-around Developer →12 Technology live broadcast ,8 High energy output of the great technical treasure , And the code room 、 Many rounds of mysterious tasks such as knowledge competition are waiting for you to challenge . Break through immediately , Open the ultimate prize ! Click to embark on the promotion of all-round developers !
【 Technical topics 】
The future has to ,2022 Technical exploration → Huawei's cutting-edge technologies in various fields 、 Heavy open source project 、 Innovative application practice , Standing at the entrance of the intelligent world , Explore how the future shines into reality , Full of dry goods, click to learn
Click to follow , The first time to learn about Huawei's new cloud technology ~
边栏推荐
- Integer ordered array lookup -- traversal and half / bisection
- C#中委托与事件之间的一些应用
- asp. Net TXT read / write
- [tgowt] cmake to Ninja construction
- Lammps中常用的势函数和晶体库资源收集
- 将excel中的合并单元格拆分并填充数据
- The HMI Software memory is abnormal, resulting in a crash exit bug
- Learn to use PHP to implement unlimited comments and unlimited to secondary comments solutions
- Niuke network: some sorting problems about the k-th number
- Clickhouse data insert, update and delete SQL
猜你喜欢

Gamefi's new departure, aquanee will log in to gate and bitmart on June 9

杰理之蓝牙配网【篇】

TypeScript 变量声明

College community management system
![[database data recovery] SQL Server database data recovery case](/img/82/99d3135b6f412a532444e80c2d7faa.jpg)
[database data recovery] SQL Server database data recovery case

目标分割之--Unet对多类别数据集的语义分割

The processor of this virtual machine supports different functions than the processor of the virtual machine that holds the state of the virtual machine

Neo4j desktop database backup

Changshu science and technology applet SQL injection

ClickHouse 数据插入、更新与删除操作 SQL
随机推荐
Keyword usage of default in C #
C#中关于Partial的作用
Charles grabbing iPhone
UTM转经纬度
C#中的里氏替换原则
C#关于抽象类的学习
[database data recovery] SQL Server database data recovery case
Jerry's camera frame number and layer [chapter]
C#Random的作用
数据处理基本流程
C#中的匿名函数的应用
Internal volume of Dachang series "line segment tree - meeting room problem"
Who is the big winner? The Huawei cloud IOT innovation application development competition was successfully concluded!
Kalman filter (KF) unscented Kalman filter (UKF)
C#接口类的学习
杰理之 图传修改app_config.h的VIDEO_REC buffer模式和输出帧率【篇】
关于C#Unity读写文件
C#中default的关键词用法
Gamefi's new departure, aquanee will log in to gate and bitmart on June 9
Target Segmentation -- semantic segmentation of multi category dataset by Unet