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

Method for switching leader node of raft distributed system, device and system

A technology of distributed system and leader node, applied in the field of switching the leader node of raft distributed system, to save the time of re-election, maintain continuity, and save the time of election

Active Publication Date: 2017-12-29
HUAWEI TECH CO LTD
View PDF5 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Can improve distributed system service performance

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
  • Method for switching leader node of raft distributed system, device and system
  • Method for switching leader node of raft distributed system, device and system
  • Method for switching leader node of raft distributed system, device and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] see figure 1 , figure 1 A flow chart for the data write operation of the raft algorithm, which can include:

[0029] Step S101, after the leader receives the log to be written, it copies the log, and then sends the log to other nodes (ie, Followers);

[0030] Step S102, Follower stores the received log in the local log;

[0031] The above step S102 may also be referred to as log persistence;

[0032] Step S103, the Follower returns a response message to the leader after the log is persisted;

[0033] In step S104, after receiving the response messages of most of the followers, the leader determines that most of the followers have completed the log persistence and the write operation.

[0034] see figure 2 , figure 2 The data read operation flow chart for the raft algorithm, which can include:

[0035] Step S201, the leader receives a data read command;

[0036] Step S202, the leader obtains the data corresponding to the read command, and sends the data.

[00...

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 for switching a leader node of a raft distributed system, a device and a system. The distributed system comprises a leader node and a standby leader node, and the leader node is used for executing a write operation or a read operation of the distributed system and sending a write operation or read operation log to the standby leader node. The method comprises the following steps: keeping persistence consistency with the log of the leader node by the standby leader node; and when the leader node is faulty, switching the standby leader node as the leader node. The technical scheme provided by the invention has the advantages of improving the service performance of the distributed system.

Description

technical field [0001] The present application relates to the field of communications, and in particular, to a method, device and system for switching a leader node of a raft distributed system. Background technique [0002] In the Raft distributed system, one node is elected from all nodes as the leader (leader node) through the election process, and the remaining nodes are followers (follower nodes); then the leader performs data read and write operations, and will read and write operations. The log is synchronized to the follower. Most of the follower's log needs to be consistent with the leader, that is, most followers need to complete the persistence of the log, that is, the consistency of the log. The method to achieve the consistency of the log can be, the leader writes a new log When , the leader sends the new log group to all the followers of the distributed system. After the follower receives the new log, it performs log persistence (that is, stores the new log in ...

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/0659H04L41/0663H04L67/10
Inventor 肖宇雷吴伟叶涛
Owner HUAWEI 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