A node election method, node device and system
A node device and node technology, applied in the computer field, can solve the problem of low node election efficiency, reduce the number of information exchanges and improve the election efficiency.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0046] In Embodiment 1 of the present invention, the master node election is performed for a system including N nodes, where N is greater than 1, that is, the system is a multi-node system. Based on the needs of the node election method, N-1 locks are set, and for N -1 lock setting specified order, for example, you can set N-1 lock levels, which correspond to N-1 locks one by one, then the specified order can be the order of lock levels from high to low, or the lock level The order from low to high; N-1 locks can also be numbered, then the specified order can be the order of numbers from small to large, or the order of numbers from large to small.
[0047] And, preferably, the N-1 locks can be respectively set on N-1 nodes among the N nodes, that is, one lock is correspondingly set on each of the N-1 nodes.
[0048]The lock technology is applied to scenarios where multiple execution subjects can process the same data. In order to prevent this data from being processed by more ...
Embodiment 2
[0063] image 3 It is a schematic structural diagram of a multi-node system in Embodiment 2 of the present invention, wherein the multi-node system includes a total of two nodes, node A and node B, and lock 1 is set on node A.
[0064] Adopt the node election method provided in the above-mentioned embodiment 1 to elect the master node from node A and node B. When node A and node B and the links between them are normal, node A and node B respectively acquire lock 1 The use authority of lock 1, the election result is that the node that has obtained the use authority of lock 1 is the master node. When node A or node B fails, the election process and election results are shown in Table 1. For the convenience of description, the node obtains When obtaining the permission to use the lock, the result obtained when the permission to use the lock is obtained is represented by the result Q; when the information that the current lock permission has been obtained by other nodes is obtaine...
Embodiment 3
[0069] Figure 4 It is a schematic structural diagram of a multi-node system in Embodiment 3 of the present invention, wherein the multi-node system includes a total of three nodes, node A, node B, and node C, and lock 1 is set on node A, and lock 2 is set on node B.
[0070] The node election method provided in the above-mentioned embodiment 1 is used to elect the master node from node A, node B and node C. When node A, node B and node C and the links between them are normal, node A, node B and node C Node B and Node C respectively obtain the use authority of lock 1, and the election result is that the node that has obtained the use authority of lock 1 is the master node. When one or two nodes among node A, node B and node C fail, The election process and election results are shown in Table 2, where, for the convenience of description, when a node obtains the use authority of the lock, the obtained result is represented by the result Q when the use authority of the lock is ac...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 