IP Library Granted Patent US 10,534,634
Granted Patent B2
US 10,534,634 · App. 15/719,125 · Granted Jan 14, 2020

Efficient, time-based leader node election in a distributed computing system

Inventors: Zhenkun Yang (Hangzhou, CN); Jinliang Xiao (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F9/4806
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,534,634
App. No.
15/719,125
Granted
Jan 14, 2020
Kind
B2
Abstract

A same voting time, a same vote counting time, and a same leader node tenure is configured by a host for all nodes. Time configuration information including the same configured voting time, the same vote counting time, and the same leader node tenure, is sent to all the nodes. The nodes are operable to vote during the same voting time, count the number of votes during the same vote counting time, and elect a leader node according to a vote counting result. The nodes are enabled to perform periodic node election according to the same leader node tenure.

Claims (60)

1. A computer-implemented method, comprising:

configuring, by a host, a same voting time, a same vote counting time, and a same leader node tenure for all nodes; and

sending time configuration information that includes the same configured voting time, the same vote counting time, and the same leader node tenure to all the nodes, the nodes operable to vote during the same voting time, count the number of votes during the same vote counting time, and elect a leader node according to a vote counting result, wherein the nodes are enabled to perform periodic node election according to the same leader node tenure.

2. The computer-implemented method of claim 1 , further comprising:

when there is no leader node among all nodes, sending, by at least one node, a voting request to all the nodes during a voting time that is included in time configuration information;

receiving, by each node, vote information that is generated by other nodes according to the voting request;

counting, by each node in a vote counting time that is included in the time configuration information, the number of votes included in the received vote information; and

determining, by the nodes, a leader node according to the counted respective number of votes included in the vote information, to process a specified service.

3. The computer-implemented method of claim 2 , further comprising terminating the receiving of the vote information before starting the counting.

4. The computer-implemented method of claim 2 , wherein determining, by the nodes, a leader node according to the counted respective number of votes included in the vote information includes determining, by the node, the node itself as a leader node when the node judges that the counted number of votes included in the vote information exceeds a preset threshold, wherein the threshold is one-half of the number of all the nodes.

5. The computer-implemented method of claim 1 , further comprising:

when there is no leader node among all nodes, receiving, by at least two nodes as voting nodes during a voting time that is included in time configuration information, a voting request sent by a node; and

generating, by the voting nodes according to the voting request, vote information, and sending the vote information to the node during the voting time, so that the node counts the number of votes included in the vote information in a vote counting time to determine a leader node.

6. The computer-implemented method of claim 5 , wherein generating the vote information and sending the vote information to the node includes:

determining, by the voting node, node information included in the received voting request;

determining a priority of the node according to the node information; and

selecting a node with a maximum priority, generating vote information for the node, and sending the vote information to the selected node.

7. The computer-implemented method of claim 1 , further comprising:

when there is a leader node among all nodes and the leader node determines that the leader node itself meets a preset criteria, sending, by the leader node, a reappointment request to all the nodes during a voting time according to a leader node tenure in the time configuration information;

receiving, by the leader node, vote information generated by other nodes according to the reappointment request;

counting, by the leader node in a vote counting time, the number of votes included in the received vote information; and

determining, by the leader node, a reappointment state according to the counted number of votes included in the vote information, and processing a specified service after reappointment succeeds, wherein the preset criteria comprises at least one of a load processing criterion and a data updating degree.

8. The computer-implemented method of claim 1 , further comprising:

when there is a leader node among all nodes and the leader node determines that the leader node itself does not meet a preset criteria, screening out, by the leader node according to a leader node tenure in time configuration information, a node that meets the preset criteria among other nodes to serve as a successor node; and

sending, by the leader node, a voting request for the successor node to other nodes during the voting period, so that the successor node receives vote information sent by other nodes, counts the number of votes included in the vote information in a vote counting time, and is determined as a new leader node.

9. The computer-implemented method of claim 1 , further comprising:

when there is a leader node among all nodes, receiving, by at least two nodes as voting nodes during a voting time included in time configuration information, a reappointment request sent by the leader node; and

generating, by the voting nodes according to the reappointment request, vote information, and sending the vote information to the leader node in the voting time included in the time configuration information, so that the leader node counts the number of votes included in the vote information in a vote counting time, to determine a reappointment state;

wherein the voting nodes only receive the voting request of the leader node in a tenure of the leader node.

10. The computer-implemented method of claim 1 , further comprising:

when there is a leader node among all nodes, receiving, by at least two nodes as voting nodes during a voting time included in time configuration information, a voting request for a successor node sent by the leader node; and

generating, by the voting nodes according to the voting request, vote information, and sending the vote information to the successor node during the voting time included in the time configuration information, so that the successor node counts the number of votes included in the vote information during a vote counting time to determine a new leader node.

11. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:

configuring, by a host, a same voting time, a same vote counting time, and a same leader node tenure for all nodes; and

sending time configuration information that includes the same configured voting time, the same vote counting time, and the same leader node tenure to all the nodes, the nodes operable to vote during the same voting time, count the number of votes during the same vote counting time, and elect a leader node according to a vote counting result, wherein the nodes are enabled to perform periodic node election according to the same leader node tenure.

12. The non-transitory, computer-readable medium of claim 11 , the operations further comprising:

when there is no leader node among all nodes, sending, by at least one node, a voting request to all the nodes during a voting time that is included in time configuration information;

receiving, by each node, vote information that is generated by other nodes according to the voting request;

counting, by each node in a vote counting time that is included in the time configuration information, the number of votes included in the received vote information; and

determining, by the nodes, a leader node according to the counted respective number of votes included in the vote information, to process a specified service.

13. The non-transitory, computer-readable medium of claim 12 , the operations further comprising terminating the receiving of the vote information before starting the counting.

14. The non-transitory, computer-readable medium of claim 12 , wherein determining, by the nodes, a leader node according to the counted respective number of votes included in the vote information includes determining, by the node, the node itself as a leader node when the node judges that the counted number of votes included in the vote information exceeds a preset threshold, wherein the threshold is one-half of the number of all the nodes.

15. The non-transitory, computer-readable medium of claim 11 , the operations further comprising:

when there is no leader node among all nodes, receiving, by at least two nodes as voting nodes during a voting time that is included in time configuration information, a voting request sent by a node; and

generating, by the voting nodes according to the voting request, vote information, and sending the vote information to the node during the voting time, so that the node counts the number of votes included in the vote information in a vote counting time to determine a leader node.

16. A computer-implemented system, comprising:

one or more computers; and

one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing instructions, that when executed by the one or more computers, perform operations using methods comprising:

configuring, by a host, a same voting time, a same vote counting time, and a same leader node tenure for all nodes; and

sending time configuration information that includes the same configured voting time, the same vote counting time, and the same leader node tenure to all the nodes, the nodes operable to vote during the same voting time, count the number of votes during the same vote counting time, and elect a leader node according to a vote counting result, wherein the nodes are enabled to perform periodic node election according to the same leader node tenure.

17. The computer-implemented system of claim 16 , the operations further comprising:

when there is no leader node among all nodes, sending, by at least one node, a voting request to all the nodes during a voting time that is included in time configuration information;

receiving, by each node, vote information that is generated by other nodes according to the voting request;

counting, by each node in a vote counting time that is included in the time configuration information, the number of votes included in the received vote information; and

determining, by the nodes, a leader node according to the counted respective number of votes included in the vote information, to process a specified service.

18. The computer-implemented system of claim 17 , the operations further comprising terminating the receiving of the vote information before starting the counting.

19. The computer-implemented system of claim 17 , wherein determining, by the nodes, a leader node according to the counted respective number of votes included in the vote information includes determining, by the node, the node itself as a leader node when the node judges that the counted number of votes included in the vote information exceeds a preset threshold, wherein the threshold is one-half of the number of all the nodes.

20. The computer-implemented system of claim 16 , the operations further comprising:

when there is no leader node among all nodes, receiving, by at least two nodes as voting nodes during a voting time that is included in time configuration information, a voting request sent by a node; and

generating, by the voting nodes according to the voting request, vote information, and sending the vote information to the node during the voting time, so that the node counts the number of votes included in the vote information in a vote counting time to determine a leader node.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 27, 2021
From: ANT FINANCIAL (HANG ZHOU) NETWORK TECHNOLOGY CO., LTD.
To: BEIJING OCEANBASE TECHNOLOGY CO., LTD.
Reel/Frame 057349/0070 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 11, 2021
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANT FINANCIAL (HANG ZHOU) NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 055237/0137 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2017
From: YANG, ZHENKUN; XIAO, JINLIANG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 044083/0325 →
Cited By (3)
US 12,189,604 US 12,568,160 US 12,641,166