当前位置:网站首页>Project practice, redis cluster technology learning (6)
Project practice, redis cluster technology learning (6)
2022-07-02 10:04:00 【User 1289394】
4. Cluster integrity check
Cluster integrity means that all slots are allocated to the surviving master node , as long as 16384 If one of the slots is not assigned to a node, the cluster is incomplete . have access to redis-trib.rb check The command checks whether the two clusters created before are successful ,check The command only needs to give the address of any node in the cluster to complete the inspection of the whole cluster , The order is as follows :
redis-trib.rb check 127.0.0.1:6379
redis-trib.rb check 127.0.0.1:6481
When the following information is finally output , Prompt that all slots in the cluster have been assigned to nodes :
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
Redis.3 Node communication
Redis.3.1 Communication process
In distributed storage, we need to provide a mechanism to maintain node metadata information , Metadata means : node
What data are you responsible for , Whether there is fault and other status information . Common metadata maintenance methods include : focus
The type and P2P The way .Redis The cluster using P2P Of Gossip( Gossip ) agreement ,Gossip agreement
The working principle is that nodes constantly communicate with each other and exchange information , After a period of time, all nodes will know the set
Group complete information , This way is similar to spreading rumors
Communication process description :
1) Each node in the cluster will have a separate TCP passageway , For communication between nodes ,
The communication port number is added to the basic port 10000.
2) Each node selects several nodes to send through specific rules in a fixed period ping news .
3) Received ping The node of the message uses pong Message in response .
Each node in the cluster selects the node to communicate through certain rules , Each node may know all sections
spot , Or maybe only some nodes are known , As long as these nodes can communicate with each other normally , Eventually they will reach
To a consistent state . When a node fails 、 New nodes join 、 The role of master and slave changes 、 Slot information change and so on
When this happens , Through constant ping/pong Message communication , After a period of time, all nodes will know the latest status of all nodes in the whole cluster , So as to achieve the purpose of cluster state synchronization .
边栏推荐
猜你喜欢
![[unreal] key to open the door blueprint notes](/img/28/f2b00d84dc05183ce93e2a8ee3555f.png)
[unreal] key to open the door blueprint notes

UE4 night lighting notes
![[illusory] weapon slot: pick up weapons](/img/a7/1e395fc9cdfd0359e7ae4d2313290d.png)
[illusory] weapon slot: pick up weapons

Eslint reports an error

三相并网逆变器PI控制——离网模式
![[unreal] animation notes of the scene](/img/97/dafde0377b7c4337e1775db64ba6a4.png)
[unreal] animation notes of the scene

2837xd代码生成模块学习(2)——ADC、ePWM模块、Timer0

High level application of SQL statements in MySQL database (II)

2837xd 代码生成——StateFlow(3)

【UE5】AI随机漫游蓝图两种实现方法(角色蓝图、行为树)
随机推荐
Matlab生成dsp程序——官方例程学习(6)
Typora installation package sharing
ICLR 2022: how does AI recognize "things I haven't seen"?
UE5——AI追逐(藍圖、行為樹)
图像识别-数据清洗
cmake的命令-官方文档
QT信号槽总结-connect函数错误用法
滲透測試的介紹和防範
Image recognition - data augmentation
Database -- acid of transaction -- introduction / explanation
三相逆变器离网控制——PR控制
Fragmenttabhost implements the interface of housing loan calculator
JDBC review
UE4夜间打光笔记
c语言编程题
Skywalking theory and Practice
What wires are suitable for wiring on bread board?
【UE5】蓝图制作简单地雷教程
Tools used for Yolo object recognition and data generation
Bookmark collection management software suspension reading and data migration between knowledge base and browser bookmarks