Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and system for recovering rabbitmq network partition

A network and network state technology, applied in transmission systems, digital transmission systems, data exchange networks, etc., can solve problems such as manual recovery, high service reliability, and inability to automatically recover, to enhance system reliability, avoid manual intervention, To achieve the effect of load balancing

Active Publication Date: 2021-08-10
WUHAN FIBERHOME INFORMATION INTEGRATION TECH CO LTD
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0022] 1) When a partition occurs, after the network is restored or the suspension is restored, the partition independence problem still exists and needs to be restored manually;
[0023] 2) When one or more nodes fail, there is no node status monitoring mechanism and cannot be automatically restored;
[0024] 3) It may be necessary to manually configure trusted nodes in advance, but it cannot be guaranteed that some nodes have higher service reliability in the production environment

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for recovering rabbitmq network partition
  • A method and system for recovering rabbitmq network partition
  • A method and system for recovering rabbitmq network partition

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0076] see figure 2 As shown, the embodiment of the present invention provides a method for recovering a RabbitMQ network partition, comprising the following steps:

[0077] First select the central node. The central node is to select a certain node of the RabbitMQ cluster as the central node for the recovery detection script to run. Other nodes in the cluster also have scripts, but they do not run immediately. The master-standby monitoring switch is realized through Keepalived, and the Keepalived master node is the central node; when the Keepalived master node has a network failure, it will automatically switch to the standby node to continue monitoring.

[0078] Then define detection and recovery scripts for different scenarios. The cluster status that affects RabbitMQ is mainly divided into three categories: network status, single-node service status, and network partition status. The single-node service status and network partition status are obtained through RabbitMQ's...

Embodiment 2

[0085] see image 3 As shown, the embodiment of the present invention provides a method for recovering a RabbitMQ network partition, which specifically includes the following steps:

[0086] Step 1: Configure the Keepalived service on each RabbitMQ node, configure the Keepalived detection script, and automatically use the Keepalived master node as the central node. When the Keepalived primary node fails, it will automatically switch between active and standby. Go to step 2;

[0087] Step 2: Add a cluster status detection script to each RabbitMQ node, configure that only the Keepalived master node, that is, the central node, will run the detection script, and other nodes will not run; and write the detection result status detection file to each node. First, check whether the network status of the node is abnormal through the socket, and if so, do not judge the remaining status, directly record the abnormal network status of the node, and skip to step 5; if not, skip to step 3...

Embodiment 3

[0098] Embodiments of the present invention provide a system for recovering RabbitMQ network partitions, including:

[0099]The Keepalived service configuration module is used for: configuring the Keepalived service on each RabbitMQ node, selecting a RabbitMQ node in the RabbitMQ cluster as the Keepalived master node, and using the Keepalived master node as the central node;

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and system for recovering RabbitMQ network partitions, and relates to the technical field of distributed message systems. Each RabbitMQ node is configured with a Keepalived service, and the Keepalived master node is used as a central node. A cluster state detection script is configured at each RabbitMQ node. Only the central node runs the detection script, periodically detects the cluster status of all RabbitMQ nodes, and executes corresponding recovery operations according to the detection results; at the end of each detection, writes the status detection file recording the detection results on all RabbitMQ nodes; The RabbitMQ node is configured with xinetd service to expose the status detection file to the HTTP interface; the HAProxy software is configured to call the HTTP interface for node health detection, and the relevant application client calls the RabbitMQ service by calling the HAProxy software. Realize automatic detection of faults and automatic recovery, reducing the workload of operation and maintenance personnel.

Description

technical field [0001] The invention relates to the technical field of distributed message systems, in particular to a method and system for recovering RabbitMQ network partitions. Background technique [0002] RabbitMQ is an open source implementation based on the Advanced Message Queuing Protocol (AMQP, AdvancedMessage Queue) protocol developed by erlang. It is used to store and forward messages in a distributed system. It is excellent in terms of ease of use, scalability, and high availability. , is currently one of the most mainstream message middleware. RabbitMQ clusters are widely used, especially in application scenarios that require cross-system asynchronous communication, such as cloud computing. When network jitter occurs on multiple nodes, the cluster is prone to network partitions, and the RabbitMQ cluster itself cannot cope with network partitions well. [0003] The definition of determining a network partition is: if other nodes cannot connect to the node for...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L12/24H04L12/26H04L29/08
CPCH04L41/0253H04L41/0663H04L43/0817H04L67/1034H04L67/025H04L41/0668H04L67/56
Inventor 陈林祥韩辰音邓沛沛
Owner WUHAN FIBERHOME INFORMATION INTEGRATION TECH CO LTD