当前位置:网站首页>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 .
边栏推荐
- Matlab生成dsp程序——官方例程学习(6)
- Alibaba cloud SMS service
- Read Day6 30 minutes before going to bed every day_ Day6_ Date_ Calendar_ LocalDate_ TimeStamp_ LocalTime
- 2837xd代码生成模块学习(3)——IIC、eCAN、SCI、Watchdog、eCAP模块
- TD conducts functional simulation with Modelsim
- 2837xd Code Generation - stateflow (4)
- Introduction et prévention des essais de pénétration
- Ue5 - AI pursuit (blueprint, behavior tree)
- PI control of three-phase grid connected inverter - off grid mode
- int与string、int与QString互转
猜你喜欢
Introduction et prévention des essais de pénétration
ICLR 2022: how does AI recognize "things I haven't seen"?
The latest progress and development trend of 2022 intelligent voice technology
[illusory] automatic door blueprint notes
2837xd code generation - stateflow (3)
UE4夜间打光笔记
图像识别-数据采集
2837xd code generation module learning (4) -- idle_ task、Simulink Coder
c语言编程题
2837xd code generation - Supplement (2)
随机推荐
PI control of grid connected inverter (grid connected mode)
Illusion -- Animation blueprint, state machine production, character walking, running and jumping action
In SQL injection, why must the ID of union joint query be equal to 0
[illusory] weapon slot: pick up weapons
About the college entrance examination
Mysql索引
Fragmenttabhost implements the interface of housing loan calculator
Required request body is missing: (cross domain problem)
Junit5 支持suite的方法
Because of hard work, the fruit goes with fate
Navicat remote connection MySQL reports an error 1045 - access denied for user 'root' @ '222.173.220.236' (using password: yes)
【UE5】动画重定向:如何将幻塔人物导入进游戏玩耍
[ue5] blueprint making simple mine tutorial
[ue5] two implementation methods of AI random roaming blueprint (role blueprint and behavior tree)
Bugkuctf-web24 (problem solving ideas and steps)
TD联合Modelsim进行功能仿真
High level application of SQL statements in MySQL database (II)
ICLR 2022: how does AI recognize "things I haven't seen"?
Off grid control of three-phase inverter - PR control
2837xd code generation - Supplement (1)