当前位置:网站首页>Redis cluster configuration
Redis cluster configuration
2022-06-10 21:12:00 【Fly link】
One 、 Introduce
- Redis The cluster has realized to Redis Horizontal expansion of , Start now N individual redis node , The entire database is distributed and stored here N A node in the , Each node stores the total data 1/N
- Redis Clusters are partitioned (partition) To provide a certain degree of usability (availability): Even if some nodes in the cluster fail or fail to communicate , The cluster can also continue to process command requests
- Redis Adopt non centralized cluster configuration
Two 、 Cluster node allocation principle
- A cluster must have at least 3 Nodes
- Options ``–cluster-replicas 1` Indicates that each master node in the cluster creates a slave node
- The allocation principle tries to ensure that each master database runs on different servers IP Address , Each slave library and master library are not in one IP Address
3、 ... and 、slot
- One Redis The cluster contains 16384 Slots (hash slot), Every key in the database belongs here 16384 One of the slots , The cluster uses the formula CRC16(key) % 16384 To calculate the key key Which slot does it belong to , among CRC16(key) Statements are used to evaluate keys key Of CRC16 The checksum .
- Each node in the cluster is responsible for processing a portion of the slots . for instance , If a cluster can have a master node , among :
- node A Responsible for handling 0 No. to 5460 Slot number .
- node B Responsible for handling 5461 No. to 10922 Slot number .
- node C Responsible for handling 10923 No. to 16383 Slot number .
3、 ... and 、 advantage
- Realize capacity expansion
- Apportionment pressure
- No central configuration is relatively simple
Four 、 shortcoming
- Multi key operation is not supported
- Multibond Redis Transactions are not supported ,lus Scripts are not supported
- Due to the late emergence of the cluster scheme , Many companies have adopted other clustering schemes , The proxy or client partition scheme wants to migrate to redis cluster, Need overall migration rather than gradual transition , High complexity
边栏推荐
- Redis set password command (temporary password)
- app測試用例
- 蛮力法/1~n个整数中取k个整数
- LeetCode 进阶之路 - 搜索插入位置
- Elastic-Job的快速入门,三分钟带你体验分布式定时任务
- 揭秘:春晚微信红包,是如何抗住 100 亿次请求的?
- 自定义日期组件,左右按钮控制向前或向后翻年、翻月、翻周、翻日
- Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading
- Use DAP link to download the executable file separately to the mm32f5 microcontroller
- 2 pcs share a set of keyboard and mouse
猜你喜欢

Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading

Nanny tutorial: how to become a contributor to Apache linkis documents

Game compatibility test (general scheme)

synergy: server refused client with our name

LeetCode:497. Random points in non overlapping rectangles -- medium

Can you still have a wonderful life if you are laid off at the age of 35?

pytorch深度学习——神经网络卷积层Conv2d

揭秘:春晚微信红包,是如何抗住 100 亿次请求的?

游戏兼容性测试(通用方案)

Self attention and multi head attention
随机推荐
保姆级教程:如何成为Apache Linkis文档贡献者
Kcon 2022 topic public selection is hot! Don't miss the topic of "favorite"
Redis缓存穿透
Finally, someone explained the difference among cookies, sessions and tokens. Detailed explanation, interview questions.
深度学习调参经验和工具
CET-6 - Business English - the last recitation before the test
shell实现ssh登录并执行命令
AttributeError: module ‘collections‘ has no attribute ‘MutableMapping‘
A small case with 666 times performance improvement illustrates the importance of using indexes correctly in tidb
Obtained network time + time zone (+8)
获取的网络时间 + 时区(+8)
自注意力(self-attention)和多头注意力(multi-head attention)
Zero trust architecture
Error code 1129, state HY000, host 'xxx' is blocked because of many connection errors
Networkx usage and nx Draw() related parameters
canvas 高级功能(上)
Serial Print() and serial The difference of write() function, and the problem of hexadecimal and string sending and receiving format in serial port communication and detailed explanation of the conver
What are the conditions for opening an account for agricultural futures? How much is the service charge for opening an account now?
^29 event cycle model
编程式导航路由跳转到当前路由(参数不变), 多次执行会抛出NavigationDuplicated的警告错误?