当前位置:网站首页>Redis cluster messages
Redis cluster messages
2022-06-26 15:00:00 【Hua Weiyun】
Redis Cluster message
redis There are five types of cluster messages .
1. PING news
This message is used to detect whether the node is online . Each node in the cluster randomly selects five nodes from the list and sends PING news
2. MEET news
MEET The message is sent by the client CLUSTER MEET ip port command , The node receiving the command sends a message to ip The host and port Host send MEET news , To join the host to the cluster
3. PONG news
PONG A message is when you receive MEET or PING After the news , Send to sender PONG Message to confirm receipt of the sender's message . When a node becomes a master from a slave , This node can be accessed through PONG The message updates the perception of other nodes .
This is a cluster.h Upper clusterMsgData, This is the body of the message
union clusterMsgData { /* PING, MEET and PONG */ struct { /* Array of N clusterMsgDataGossip structures */ clusterMsgDataGossip gossip[1]; } ping; /* FAIL */ struct { clusterMsgDataFail about; } fail; /* PUBLISH */ struct { clusterMsgDataPublish msg; } publish; /* UPDATE */ struct { clusterMsgDataUpdate nodecfg; } update;};You can see from the structure that these three messages are generated by clusterMsgDataGossip Composed of
4. Release the news
When the node receives PUBLISH On command , The node broadcasts to the cluster while running the command PUBLISH news , This enables other nodes to run the command .
clusterMsgDataPublish The structure of the body
typedef struct { // Channel name length uint32_t channel_len; // The length of the message uint32_t message_len; /* We can't reclare bulk_data as bulk_data[] since this structure is * nested. The 8 bytes are removed from the count during the message * length computation. */ // The message content unsigned char bulk_data[8];} clusterMsgDataPublish;5. Fault message
When a master node determines that another master node is offline , The fault message will broadcast the fault message to the cluster , To notify another node that the node is offline .
clusterMsgDataFail Structure
typedef struct { // The name of the failed node char nodename[CLUSTER_NAMELEN];} clusterMsgDataFail;summary
This is it. redis frequently-used 5 A message , Let's conclude by PING Cancellation message 、PONG news 、MEET news 、 Release messages and fault messages ,PING Messages are used to detect whether nodes are online ,PONG The message is to receive PING News or MEET Feedback from the message , The table name message has been received ,MEET Messages are used to get hosts to join the cluster , Publishing news is used to broadcast , The fault message is published when the node is offline , Indicates that the host has failed .
Well, that's what we're talking about today , Like friends, welcome to give me some praise , Hey
️ Thank you for your
If you think this is helpful for you :
- Welcome to follow me ️, give the thumbs-up , Comment on , forward
- Focus on
Panpan small class, Push good articles for you regularly , There are also group chat and irregular lottery activities , You can say what you want , Communicate with the great gods , Learning together . - If there is anything inappropriate, you are welcome to criticize and correct .
边栏推荐
- Complimentary Book Cognitive Control: how does our brain accomplish tasks?
- qt下多个子控件信号槽绑定方法
- Halcon C # sets the form font and adaptively displays pictures
- Redis事务与watch指令
- Halcon C# 设置窗体字体,自适应显示图片
- R语言dplyr包bind_rows函数把两个dataframe数据的行纵向(竖直)合并起来、最终行数为原来两个dataframe行数的加和(Combine Data Frames)
- TCP 复位攻击原理
- 赠书 | 《认知控制》:我们的大脑如何完成任务?
- nvidia-smi 报错
- Numpy基本使用
猜你喜欢

Common operation and Principle Exploration of stream

qt下多个子控件信号槽绑定方法

View触摸分析

文献1

Talk about the RPA direction planning: stick to simple and valuable things for a long time

The JVM outputs GC logs, causing the JVM to get stuck. I am stupid

Combat readiness mathematical modeling 32 correlation analysis 2

MySQL master-slave replication and read-write separation

人的顶级能量从哪里获取?

备战数学建模30-回归分析2
随机推荐
The DOTPLOT function in the epidisplay package of R language visualizes the frequency of data points in different intervals in the form of point graphs, specifies the grouping parameters with the by p
Excel-VBA 快速上手(二、条件判断和循环)
Attention meets geometry: geometry guided spatiotemporal attention consistency self supervised monocular depth estimation
关于 selenium.common.exceptions.WebDriverException: Message: An unknown server-side error 解决方案(已解决)
Is it safe to open a stock account with the account manager online??
Solution to the upper limit of TeamViewer display devices
NVIDIA SMI error
Idea shortcut key
R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的均值和中位数、指定na.rm参数配置删除缺失值
redis集群的重新分片与ASK命令
乐鑫 AWS IoT ExpressLink 模组达到通用可用性
R language uses the aggregate function of epidisplay package to split numerical variables into different subsets based on factor variables, calculate the summary statistics of each subset, and use agg
大学生值得珍藏的实用网站推荐
Get the intersection union difference set of two dataframes
teamviewer显示设备数量上限解决方法
手机股票注册开户安全吗,有没有什么风险?
710. random numbers in the blacklist
重磅白皮书发布,华为持续引领未来智慧园区建设新模式
获取两个dataframe的交并差集
IP certificate application process of sectigo