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

Optimization method based on Gossip communication protocol and Raft election algorithm

An optimization method and communication protocol technology, applied in the non-relational database field, can solve the problems of Redis cluster error master-slave switching, unstable recovery time, failure to recover successfully, etc.

Active Publication Date: 2017-05-10
合肥康捷信息科技有限公司
View PDF5 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] As a distributed cluster, stability and reliability are very important. However, after the failure of the master node of the current Redis cluster, the recovery time is unstable and takes a long time, and even cannot be successfully restored. With the increase of the number of failed master nodes , the recovery time of the Redis cluster increases rapidly; when the user performs a time-consuming operation, the Redis cluster will generate a wrong master-slave switch

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
  • Optimization method based on Gossip communication protocol and Raft election algorithm
  • Optimization method based on Gossip communication protocol and Raft election algorithm
  • Optimization method based on Gossip communication protocol and Raft election algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052] The optimization method based on the Gossip communication protocol and the Raft election algorithm of the present invention will be further described in detail below in conjunction with the accompanying drawings through specific embodiments.

[0053] In this embodiment, an optimization method based on the Gossip communication protocol and the Raft election algorithm is applied to a Redis cluster consisting of N×(n+1) nodes, where the nodes are Redis servers running in cluster mode, and Divided into N master nodes and N×n slave nodes, any master node corresponds to n slave nodes, and a master node and its corresponding n slave nodes form a slice; the optimization method is carried out as follows :

[0054] Step 1. Global definition:

[0055] Define the master node set composed of N master nodes as {M 1 , M 2 ,...,M i ,...,M N}, M i Indicates the i-th master node; 1≤i≤N;

[0056] Define the i-th master node M i The set of slave nodes is {S i1 ,S i2 ,...,S ij ,....

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 an optimization method based on a Gossip communication protocol and a Raft election algorithm. The method comprises: 1, globally defining; 2, defining the number of PING messages which are fixedly transmitted by a node per second; 3, changing the number of PING messages which are fixedly transmitted by the node per second, and receiving a selection mode of the node; 4, if a main node has a fault, by a node in a Redis cluster, judging that the main node is in a suspected offline state; 5, changing the number and a selection mode of Gossip messages in a Gossip unit; 6, by the node in the Redis cluster, judging that the main node is in an offline state; 7, by a secondary node, invoking a voting request to all nodes in the Redis cluster; 8, changing the voting mode; 9, ensuring that the secondary node is elected to be the main node; and 10, ensuring that the Redis cluster is successfully recovered. According to the optimization method based on the Gossip communication protocol and the Raft election algorithm, on the basis of not influencing throughput and time delay of the Redis cluster, the recovery time of the Redis cluster is shortened, and reliability and stability of the Redis cluster are improved.

Description

technical field [0001] The invention relates to the technical field of non-relational databases, in particular to an optimization method based on Gossip communication protocol and Raft election algorithm. Background technique [0002] The Redis cluster is a distributed cluster composed of N×(n+1) Redis server nodes. The server nodes are divided into N master nodes and N×n slave nodes. One master node corresponds to n slave nodes, and the master node is responsible for Processing slots and corresponding client operations, the slave node replicates the data of the backup master node. After the failure of the master node, the Redis cluster uses the Gossip communication protocol to judge that the failed master node is offline, and stops receiving client requests; then joins the corresponding failover process, and the corresponding slave nodes are obtained through the Raft election algorithm After receiving a support ticket from the master node, it will be promoted to the new m...

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/24H04L29/08
CPCH04L41/0668H04L41/0823H04L67/10
Inventor 顾乃杰黄增士李燚郝建林朱方祥王芬
Owner 合肥康捷信息科技有限公司
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