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

Method for switching nodes in distributed master-slave system

A master node, distributed technology, applied in the distributed field, can solve problems such as affecting task execution

Pending Publication Date: 2021-05-28
SHANGHAI BILIBILI TECH CO LTD
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the present invention is to provide a method for switching nodes in a distributed master-slave system, which is used to solve the technical problem of affecting task execution due to node failure in the prior art

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 nodes in distributed master-slave system
  • Method for switching nodes in distributed master-slave system
  • Method for switching nodes in distributed master-slave system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] The embodiment of the present invention provides a method for switching nodes in a distributed master-slave system. The distributed master-slave system includes a coordination server and a plurality of nodes. The nodes include a master node and a slave node. The master node includes a working master node and a redundant node. master node. Wherein, the coordinating server may be a single server or a cluster server. Through the node switching method in the distributed master-slave system provided by this embodiment, when the master node in the active state (that is, the working master node) fails, the master node in the standby state (that is, the redundant master node) can Timely perception and conversion from the standby state to the active state, when the slave node assigned the task fails, the working master node in the active state can sense it in time and transfer the unfinished tasks on the slave node to other slave nodes, realizing In the distributed master-slave...

Embodiment 2

[0091] Corresponding to Embodiment 1 above, Embodiment 2 of the present invention provides a distributed master-slave system. For detailed descriptions of some technical features and technical effects, refer to Embodiment 1 above, which will not be repeated here. figure 2 The block diagram of the distributed master-slave system provided for Embodiment 2 of the present invention, such as figure 2 As shown, the distributed master-slave system includes: a coordinating server 201 and multiple nodes; the nodes include multiple master nodes 202 and multiple slave nodes 203, and the master nodes 202 include a working master node 202A and a redundant master node 202B.

[0092] Among them, multiple master nodes 2022 are used to send the first registration request to the coordinating server 201; the coordinating server 201 is used to elect a working master node 202A from the multiple master nodes 202 according to the multiple first registration requests, and create a working master nod...

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 provides a method for switching nodes in a distributed master-slave system. The method comprises the following steps: a coordination server elects a working master node to create a corresponding temporary directory according to a first registration request sent by a plurality of master nodes, and creates a corresponding temporary directory for each slave node according to a second registration request sent by a plurality of slave nodes; the working master node and the slave node maintain heartbeat with the coordination server after receiving directory creation success information fed back by the coordination server; when monitoring that the heartbeat of the node stops updating, the coordination server deletes the temporary directory corresponding to the node and broadcasts deletion information; the working master node allocates tasks to the slave nodes, and allocates uncompleted tasks on the slave nodes to other slave nodes when monitoring that the temporary directories corresponding to the slave nodes are deleted; and when monitoring that the temporary directory corresponding to the working main node is deleted, the redundant main node sends a first registration request to a coordination server. According to the invention, the reliability of the distributed master-slave system is improved.

Description

technical field [0001] The invention relates to the field of distributed technology, in particular to a method for switching nodes in a distributed master-slave system. Background technique [0002] The distributed master-slave system includes at least one master node and multiple slave nodes. After the user submits the task to the distributed master-slave system through the interface, the master node receives the task and assigns the task to the slave node for execution. Therefore, the distributed master-slave system What is presented to the user is a unified whole, and the user does not need to pay attention to the workflow of the master node and the slave node inside the system. At the same time, since the distributed master-slave system can distribute tasks to many slave nodes, the failure of a single slave node will not affect The normal operation of other slave nodes, so the reliability of the distributed master-slave system is high. [0003] In the existing technolog...

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): G06F9/48G06F9/50G06F11/20
CPCG06F11/2023G06F9/4806G06F9/5027
Inventor 张杨
Owner SHANGHAI BILIBILI TECH CO LTD