Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

RabbitMQ network partition recovery method and system

A network and network status 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: 2019-01-29
WUHAN FIBERHOME INFORMATION INTEGRATION TECH CO LTD
View PDF8 Cites 6 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
  • RabbitMQ network partition recovery method and system
  • RabbitMQ network partition recovery method and system
  • RabbitMQ network partition recovery method and system

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 RabbitMQ network partition recovery method and system, and relates to the distributed message system technical field; a Keepalived service is configured to each RabbitMQ node; the Keepalived main node serves as the central node; a cluster state detection script is configured to each RabbitMQ node; only the central node runs the detection script; regular cluster state detection is carried out for all RabbitMQ nodes, and corresponding recovery operation is carried out according to the detection result; each time the detection is over, a state detection file that recordsthe detection result is written into each of all the RabbitMQ nodes; a xinetd service is configured to each RabbitMQ node so as to expose the state detection file to a HTTP interface; HAProxy software is configured to invoke the HTTP interface to make node health detection, and a corresponding application client end invokes the HAProxy software to invoke the RabbitMQ service. The recovery methodand system can automatically detect faults and automatically recover, thus reducing operational personnel workloads.

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
IPC IPC(8): H04L12/24H04L12/26H04L29/08
CPCH04L41/0253H04L41/0663H04L43/0817H04L67/1034H04L67/025H04L41/0668H04L67/56
Inventor 陈林祥韩辰音邓沛沛
Owner WUHAN FIBERHOME INFORMATION INTEGRATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products