WO2016155496A1 - 一种基于时间的节点选举方法及装置 - Google Patents

一种基于时间的节点选举方法及装置 Download PDF

Info

Publication number
WO2016155496A1
WO2016155496A1 PCT/CN2016/076414 CN2016076414W WO2016155496A1 WO 2016155496 A1 WO2016155496 A1 WO 2016155496A1 CN 2016076414 W CN2016076414 W CN 2016076414W WO 2016155496 A1 WO2016155496 A1 WO 2016155496A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
voting
time
leader
information
Prior art date
Application number
PCT/CN2016/076414
Other languages
English (en)
French (fr)
Inventor
阳振坤
肖金亮
Original Assignee
阿里巴巴集团控股有限公司
阳振坤
肖金亮
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司, 阳振坤, 肖金亮 filed Critical 阿里巴巴集团控股有限公司
Priority to KR1020177031627A priority Critical patent/KR102139410B1/ko
Priority to SG11201708022YA priority patent/SG11201708022YA/en
Priority to EP16771251.2A priority patent/EP3279794B1/en
Priority to JP2017551678A priority patent/JP6731201B2/ja
Publication of WO2016155496A1 publication Critical patent/WO2016155496A1/zh
Priority to US15/719,125 priority patent/US10534634B2/en
Priority to US16/737,262 priority patent/US10802869B2/en
Priority to US17/068,576 priority patent/US11106489B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • G06F11/1425Reconfiguring to eliminate the error by reconfiguration of node membership
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/18Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits
    • G06F11/187Voting techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a time-based node election method and apparatus.
  • a distributed system may perform scheduling, distributed processing, collaborative processing, remote control, etc. on various types of data resources in the system globally, including multiple processing devices (such as servers, processors, or databases).
  • multiple processing devices such as servers, processors, or databases.
  • a variety of management operations For each processing device in a distributed system, it can be regarded as a distributed node (referred to as a node), so that the distributed system can "distribute" huge amounts of data to each of the systems.
  • each node processes the corresponding data, thereby effectively improving the processing efficiency of the data and significantly increasing the throughput of the data.
  • meta information is descriptive information on data resources
  • data storage location update status
  • search keywords other information
  • the node election is used to select a suitable node (also referred to as a leader node) to perform maintenance management on the meta information.
  • the election mode of the node is specifically: different nodes send a voting request to other nodes, each node receives the voting request and then votes, and finally selects the leader node according to the counted votes.
  • node election method when the above-mentioned node election method is adopted, different nodes have their own large amounts of data to be processed.
  • one node When one node is idle and sends a voting request to other nodes, other nodes may be processing data, then other The node does not receive the voting request sent by the node. Will immediately enter the voting state, that is to say, each node is uncertain about the timing of voting and statistics, and can not conduct node elections in a timely and effective manner.
  • the embodiment of the present application provides a time-based node election method and device, which are used to solve the problem of low efficiency when performing node election.
  • a time-based node election method is provided in the embodiment of the present application.
  • the method is used to determine a leader node in a distributed system, where the method includes:
  • the host configures the same voting time, the counting time, and the term of the leader node for all nodes;
  • the configured voting time, the counting time, and the term of the leader node are carried in the time configuration information and sent to each node, so that each node votes in the voting time, and the counting is performed in the counting time. And selecting a leader node according to the counting result, and causing each node to perform periodic node election according to the term of the leader node.
  • the embodiment of the present application further provides a time-based node election method, where the method is used to determine a leader node in a distributed system, where the method includes:
  • At least one node acts as an election node, and sends a voting request to all nodes in the voting time carried by the time configuration information;
  • Each campaign node receives voting information generated by other nodes according to the voting request
  • Each campaign node counts the number of voting information received by each of the voting nodes during the counting time carried by the time configuration information
  • Each campaign node determines the leader node according to the counted number of respective voting information, and processes the specified service.
  • the embodiment of the present application further provides a time-based node election method, where the method is used to determine a leader node in a distributed system, where the method includes:
  • At least two nodes serve as voting nodes, and receive a voting request sent by the campaign node during the voting time carried in the time configuration information;
  • the voting node generates, according to the voting request, the voting information generated in the voting time and sends the voting information to the campaign node, so that the campaign node counts the number of the voting information in the counting time and determines the leader node.
  • the embodiment of the present application further provides a time-based node election method, where the method is used to determine a leader node in a distributed system, where the method includes:
  • the leader node When a leader node exists in all the nodes, and the leader node determines that it meets the preset criteria, the leader node sends a re-election request to all the nodes in the voting time according to the term of the leader node in the time configuration information;
  • the leader node receives voting information generated by other nodes according to the re-election request
  • the leader node counts the number of the received voting information during the counting time
  • the preset standard includes at least one of a processing load standard and a data update degree.
  • the embodiment of the present application further provides a time-based node election method, where the method is used to determine a leader node in a distributed system, where the method includes:
  • the leader node selects the node that meets the preset criterion in other nodes according to the term of the leader node in the time configuration information. , as an inheritance node;
  • the leader node sends a voting request for the inherited node to the other node in the voting period, so that the inherited node receives the voting information sent by the other node, and counts the number of the voting information in the counting time. For the new leader node.
  • the embodiment of the present application further provides a time-based node election method, where the method is used to determine a leader node in a distributed system, where the method includes:
  • At least two nodes serve as voting nodes, and receive a re-election request sent by the leader node in a voting time carried in the time configuration information;
  • the voting node according to the re-election request, in the voting time carried in the time configuration information, Generating voting information is sent to the leader node, so that the leader node counts the number of voting information in the counting time to determine a re-election state;
  • the embodiment of the present application further provides a time-based node election method, where the method is used to determine a leader node in a distributed system, where the method includes:
  • At least two nodes serve as voting nodes, and receive a voting request for the inherited node sent by the leader node in a voting time carried in the time configuration information;
  • the voting node generates, according to the voting request, the voting information generated in the voting time carried in the time configuration information, and sends the voting information to the inherited node, so that the inherited node counts the number of the voting information in the counting time. Identify the new leader node.
  • a time-based node election apparatus is provided in the embodiment of the present application, where the apparatus is used to determine a leader node in a distributed system, where the apparatus includes:
  • a configuration module configured to configure the same voting time, the counting time, and the term of the leader node for all nodes
  • a sending module configured to send the configured voting time, the counting time, and the term of the leader node in the time configuration information to each node, so that each node votes in the voting time, in the counting time
  • the counting is performed internally, and the leader node is elected according to the counting result, and each node performs periodic node election according to the term of the leader node.
  • the embodiment of the present application further provides a time-based node election device, where the device is used to determine a leader node in a distributed system, is set in an election node, and when there is no leader node in all nodes, the device includes :
  • a voting request module configured to send a voting request to all nodes during a voting time carried by the time configuration information
  • a receiving module configured to receive voting information generated by other nodes according to the voting request
  • a statistics module configured to count the number of voting information received by each time in the counting time carried by the time configuration information
  • the determining module is configured to determine the leader node according to the counted number of respective voting information, and process the specified service.
  • the embodiment of the present application further provides a time-based node election apparatus, where the apparatus is used to determine a leader node in a distributed system, is set in a voting node, and when there is no leader node in all nodes, the apparatus includes :
  • a receiving module configured to receive a voting request sent by the campaign node during a voting time carried in the time configuration information
  • the voting information module is configured to generate, according to the voting request, the voting information generated in the voting time and send the voting information to the campaign node, so that the campaign node counts the number of the voting information in the counting time and determines the leader node.
  • the embodiment of the present application further provides a time-based node election apparatus, where the apparatus is used to determine a leader node in a distributed system, and is disposed in a leader node, where all nodes include a leader node, and the leader node determines itself
  • the device includes:
  • a re-request request module configured to send a re-election request to all nodes according to a duration of a leader node in the time configuration information
  • a receiving module configured to receive voting information generated by other nodes according to the re-election request
  • a statistics module configured to count the number of the received voting information during the counting time
  • a determining module configured to determine a re-election state according to the counted number of the voting information, and process the designated service after the successful re-election;
  • the preset standard includes at least one of a processing load standard and a data update degree.
  • the embodiment of the present application further provides a time-based node election apparatus, where the apparatus is used to determine a leader node in a distributed system, and is disposed in a leader node, where all nodes include a leader node, and the leader node determines itself
  • the device includes:
  • a screening module for configuring the duration of the leader node in the information according to the time, in other nodes Filtering nodes that meet the preset criteria as inheritance nodes;
  • a voting requesting module configured to send a voting request for the inherited node to the other node during the voting period, so that the inherited node receives the voting information sent by the other node, and counts the voting information in the counting time The quantity is determined to be the new leader node.
  • the embodiment of the present application further provides a time-based node election device, where the device is used to determine a leader node in a distributed system, and is disposed in a voting node.
  • the device includes:
  • a receiving module configured to receive a re-election request sent by the leader node in a voting time carried in the time configuration information
  • a voting information module configured to generate, according to the re-election request, a voting information sent to the leader node in a voting time carried in the time configuration information, so that the leader node collects the voting information in the counting time
  • the quantity determines the status of re-election.
  • the embodiment of the present application further provides a time-based node election device, where the device is used to determine a leader node in a distributed system, and is disposed in a voting node.
  • the device includes:
  • a receiving module configured to receive a voting request sent by the leader node for the inherited node in a voting time carried in the time configuration information
  • a voting information module configured to send, according to the voting request, a voting information to the inherited node in a voting time carried in the time configuration information, so that the inherited node counts the voting information in the counting time
  • the quantity, the new leader node is determined, and is used to not process the voting request received during the term of the leader node.
  • the embodiment of the present application provides a time-based node election method and device.
  • the host configures the same voting time and the counting time for all the nodes, and carries the configured voting time and the counting time in the time configuration information. And sending to each node, so that each node votes in the voting time, counts the votes in the counting time, and selects a leader node according to the counting result.
  • Each campaign node performs voting operations and counting votes simultaneously according to the same voting time and counting time configured by the host. The operation improves the defects that the voting time and the counting time of each node in the prior art cannot be determined, so that the efficiency of determining the leader node is greatly improved during the election process of the node.
  • FIG. 1 , FIG. 2 , and FIG. 5 to FIG. 9 are diagrams showing a time-based node election process according to an embodiment of the present application
  • 3a to 3d are schematic diagrams of voting time and counting time provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of sending, by each node, voting information to perform node election in a specific application example provided by an embodiment of the present application;
  • FIG. 10 is a schematic structural diagram of a time-based node election apparatus according to an embodiment of the present application.
  • the method is used to determine a leader node in a distributed system, and the method specifically includes the following steps:
  • the host configures the same voting time, the counting time, and the term of the leader node for all nodes.
  • a host is provided in the distributed system for managing each node in the distributed system, such as scheduling data, configuring data, issuing specific instructions, and the like.
  • the machine includes but is not limited to: a network device with a monitoring function such as a computer or a server.
  • the timings for the different nodes to issue the voting request and the response to the voting request are uncertain, and therefore, in the embodiment of the present invention,
  • the nodes in the distributed system are time-configured by the hosts in the distributed system, so that the nodes perform the same type of processing operations in the same time. That is, in the above step S101, the same voting time and the counting time are configured by the host for different nodes.
  • the voting time and the counting time in the embodiment of the present application are both a time interval (not a time point at a certain time), a length (length) of the time interval of the voting time and the counting time, including but not limited to: milliseconds. Duration of time (ms), seconds (s), minutes (min), hours (h), days (D), weeks (week), and months (mon).
  • the host will also configure the leader node's term for all nodes. When any node is elected as a leader node and has passed the configured term, the next node election process begins.
  • the configured voting time, the counting time, and the term of the leader node are carried in the time configuration information and sent to each node, so that each node votes in the voting time, and counts in the counting time. Tickets, and the leader node is elected according to the result of the counting, and each node performs periodic node election according to the term of the leader node.
  • each node After the host configuration completes the voting time, the counting time, and the term of the leader node, each node needs to be notified, so that each node performs the corresponding operation according to the configured voting time, the counting time, and the leader node's term. Therefore, the host will perform the corresponding operation.
  • the configured voting time, the counting time, and the term of the leader node are carried in the time configuration information and sent to each node. In this way, after each node receives the time configuration information, each node adjusts its built-in clock according to the received time configuration information, so that different nodes synchronously trigger the voting time and the counting time, so that Perform the corresponding operations synchronously.
  • the voting time of the host configuration, the counting time, and the term of the leader node are periodic. This is because: when each node performs the voting and counting operations according to the voting time and the counting time of the host configuration, after determining the leader node, each node and the leader node will be opposite each other.
  • the service should be processed. Due to the huge amount of data processed by the distributed system in actual applications, the processing load and data update degree of the leader node and other nodes may change, which may cause the leader node to load excessively and data. Update the lag, downtime, etc., which seriously affects the processing efficiency of the leader node for the specified service.
  • the voting time, the counting time, and the term of the leader node configured by the host will be periodically repeated.
  • the interval time of the voting time is 3000ms, that is, after 3000ms of the end of the first voting time, the second voting time will be entered.
  • the leader node has a ten-term term, that is, when a node is elected as a leader node and continues for 10 minutes, the next node election process begins.
  • the time period of the voting time and the counting time will be adjusted or set according to the needs of the actual application, and does not constitute a limitation on the present application.
  • the host configures the same time for each node in the distributed system, so that the nodes can perform corresponding voting and counting operations in the same time, and also make the original time asynchronous. Nodes can perform the same type of operations simultaneously, which effectively improves the efficiency of electing the leader nodes.
  • a time-based node election method is provided in the embodiment of the present application. As shown in FIG. 2, the method includes the following steps:
  • At least one node serves as an election node, and sends a voting request to all nodes in the voting time carried by the time configuration information.
  • each node After the distributed system performs maintenance, update, etc., there is no leader node in each node in the distributed system. At this time, each node will elect a leader node. Considering that in the actual application scenario, at least two nodes, the node election can be performed. When the node is elected, a node can issue a voting request (the voting request is sent to the node itself and another node), so In the above step S201 of the embodiment of the present application, at least two nodes will be voted as the campaign node. Of course, in the actual application scenario, in the case where there are multiple nodes, each node will serve as an election node and send a voting request to other nodes.
  • the campaign node will vote according to the voting time configured by the host, that is, the campaign node will perform its own built-in clock signal according to the time configuration information sent by the host. Configuration, when the clock built in the campaign node reaches the configured voting time, the campaign node will perform the operation of sending the voting request.
  • the voting request includes node information such as a node identifier and a node status of the campaign node, so as to reflect various node states such as data processing capability and data update degree of the campaign node, so as to perform voting selection with other nodes.
  • Each campaign node receives voting information generated by other nodes according to the voting request.
  • the other node After receiving the voting request sent by the campaign node, the other node generates corresponding voting information according to the voting request, and sends the corresponding voting information to the corresponding campaign node.
  • step S202 the process of receiving voting information by each campaign node is also within the voting time.
  • Each campaign node counts the number of voting information received by each of the voting nodes during the counting time carried by the time configuration information.
  • each campaign node will configure its own built-in clock according to the time configuration information received from the host.
  • the clock in the campaign node reaches the configured ticket counting time, the campaign node will perform the counting operation. .
  • Each campaign node determines a leader node according to the number of the respective voting information that is counted, and processes the specified service.
  • step S204 the process by which each campaign node determines the leader node will be completed before the end of the counting time. Moreover, after a certain campaign node is determined to be a leader node, the leader node will send a notification message to other nodes to inform other nodes that the leader node has been generated. The leader node will process the specified service, such as maintaining and managing metadata in the distributed system.
  • the final determined leader node is unique, so that the processing of the specified service is implemented by using a leader node, which can increase the collection, allocation, and processing of the specified service. Efficiency, at the same time, can also avoid situations where multiple leader nodes compete for the specified service, resulting in business conflicts.
  • each campaign node performs the voting operation and the counting operation synchronously according to the same voting time and the counting time configured by the host, and improves the defects that the voting time and the counting time of each node in the prior art cannot be determined, thereby making During the election of nodes, the efficiency of determining the leader nodes is greatly improved.
  • the voting time and the counting time configured by the host do not overlap, so that each node in the distributed system only performs the voting operation during the voting time, and only counts the votes.
  • the counting operation is performed within the time.
  • the campaign node configures a corresponding voting time and a counting time for the clock built into the campaign according to the time configuration information. That is, in Fig. 3a, the voting time is in the time of 1000 ms to 2000 ms, and the counting time is in the time of 3500 ms to 4500 ms.
  • each campaign node when the clock built in the campaign node reaches 1000 ms, each campaign node enters the voting time, and sends voting information to other nodes, and receives voting information sent by other nodes in a voting time of 1000 ms. And when the clock reaches 2000ms, stop voting. Similarly, during the counting time (3500ms to 4500ms), the campaign node will count the received voting information. When the clock reaches 4500 ms, each campaign node stops counting votes, and determines the leader node according to the counted number of voting information. This way ensures that different campaign nodes perform different operations simultaneously in different configuration times.
  • the campaign node when the voting node counts the received voting information during the counting time, the campaign node further stops: when the counting time comes, the charging node stops receiving State the voting information.
  • each campaign node in consideration of the fact that each campaign node statistically determines the leader node for the voting information received by the campaign node, each of the campaign nodes independently counts the number of respective voting information, in order to ensure that the campaign node can be statistically calculated.
  • the voting information directly determines whether it is a leader node.
  • the threshold can be set in advance, and according to the threshold and the number of statistical voting information, whether the campaign node can become a leader node can be determined.
  • each of the campaign nodes determines the leader node according to the counted number of the respective voting information, specifically: when the campaign node determines the counted number of the voting information, When the preset threshold is exceeded, the campaign node determines itself as a leader node. Wherein the threshold is one-half of the number of all nodes.
  • each node in the distributed system knows the total number of all nodes in the distributed system (as one way of the present application, the total number of nodes in the distributed system can be separately sent by the host. For each node), when the number of voting information of a certain node exceeds one-half of the amount of data of all nodes, then it is possible to uniquely determine that the node is a leader node.
  • the distributed system includes six nodes, that is, nodes A to F.
  • all six nodes in the distributed system act as campaign nodes, and all send voting requests to other nodes (the process of sending a voting request is not shown in FIG. 4), and receive voting information. It is assumed that in this example, each node can successfully receive a voting request, and each node does not send a voting request to itself.
  • each node will send a voting request to each node except itself (in actual application, the node will also issue a voting request to itself.
  • the nodes are assumed to In the case where a node other than itself transmits a voting request, specifically, for the node A, the node A transmits a voting request to the other five nodes (the node B to the node F). Similarly, Node B to Node G also send voting requests to five nodes other than themselves. Sending each node that receives the voting request to generate voting information and sending it to the corresponding campaign section
  • node A transmits the generated voting information to node B.
  • Node B sends the generated voting information to node C.
  • the node C, the node D, the node E, and the node F all send the voting information generated by each to the node A.
  • each node will count the number of voting information received by itself. Specifically, node A counts the number of voting information it receives as 4, and node B counts the voting information it receives. The number is 1, node C counts that the number of voting information it receives is 1, and the number of voting information in the remaining nodes is zero.
  • the number of voting information in node A is greater than a preset threshold, so node A can determine that it is a leader node. After that, the node A sends a broadcast to other nodes to notify other nodes that the node A has become a leader node.
  • each node immediately re-executes the node election process until the leader node is determined.
  • the voting time and the counting time configured by the host for each node have periodicity, and the counting time can be more specifically divided into different sub-times.
  • the counting time is specifically divided into a statistical time and a notification time. Then, each node counts the number of voting information received by each node in the statistical time. If the node does not receive any notification of the leader node within the notification time, the next node election is performed.
  • the multiple election times (each election time including the voting time and the counting time) allocated by the host in the embodiment of the present application have periodicity.
  • the process of node election will be performed again in the second election time until the leader node is elected.
  • the process of the node election is periodically performed according to the term of the leader node in the time configuration information. The specific process will be described in detail later, and will not be described here.
  • the above methods S201 to S204 shown in FIG. 2 are based on the process in which the campaign node sends a voting request to other nodes and receives the voting information to determine the leader node.
  • the campaign node For each node in the distributed system, it can also serve as a voting node, receive the voting request sent by the election node, and generate corresponding voting information according to the voting request (even for the voting node, it will receive the voting sent by other voting nodes).
  • the request, at this time, the campaign node can also be regarded as a voting node). Therefore, in the case of the node that generates the voting information, the embodiment of the present application further provides a time-based node election method. As shown in FIG. 5, the method is used to determine a leader node in a distributed system, and the method specifically includes the following steps:
  • S501 When there is no leader node in all the nodes, at least two nodes serve as voting nodes, and receive a voting request sent by the campaign node during the voting time carried in the time configuration information.
  • each node in the distributed system can serve as a voting node to receive the voting request sent by the campaign node.
  • the voting node will also receive the time configuration information sent by the host, adjust the clock inside the voting node, and configure the voting time and the counting time.
  • the voting node generates, according to the voting request, the voting information generated in the voting time and sends the voting information to the campaign node, so that the campaign node counts the number of the voting information in the counting time and determines the leader node.
  • the voting node will receive a voting request sent by at least one voting node (in the actual application scenario, the voting node usually receives a voting request from multiple voting nodes), and only one leader can be elected in the end.
  • the node and thus, the voting node will select a campaign node to vote, that is, the voting node will select an election node according to the voting request it receives, and generate a voting message for the selected node and send it to the election.
  • the voting node will select a campaign node to vote, that is, the voting node will select an election node according to the voting request it receives, and generate a voting message for the selected node and send it to the election.
  • the fixed node In the fixed node.
  • each voting node in the distributed system is configured with the same voting time, so that each voting node can select the voting node within the same voting time, and generate a corresponding voting request to be sent to the election.
  • the synchronization of the voting process is guaranteed, and the efficiency of electing the nodes is also improved.
  • the voting node when the voting node sends a voting request to the voting node, the voting request usually carries the node information of the voting node. In this way, in the case that the voting node receives multiple voting requests, the voting node can select the campaign node according to the node information carried in the voting request.
  • the generated voting information is sent to the campaign node, where the voting node determines the node information carried in the received voting request, and determines the campaign node according to the node information.
  • the node state weight is selected, and the campaign node with the highest node state weight is selected, and the voting information for the campaign node is generated and sent to the selected campaign node.
  • the node information includes, but is not limited to, data update information of the campaign node, and processing load. Information, hardware configuration information, etc. reflect the data processing capability and processing status of the campaign node. Therefore, the voting node can determine the node state weights of different campaign nodes according to the node information, and reflect the comprehensive state level of different campaign nodes. Therefore, in the embodiment of the present application, the voting node selects the campaign node with the highest node state weight, and generates corresponding voting information to send to the campaign node. Complete the voting process.
  • the methods S201 to S204 shown in FIG. 2 and the methods S501 to S502 shown in FIG. 5 are all the voting time and the calculation of each node according to the configuration of the host in the case where the leader node does not exist in the distributed system.
  • Ticket time the process of determining the leader node.
  • the embodiment of the present application further provides a time-based node election method. As shown in FIG. 6 , the method is used to determine a leader node in a distributed system, specifically including the following. step:
  • the leader node is determined by the methods S201 to S204 as shown in FIG. 2 and the methods S501 to S502 as shown in FIG. 5, before the term of the leader is about to end, the next step is required.
  • a node election at this time, other nodes than the leader node will not send a voting request, and only the leader node can send a re-election request to other nodes.
  • the current leader node determines whether the node state of the current node meets the preset criteria. If it is met, the processing load and the data update degree of the leader node are not affected. The efficiency of the specified service processing, therefore, the leader node will send a re-election request to other nodes.
  • the preset criteria include, but are not limited to, processing load standards, data update levels, and the like. Since the hardware configuration (processing performance, storage space, etc.) of different nodes may be different, this application In the example, the preset criteria of each node may also be different. Then, each node generates a corresponding preset standard according to its own hardware configuration.
  • the preset criteria of each node are preset in the form of standard values.
  • the processing load standard is: the central processing unit (CPU) usage rate does not exceed 80%. That is to say, when the CPU is used less than 80%, the node can be considered to meet the preset criteria.
  • the data update degree standard is: the data update frequency exceeds 10 min/time (the data update frequency can reflect the degree of data update). That is to say, when the data update frequency of the node exceeds 10 min/time, the node can be considered to meet the preset standard.
  • the foregoing content is only an example of the preset standard provided by the embodiment of the present application.
  • the preset standard of each node is set according to the needs of the actual application, and does not constitute a limitation on the present application.
  • the leader node receives voting information generated by other nodes according to the re-election request.
  • the node that receives the re-election request generates corresponding voting information according to the re-election request and sends it to the leader node.
  • the leader node counts the number of the received voting information during the counting time.
  • the leader node determines a re-election state according to the counted number of the voting information, and processes the designated service after being successfully re-elected.
  • the leader node since the leader node sends the re-election request to other nodes, there is no other campaign node in the distributed system, that is, each node only receives the connection request from the leader node, so the leader node Usually will be re-elected.
  • the leader node After the leader node is successfully re-elected, the leader node sends a notification message to each node to notify each node that the leader node has been successfully re-elected, so that the successfully re-lead leader node will continue to process the specified service, and other nodes in the distributed system will continue. Process business normally.
  • the embodiment of the present application further provides a time-based node election method. As shown in FIG. 7, the method is used to determine a leader in a distributed system.
  • the node includes the following steps:
  • S701 When there is a leader node in all the nodes, at least two nodes serve as voting nodes, and receive the re-election request sent by the leader node in the voting time carried in the time configuration information.
  • the voting node generates, according to the re-election request, the voting information sent to the leader node in the voting time carried in the time configuration information, so that the leader node collects the voting information in the counting time.
  • the number determines a re-election state, and the voting node receives only the voting request sent by the leader node during the term of the leader node.
  • the embodiment of the present application provides a time-based node election method. As shown in FIG. 8 , the method is used to determine a leader node in a distributed system, and specifically includes the following steps:
  • the leader node selects the preset criteria according to the leader node in the time configuration information.
  • the node as an inherited node.
  • leader node determines that it does not meet the preset criteria, it indicates that the leader node may be responsible for excessive processing or the data update level is too low. In this case, the efficiency of the leader node processing the specified service will be seriously affected. That is, the current leader node is no longer suitable for re-processing the designated industry. Business.
  • the leader node before the end of the term of the leader node, the leader node will filter out the inherited node from other nodes.
  • the leader node may send a query request to other nodes to query node information of other nodes, and select an inherited node according to the node information.
  • the leader node may be selected by the host to select the inherited node, that is, the leader node is selected, and then the current leader node receives the reselection command, and then One node in the node is selected as the inherited node of the leader node.
  • the above manner is not intended to limit the application.
  • the leader node sends a voting request for the inherited node to the other node in the voting period, so that the inherited node receives the voting information sent by the other node, and counts the voting information in the counting time.
  • the quantity is determined to be the new leader node.
  • the voting request sent by the leader node to other nodes carries the node identifier of the inherited node, that is, the node that receives the voting request generates corresponding voting information, and according to the node identifier of the inherited node. , the voting information is sent to the inherited node. In this way, the voting information of each node is only sent to the inherited node, and is not sent to the current leader node.
  • the inherited node receives the voting information sent by each node, so during the counting time, the inherited node will count the received voting information and determine it as the leader node. And send a notification message to each node to inform each node that the inherited node has become the new leader node.
  • the embodiment of the present application further provides a time-based node election method. As shown in FIG. 9, the method is used to determine a leader node in a distributed system. Specifically, the following steps are included:
  • S901 When there is a leader node in all the nodes, at least two nodes serve as voting nodes, and receive a voting request for the inherited node sent by the leader node in a voting time carried in the time configuration information.
  • the voting node generates, according to the voting request, the voting information generated in the voting time carried in the time configuration information, and sends the voting information to the inherited node, so that the inherited node is in the counting time.
  • the number of voting information is counted to determine a new leader node.
  • the voting node since the voting request sent by the leader node carries the node identifier of the inherited node, the voting node generates corresponding voting information according to the voting request, and votes according to the node identifier of the inherited node. Information is sent to the inherited node and not sent to other nodes. This ensures that the inherited node can successfully become the new leader node.
  • the host of the distributed system configures the same voting time and the counting time for each node, so that each node simultaneously votes in the voting time, and The counting is performed synchronously during the counting time. In this way, the timing of voting or counting of votes by each node is not determined, which greatly improves the efficiency of electing the leader nodes of each node in the distributed system.
  • each node is still based on the periodic voting time and the counting time.
  • the leader node will judge its own state to generate a voting request for itself or It is a voting request for the inherited node, so that other nodes generate voting information according to the voting request and send it to the corresponding node.
  • the elected leader node for processing the specified service is always in a high-performance state, which can improve the efficiency of the distributed system as a whole for business processing.
  • the embodiment of the present application further provides a time-based node election device, as shown in FIG. 10 .
  • the time-based node election apparatus includes: a configuration module 1001 and a sending module 1002, where
  • the configuration module 1001 is configured to configure the same voting time, the counting time, and the term of the leader node for all nodes.
  • the sending module 1002 is configured to send the configured voting time, the counting time, and the term of the leader node in the time configuration information to each node, so that each node votes in the voting time, where The counting is performed within the counting time, and the leader node is elected according to the counting result, and each node performs periodic node election according to the term of the leader node.
  • the embodiment of the present application further provides a time-based node election apparatus.
  • the apparatus is used to determine a leader node in a distributed system, and is set in an election node.
  • the time-based node election apparatus includes: a voting request module 1101, a receiving module 1102, a statistics module 1103, and a determining module 1104, wherein when there is no leader node in all nodes,
  • the voting request module 1101 is configured to send a voting request to all nodes during the voting time carried in the time configuration information.
  • the receiving module 1102 is configured to receive voting information generated by other nodes according to the voting request.
  • the statistic module 1103 is configured to count the number of voting information received by each time in the counting time carried by the time configuration information.
  • the determining module 1104 is configured to determine a leader node according to the counted number of respective voting information, and process the specified service.
  • the receiving module 1102 is further configured to stop receiving the voting information when the counting time comes.
  • the determining module 1104 is specifically configured to determine the campaign node as a leader node when determining the number of the voted information that exceeds a preset threshold.
  • the threshold is one-half of the number of all nodes.
  • the embodiment of the present application further provides a time-based node election device. As shown in FIG. 12, the device is used to determine a leader node in a distributed system and is set in a voting node.
  • the time-based node election apparatus includes: a receiving module 1201 and a voting information module 1202, wherein when all nodes do not include a leader node,
  • the receiving module 1201 is configured to receive a voting request sent by the campaign node during a voting time carried in the time configuration information.
  • the voting information module 1202 is configured to generate, according to the voting request, the voting information generated in the voting time and send the voting information to the campaign node, so that the campaign node counts the number of the voting information in the counting time. Quantity, determine the leader node.
  • the voting information module 1202 is specifically configured to determine node information carried in the received voting request, and determine a node state weight of the campaign node according to the node information, and select The campaign node with the highest node state weight, and generates voting information for the campaign node, and sends it to the selected campaign node.
  • the embodiment of the present application further provides a time-based node election device. As shown in FIG. 13, the device is used to determine a leader node in a distributed system and is disposed in a leader node.
  • the time-based node election apparatus includes: a re-registration request module 1301, a receiving module 1302, a statistic module 1303, and a determining module 1304, wherein when all nodes include a leader node, and the leader node determines that it conforms When the standard is preset,
  • the re-request request module 1301 is configured to send a re-election request to all nodes according to the duration of the leader node in the time configuration information.
  • the receiving module 1302 is configured to receive voting information generated by other nodes according to the re-election request.
  • the statistic module 1303 is configured to count the number of the received voting information during the counting time.
  • the determining module 1304 determines a re-election state according to the counted number of the voting information, and processes the designated service after the successful re-election.
  • the preset standard includes at least one of a processing load standard and a data update degree.
  • the embodiment of the present application further provides a time-based node election device. As shown in FIG. 14, the device is used to determine a leader node in a distributed system, and is disposed in a leader node.
  • the time-based node election apparatus includes: a screening module 1401 and a voting request module 1402, wherein when all nodes include a leader node, and the leader node determines that it does not meet the preset criteria,
  • the screening module 1401 is configured to filter, according to the term of the leader node in the time configuration information, a node that meets the preset criterion in other nodes as an inherited node.
  • the voting request module 1402 is configured to send, to the other node, the The voting request of the node is inherited, so that the inherited node receives the voting information sent by the other node, and counts the number of the voting information in the counting time as the new leader node.
  • the embodiment of the present application further provides a time-based node election device. As shown in FIG. 15, the device is used to determine a leader node in a distributed system and is set in a voting node.
  • the time-based node election apparatus includes: a receiving module 1501 and a voting information module 1502, wherein when all nodes include a leader node,
  • the receiving module 1501 is configured to receive a re-election request sent by the leader node in a voting time carried in the time configuration information.
  • the voting information module 1502 is configured to generate, according to the re-election request, the voting information sent to the leader node in the voting time carried in the time configuration information, so that the leader node collects the statistics in the counting time.
  • the number of voting information determines a re-election state and is used to receive only voting requests sent by the leader node during the term of the leader node.
  • the embodiment of the present application further provides a time-based node election device. As shown in FIG. 16, the device is used to determine a leader node in a distributed system and is set in a voting node.
  • the time-based node election apparatus includes: a receiving module 1601 and a voting information module 1602, wherein when a leader node exists in all nodes,
  • the receiving module 1601 is configured to receive a voting request sent by the leader node for the inherited node in a voting time carried in the time configuration information.
  • the voting information module 1602 is configured to generate, according to the voting request, the voting information sent to the inherited node in the voting time carried in the time configuration information, so that the inherited node counts the statistics in the counting time. The number of voting information determines the new leader node.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种基于时间的节点选举方法及装置,该方法包括:主机为所有节点配置相同的投票时间和计票时间(S101),将配置的所述投票时间和计票时间携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点(S102)。各竞选节点根据主机配置的相同的投票时间和计票时间,同步执行投票操作和计票操作,改善了现有技术中各节点投票、计票时机不能确定的缺陷,从而使得对节点的选举过程中,极大提升了确定leader节点的效率。

Description

一种基于时间的节点选举方法及装置 技术领域
本申请涉及计算机技术领域,尤其涉及一种基于时间的节点选举方法及装置。
背景技术
随着信息技术的发展,互联网可以为用户提供多元化、海量化的信息,对于网络服务商而言,传统的单一服务器或数据库等处理设备,已经不能满足对海量数据进行处理的要求,因此分布式系统应运而生。
通常,分布式系统可以对其中包含多个处理设备(如:服务器、处理器或者数据库等),以全局方式对该系统中的各类数据资源进行调度、分布式处理、协同处理、远程控制等多种管理操作。对于分布式系统中的每一个处理设备而言,均可以看作是一个分布式节点(简称为节点),这样一来,分布式系统便可以将巨量数据“分布”到系统中的每一个节点中,使得每一个节点都对相应的数据进行处理,从而有效提升对数据的处理效率并显著增加数据的吞吐量。
在分布式系统中,为了进一步提升对不同节点中的数据资源的调度效率,需要将某些特殊类型的信息统一存储在同一节点中,如:元信息(元信息是对数据资源的描述性信息),包括:数据的存储位置、更新状态、查找关键词等信息。
现有技术中,采用节点选举的方式,选出合适的节点(也可称为leader节点)对元信息进行维护管理。其中,对节点的选举方式具体为:不同的节点均会向其他节点发送投票请求,各节点接收到投票请求后进行投票,最后根据统计出的票数,选出leader节点。
但是,采用上述节点选举的方式时,不同的节点均有各自的大量数据需要处理,当某一节点处于空闲并向其他节点发送投票请求后,其他的各节点可能正在处理数据,那么,其他的节点即使接收到该节点发送的投票请求后,也不 会立即进入投票状态,也就是说,各节点对投票、统计的时机均是不确定,不能及时有效地进行节点选举。
发明内容
本申请实施例提供一种基于时间的节点选举方法及装置,用以解决目前进行节点选举时效率较低的问题。
本申请实施例提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
主机为所有节点配置相同的投票时间、计票时间以及leader节点的任期;
将配置的所述投票时间、计票时间以及leader节点的任期携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点,并使得各节点根据所述leader节点的任期进行周期性节点选举。
本申请实施例还提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
当所有节点中不存在leader节点时,至少一个节点作为竞选节点,在时间配置信息所携带的投票时间内,向所有节点发送投票请求;
各竞选节点接收其他节点根据所述投票请求生成的投票信息;
各竞选节点在所述时间配置信息所携带的计票时间内,统计各自接收到的投票信息的数量;
各竞选节点根据统计出的各自的投票信息的数量确定leader节点,对指定业务进行处理。
本申请实施例还提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
当所有节点中不存在leader节点时,至少两个节点作为投票节点,在时间配置信息所携带的投票时间内,接收竞选节点发送的投票请求;
所述投票节点根据所述投票请求,在投票时间内生成投票信息发送至竞选节点,使得所述竞选节点在计票时间内统计所述投票信息的数量,确定leader节点。
本申请实施例还提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
当所有节点中存在leader节点,且所述leader节点确定自身符合预设标准时,所述leader节点根据时间配置信息中的leader节点的任期,在投票时间内向所有节点发送连任请求;
所述leader节点接收其他节点根据所述连任请求生成的投票信息;
所述leader节点在计票时间内,统计接收到的所述投票信息的数量;
所述leader节点根据统计出的所述投票信息的数量确定连任状态,并在成功连任后对指定业务进行处理;
其中,所述预设标准,包括处理负载标准、数据更新程度中的至少一种。
本申请实施例还提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
当所有节点中存在leader节点,且所述leader节点确定自身不符合预设标准时,所述leader节点根据时间配置信息中的leader节点的任期,在其他节点中筛选出符合所述预设标准的节点,作为继承节点;
所述leader节点在所述投票时段内,向其他节点发出针对该继承节点的投票请求,使得所述继承节点接收其他节点发送的投票信息,并在计票时间内统计所述投票信息的数量确定为新任leader节点。
本申请实施例还提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
当所有节点中存在leader节点时,至少两个节点作为投票节点,在时间配置信息中所携带的投票时间内,接收所述leader节点发送的连任请求;
所述投票节点根据所述连任请求,在时间配置信息中所携带的投票时间内, 生成投票信息发送至所述leader节点,使得所述leader节点在计票时间内统计所述投票信息的数量确定连任状态;
并且,所述投票节点在所述leader节点的任期内接收到的投票请求不进行处理。
本申请实施例还提供的一种基于时间的节点选举方法,所述方法用于分布式系统中确定leader节点,所述方法包括:
当所有节点中存在leader节点时,至少两个节点作为投票节点,在时间配置信息中携带的投票时间内,接收所述leader节点发送的针对继承节点的投票请求;
所述投票节点根据所述投票请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述继承节点,使得所述继承节点在计票时间内统计所述投票信息的数量,确定新任leader节点。
本申请实施例提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,所述装置包括:
配置模块,用于为所有节点配置相同的投票时间、计票时间以及leader节点的任期;
发送模块,用于将配置的所述投票时间、计票时间以及leader节点的任期携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点,并使得各节点根据所述leader节点的任期进行周期性节点选举。
本申请实施例另提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,设置在竞选节点中,且当所有节点中不存在leader节点时,所述装置包括:
投票请求模块,用于在时间配置信息所携带的投票时间内,向所有节点发送投票请求;
接收模块,用于接收其他节点根据所述投票请求生成的投票信息;
统计模块,用于在所述时间配置信息所携带的计票时间内,统计各自接收到的投票信息的数量;
确定模块,用于根据统计出的各自的投票信息的数量确定leader节点,对指定业务进行处理。
本申请实施例另提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,设置在投票节点中,且当所有节点中不存在leader节点时,所述装置包括:
接收模块,用于在时间配置信息所携带的投票时间内,接收竞选节点发送的投票请求;
投票信息模块,用于根据所述投票请求,在投票时间内生成投票信息发送至竞选节点,使得所述竞选节点在计票时间内统计所述投票信息的数量,确定leader节点。
本申请实施例另提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,设置在leader节点中,当所有节点中包含leader节点,且所述leader节点确定自身符合预设标准时,所述装置包括:
连任请求模块,用于根据时间配置信息中的leader节点的任期,在投票时间内向所有节点发送连任请求;
接收模块,用于接收其他节点根据所述连任请求生成的投票信息;
统计模块,用于在计票时间内,统计接收到的所述投票信息的数量;
确定模块,用于根据统计出的所述投票信息的数量确定连任状态,并在成功连任后对指定业务进行处理;
其中,所述预设标准,包括处理负载标准、数据更新程度中的至少一种。
本申请实施例另提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,设置在leader节点中,当所有节点中包含leader节点,且所述leader节点确定自身不符合预设标准时,所述装置包括:
筛选模块,用于根据时间配置信息中的leader节点的任期,在其他节点中 筛选出符合所述预设标准的节点,作为继承节点;
投票请求模块,用于在所述投票时段内,向其他节点发出针对该继承节点的投票请求,使得所述继承节点接收其他节点发送的投票信息,并在计票时间内统计所述投票信息的数量确定为新任leader节点。
本申请实施例另提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,设置在投票节点中,当所有节点中包含leader节点时,所述装置包括:
接收模块,用于在时间配置信息中所携带的投票时间内,接收所述leader节点发送的连任请求;
投票信息模块,用于根据所述连任请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述leader节点,使得所述leader节点在计票时间内统计所述投票信息的数量确定连任状态。
本申请实施例另提供的一种基于时间的节点选举装置,所述装置用于分布式系统中确定leader节点,设置在投票节点中,当所有节点中存在leader节点时,所述装置包括:
接收模块,用于在时间配置信息中携带的投票时间内,接收所述leader节点发送的针对继承节点的投票请求;
投票信息模块,用于根据所述投票请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述继承节点,使得所述继承节点在计票时间内统计所述投票信息的数量,确定新任leader节点,并用于对在所述leader节点的任期内接收到的投票请求不进行处理。
本申请实施例提供一种基于时间的节点选举方法及装置,通过本方法,主机为所有节点配置相同的投票时间和计票时间,将配置的所述投票时间和计票时间携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点。各竞选节点根据主机配置的相同的投票时间和计票时间,同步执行投票操作和计票 操作,改善了现有技术中各节点投票、计票时机不能确定的缺陷,从而使得对节点的选举过程中,极大提升了确定leader节点的效率。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1、图2,以及图5至图9为本申请实施例提供的基于时间的节点选举过程;
图3a至3d为本申请实施例提供的投票时间和计票时间的示意图;
图4为本申请实施例提供的具体应用实例中各节点发送投票信息进行节点选举的示意图;
图10至图16为本申请实施例提供的基于时间的节点选举装置结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
图1为本申请实施例提供的基于时间的节点选举方法,该方法用于分布式系统中确定leader节点,该方法具体包括以下步骤:
S101,主机为所有节点配置相同的投票时间、计票时间以及leader节点的任期。
在本申请实施例中,分布式系统中设置有主机,用于对该分布式系统中的各节点进行管理,如:调度数据、配置数据、发出特定指令等。其中,所述主 机包括但不限于:计算机、服务器等具有监控功能的网络设备。
考虑到现有技术中,处于分布式系统中的各节点在进行节点选举时,不同节点发出投票请求,以及对该投票请求进行响应的时机均不确定,因此,在本发明实施例中,将通过分布式系统中的主机,对处于该分布式系统中的所述各节点进行时间配置,使得各节点在相同的时间中进行同类型的处理操作。也即,在上述步骤S101中,由主机为不同的节点配置相同的投票时间和计票时间。
其中,本申请实施例中的投票时间和计票时间均是一段时间区间(并非是某时刻的时间点),投票时间和计票时间的时间区间的长度(时长),包括但不限于:毫秒(ms)、秒(s)、分钟(min)、小时(h)、天(D)、星期(week)、月(mon)等不同时间单位构成的时长。
另外,主机还将为所有节点配置leader节点的任期,当任一节点选举为leader节点且经过了配置好的任期后,则开始下一次的节点选举过程。
S102,将配置的所述投票时间、计票时间以及leader节点的任期携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点,并使得各节点根据所述leader节点的任期进行周期性节点选举。
主机配置完成投票时间、计票时间以及leader节点的任期后,就需要通知各节点,以便使各节点按照配置的投票时间、计票时间以及leader节点的任期执行相应的操作,因此,主机会将配置好的投票时间、计票时间以及leader节点的任期携带在时间配置信息中,发送至各节点。这样一来,当各节点分别接收到时间配置信息后,则各节点会根据接收到的时间配置信息,调整自身的内置时钟,实现不同的节点均同步触发所述投票时间和计票时间,以便同步执行相应的操作。
这里还需要说明的是,主机配置的投票时间、计票时间以及leader节点的任期具有周期性。这是因为:当各节点根据主机配置的投票时间和计票时间分别进行投票和计票操作,确定出leader节点之后,各节点与leader节点将对相 应的业务进行处理,而由于实际应用中,分布式系统处理的数据量巨大,会使得leader节点和其他各节点的处理负载、数据更新程度发生变化,就有可能导致leader节点出现负荷超标、数据更新滞后、宕机等情况,从而严重影响leader节点对指定业务的处理效率。在这样的情况下,若主机配置的投票时间、计票时间以及leader节点的任期不具有周期性(也即,分布式系统中的各节点只进行一次节点选举的过程,在leader节点出现故障后,各节点不会进行节点选举),那么,就会导致分布式系统整体处理停滞。若要重新进行节点选举,只能等待主机重新配置投票时间和计票时间,也会造成分布式系统对业务处理的效率下降。
因此,在本申请实施例中,由主机配置的投票时间、计票时间以及leader节点的任期将周期性的重复。例如:投票时间的间隔周期为3000ms,也就是说,当第一次投票时间结束的3000ms后,将进入第二次投票时间。又例如:leader节点的任期为10min,也即,当某一节点选举为leader节点并持续10min后,开始进行下一次节点选举过程。当然,在实际应用时,投票时间和计票时间的时间周期将根据实际应用的需要进行调整或设置,这里并不构成对本申请的限定。
采用上述步骤S101~S102的方法,主机为分布式系统中各自独立的各节点配置相同的时间,使得这些节点可以在相同的时间中执行相应的投票、计票操作,也使得原本时间异步的各节点可以同步执行同一类型的操作,有效提升了对leader节点进行选举的效率。
在本申请实施例中,在上述主机配置了相同的投票时间、计票时间以及leader节点的任期后,不同的节点将根据相应的时间配置信息执行相应的投票或计票操作,具体地,对于分布式系统中的节点而言,本申请实施例中提供了一种基于时间的节点选举方法,如图2所示,所述方法包括步骤:
S201,当所有节点中不存在leader节点时,至少一个节点作为竞选节点,在时间配置信息所携带的投票时间内,向所有节点发送投票请求。
当分布式系统进行维护、更新等状态之后,该分布式系统中的各节点中不存在leader节点,此时,各节点将选举出leader节点。考虑到在实际应用场景中,最少在两个节点的情况下,便可以进行节点选举,在节点选举时,可由一个节点发出投票请求(投票请求发送给该节点自身以及另一个节点),故在本申请实施例的上述步骤S201中,将有至少两个节点作为竞选节点进行投票。当然,在实际应用场景中,在有多个节点的情况下,各节点均会作为竞选节点,向其他节点发送投票请求。
与现有技术不同的是,在本申请实施例中,竞选节点将按照主机所配置完成的投票时间进行投票,也即,竞选节点将根据主机发送的时间配置信息,对自身的内置时钟信号进行配置,当竞选节点中内置的时钟到达配置的投票时间时,则该竞选节点将执行发送投票请求的操作。
其中,所述投票请求中包含有该竞选节点的节点标识、节点状态等节点信息,以反映出该竞选节点的数据处理能力、数据更新程度等多种节点状态,以便与其他节点进行投票选择。
S202,各竞选节点接收其他节点根据所述投票请求生成的投票信息。
当其他节点接收到所述竞选节点发送的投票请求后,就会根据所述投票请求,生成相应的投票信息,并发送至对应的竞选节点中。
当然,上述步骤S202中,各竞选节点接收投票信息的过程,也在投票时间内。
S203,各竞选节点在所述时间配置信息所携带的计票时间内,统计各自接收到的投票信息的数量。
在本申请实施例中,各竞选节点将根据从主机接收到的时间配置信息,对自身内置的时钟进行配置,当竞选节点中的时钟到达配置的计票时间时,竞选节点将进行计票操作。
S204,各竞选节点根据统计出的各自的投票信息的数量确定leader节点,对指定业务进行处理。
对于步骤S204而言,各竞选节点确定出leader节点的过程,将在计票时间结束之前完成。并且,某一竞选节点确定为leader节点后,该leader节点将会向其他节点发送通知消息,以告知其他节点leader节点已经产生。该leader节点将对指定的业务进行处理,如:对分布式系统中的元数据进行维护管理等。
需要说明的是,在本申请实施例中,最终确定出的leader节点是唯一的,这样一来,通过一个leader节点实现对指定业务进行处理,可以增加对指定业务的调取、分配、处理的效率,同时,也可以避免因多个leader节点争抢处理指定业务,而导致业务冲突的情况。
通过上述步骤,各竞选节点根据主机配置的相同的投票时间和计票时间,同步执行投票操作和计票操作,改善了现有技术中各节点投票、计票时机不能确定的缺陷,从而使得对节点的选举过程中,极大提升了确定leader节点的效率。
需要说明的是,在本申请实施例中,主机所配置的投票时间和计票时间不会发生重叠,使得分布式系统中的各节点只在在投票时间内进行投票操作,并只在计票时间内进行计票操作。例如:如图3a所示的情况下,竞选节点根据时间配置信息,对该竞选自身内置的时钟配置相应的投票时间和计票时间。也即,在图3a中,在1000ms至2000ms的时间内为投票时间,在3500ms至4500ms的时间内为计票时间。也就是说,当竞选节点内置的时钟到达1000ms时,各竞选节点进入投票时间,并向其他节点发送投票信息,并且在时长为1000ms的投票时间内,接收其他节点发送的投票信息。并在时钟到达2000ms时,停止投票。同样地,在计票时间(3500ms至4500ms)内,竞选节点将统计接收到的投票信息。而在时钟到达4500ms时,各竞选节点停止计票,并根据统计出的投票信息的数量,确定出leader节点。这样的方式保证了不同的竞选节点在不同的配置时间内,同步执行不同的操作。
而在如图3b所示的情况下,由主机配置的投票时间和计票时间之间没有时间间隔。也就是说,对于各竞选节点而言,当时钟到达2000ms时,将投票 状态直接转换为计票状态。
但是,在如图3b所示的情况下,节点之间发送投票信息需要消耗一定的时间,例如:假设某一节点将生成的投票信息发送至某竞选节点中需要耗费10ms,此时,在该投票信息传输的过程中,竞选节点的时钟已到达2000ms,也就是说,该竞选节点进入计票状态。若该竞选节点已经进入计票状态后,又接收到该投票信息,那么,在该竞选节点对投票信息进行统计时,将影响最终统计的投票信息的数量的准确性。
因此,在本申请实施例中,在所述竞选节点在计票时间内,统计接收到的所述投票信息之间,还包括:所述竞选节点在所述计票时间到来时,停止接收所述投票信息。
通过这样的方式,在如图3b所示的时间配置的情况下,当竞选节点的时钟到达2000ms进入计票状态时,该竞选节点将停止接收其他节点发送的投票信息。从而,这样的方式将保证对统计出的投票信息的数量的准确性。
另外,在本申请实施例中,考虑到各竞选节点对其接收到的投票信息进行统计确定leader节点时,各竞选节点均是独立统计各自的投票信息的数量,为了保证竞选节点可以根据统计出的投票信息直接确定出自身是否成为leader节点,那么,就可以预先设置阈值,并根据该阈值和统计出的投票信息的数量,来确定竞选节点是否可以成为leader节点。
因此,在本申请实施例中,上述步骤S204中,各竞选节点根据统计出的各自的投票信息的数量确定leader节点,具体为:当所述竞选节点判断统计出的所述投票信息的数量,超过预设的阈值时,该竞选节点将自身确定为leader节点。其中,所述阈值为所有节点数量的二分之一。
这里需要说明的是,分布式系统中的每一节点,均已知处于该分布式系统中的所有节点的总数(作为本申请的一种方式,可由主机将分布式系统中的节点总数分别发送给各节点),从而,当某一节点的投票信息的数量超过所有节点数据量的二分之一时,那么,就可以唯一确定出该节点为leader节点。
例如:如图4所示,分布式系统中包含6个节点,即,节点A~F。
在投票时间内,分布式系统中的6个节点均作为竞选节点,均向其他节点发送投票请求(发送投票请求的过程并未在图4中示出),并接收投票信息。假设在本示例中,各节点均可成功接收到投票请求,并且,各节点不向自身发送投票请求。
那么,对于这6个节点而言,每一个节点都会向除自身以外的各节点发送投票请求(实际应用中,节点也会向自身发出投票请求,本例中为了方便描述,只假设各节点向除自身以外的其他节点发送投票请求的情况),具体来说,对于节点A而言,节点A向另外5个节点(节点B~节点F)发送投票请求。同样地,节点B~节点G也向除自身之外的5个节点发送投票请求。使得接收到投票请求的各节点生成投票信息发送至相应的竞选节
从而在本示例中,对于各节点而言,均可确定参与投票的节点的数量为6。且设置阈值为3。
假设如图4所示,节点A将生成的投票信息发送给节点B。节点B将生成的投票信息发送给节点C。节点C、节点D、节点E、节点F均将各自生成的投票信息发送给节点A。
在计票时间内,各节点将统计其自身所接收到的投票信息的数量,具体地,节点A统计出其接收到的投票信息的数量为4,节点B统计出其接收到的投票信息的数量为1,节点C统计出其接收到的投票信息的数量为1,其余节点中的投票信息的数量为0。
节点A中的投票信息的数量大于预设的阈值,因此,节点A可以确定其自身为leader节点。之后,该节点A向其他节点发送广播,以通知其他节点该节点A已成为leader节点。
但是,在实际应用中,由于节点选举的过程是各节点“自主”进行投票,就有可能出现各竞选节点所接收到的投票信息的数量,均未超过预设阈值的情况。沿用上例:假设节点F所生成的投票信息并未发送给节点A,而是发送给 节点C,这样一来,节点A中的投票信息的数量为3,节点B中的投票信息的数量为1,节点C中的投票信息的数量为2,显然,这三个节点中的投票信息的数量均为超过预设阈值(也即,3)。从而,不会有节点将自身确定为leader节点,也就是说,各节点在指定的一段时长内,均未接收到leader节点的通知消息,这就表明本次节点选举并未能选举出leader节点。
在本申请实施例中,一旦出现未能选举出leader节点的情况,各节点会立即重新进行节点选举的过程,直到确定出leader节点。
结合上述示例,作为本申请实施例的一种优选方式,主机为各节点配置的投票时间和计票时间具有周期性,并且计票时间可以更具体地划分为不同的子时间。如图3c所示,针对一个周期的投票时间和计票时间而言,计票时间具体分为统计时间和通知时间。那么,各节点在统计时间内统计各自接收的投票信息的数量,若在通知时间内,各节点未接收到任何leader节点的通知,则会进行下一次的节点选举。
如图3d所示,本申请实施例中由主机分配的多次选举时间(每一次选举时间包括投票时间和计票时间)具有周期性。当在第一次选举时间内,各节点未确定出leader节点的情况下,将在第二次选举时间内再次进行节点选举的过程,直到选举出leader节点。当然,选举出leader节点后,则会按照时间配置信息中的leader节点的任期,周期性的进行节点选举的过程,其具体过程将在后续进行详细描述,在此不作过多赘述。
上述如图2所示的方法S201~S204,是基于竞选节点向其他节点发送投票请求,并接收投票信息以确定leader节点的过程。对于分布式系统中的各节点,也可作为投票节点,接收竞选节点发出的投票请求,并根据投票请求生成相应的投票信息(即使对于竞选节点而言,也会接收到其他竞选节点发送的投票请求,此时,该竞选节点也可以看作是投票节点)。从而,生成投票信息的节点而言,本申请实施例还提供一种基于时间的节点选举方法,如图5所示,该方法用于分布式系统中确定leader节点,该方法具体包括以下步骤:
S501,当所有节点中不存在leader节点时,至少两个节点作为投票节点,在时间配置信息所携带的投票时间内,接收竞选节点发送的投票请求。
在本申请实施例中,在未确定出leader节点时,分布式系统内的各节点均可以作为投票节点,以接收竞选节点发送的投票请求。
同样地,所述投票节点也将接收主机发送的时间配置信息,调整该投票节点内部的时钟,配置投票时间和计票时间。
S502,所述投票节点根据所述投票请求,在投票时间内生成投票信息发送至竞选节点,使得所述竞选节点在计票时间内统计所述投票信息的数量,确定leader节点。
在分布式系统中,投票节点将接收至少一个竞选节点发送的投票请求(在实际应用场景下,投票节点通常会接收到多个竞选节点发出的投票请求),而由于最终只能选举出一个leader节点,从而,投票节点将选定一个竞选节点进行投票,也即,投票节点将根据其接收到的投票请求,选定一个竞选节点,并生成针对选定的节点的生成投票信息并发送至选定的节点中。
通过上述步骤,正是由于分布式系统中的各投票节点配置了相同的投票时间内,使得各投票节点可以在相同的投票时间内,选定出竞选节点,并生成相应的投票请求发送至选定的竞选节点中,从而保证了投票过程的同步性,也提升了对节点进行选举的效率。
需要说明的是,当竞选节点向投票节点发送投票请求时,该投票请求中通常会携带该竞选节点的节点信息。这样一来,在投票节点接收了多个投票请求的情况下,投票节点就可以根据投票请求中所携带的节点信息,选定竞选节点。
故在本申请实施例中,生成投票信息发送至竞选节点,具体为:所述投票节点确定接收到的所述投票请求中所携带的节点信息,根据所述节点信息,确定所述竞选节点的节点状态权重,选定节点状态权重最大的竞选节点,并生成针对该竞选节点的投票信息,发送至选定的竞选节点。
其中,所述节点信息,包括但不限于竞选节点的数据更新信息、处理负载 信息、硬件配置信息等反映竞选节点数据处理能力、处理状态的信息。从而,投票节点就可以根据节点信息,确定出不同竞选节点的节点状态权重,用以反映不同竞选节点的综合状态水平。从而,在本申请实施例中,投票节点会选定节点状态权重最高的竞选节点,并生成相应的投票信息发送至该竞选节点。完成投票过程。
以上如图2所示的方法S201~S204,以及如图5所示的方法S501~S502,均是在分布式系统中还不存在leader节点的情况下,各节点根据主机配置的投票时间和计票时间,确定leader节点的过程。而对于分布式系统中已经存在leader节点的情况,本申请实施例还提供一种基于时间的节点选举方法,如图6所示,所述方法用于分布式系统中确定leader节点,具体包括以下步骤:
S601,当所有节点中包含leader节点,且所述leader节点确定自身符合预设标准时,所述leader节点根据时间配置信息中的leader节点的任期,在投票时间内向所有节点发送连任请求。
在本申请实施例中,通过如图2所示的方法S201~S204,以及如图5所示的方法S501~S502,确定出leader节点之后,当该leader的任期即将结束前,就需要进行下一次节点选举,此时,除leader节点之外的其他节点不会发送投票请求,而只有leader节点可以向其他节点发送连任请求。
需要说明的是,由于在实际应用,分布式系统所处理的信息量巨大,就可能会出现leader节点所维护的数据(如:元数据)更新滞后,或者,leader节点的处理负荷不断增加,导致其处理业务的效率下降等情况。从而,在本申请实施例中,当下一次投票时间到来时,当前的leader节点会判断自身的节点状态是否符合预设标准,如果符合,则说明该leader节点的处理负荷、数据更新程度不会影响对指定业务处理的效率,因此,该leader节点才会向其他节点发送连任请求。
其中,所述预设标准,包括但不限于:处理负载标准、数据更新程度等。由于不同节点的硬件配置(处理性能、存储空间等)可能不同,故在本申请实 施例中,各节点的预设标准也可能不相同,那么,各节点会根据其自身的硬件配置生成相应的预设标准。
通常,各节点的预设标准,会以标准值的方式预先设定。如:对于某一节点而言,处理负载标准为:中央处理器(Central Processing Unit,CPU)的使用率不超过80%。也就是说,当CPU的使用了未超过80%时,则可认为该节点符合预设标准。
又如:对于某一节点而言,数据更新程度标准为:数据更新频率超过10min/次(数据更新频率可以反映出数据更新的程度)。也就是说,当节点的数据更新频率超过10min/次时,则可认为该节点符合预设标准。
当然,上述内容仅是本申请实施例提供的预设标准的示例,在实际应用场景下,各节点的预设标准将根据实际应用的需要进行设置,这里并不构成对本申请的限定。
S602,所述leader节点接收其他节点根据所述连任请求生成的投票信息。
接收到连任请求的节点,会根据该连任请求生成对应的投票信息,发送至leader节点中。
S603,所述leader节点在计票时间内,统计接收到的所述投票信息的数量。
S604,所述leader节点根据统计出的所述投票信息的数量确定连任状态,并在成功连任后对指定业务进行处理。
在本申请实施例中,由于在leader节点向其他节点发送连任请求的情况下,分布式系统中没有其他竞选节点,也就是说,各节点只会接收到来自leader节点的连接请求,故leader节点通常会成功连任。
在leader节点成功连任之后,该leader节点会向各节点发送通知消息,通知各节点该leader节点已成功连任,从而,成功连任的leader节点将继续处理指定业务,分布式系统中的其他节点将继续正常处理业务。
在上述如图6所示的方法S601~S604的情况下,本申请实施例另提供一种基于时间的节点选举方法,如图7所示,所述方法用于分布式系统中确定leader 节点,具体包括以下步骤:
S701,当所有节点中存在leader节点时,至少两个节点作为投票节点,在时间配置信息中所携带的投票时间内,接收leader节点发送的连任请求。
S702,所述投票节点根据所述连任请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述leader节点,使得所述leader节点在计票时间内统计所述投票信息的数量确定连任状态,并且,所述投票节点在所述leader节点的任期内只接收所述leader节点发送的投票请求。
通过上述如图6所示的方法S601~S604,以及如图7所示的方法S701~S702,在分布式系统中已经存在leader节点的情况下,当下一次投票时间到来时,分布式系统中的所有节点均会同步进入投票状态,并只由leader节点向其他节点发送连任请求,接收到连任请求的节点会将生成的投票请求发送至leader节点,这样一来,其他节点便不会互相发送投票请求重新确定leader节点,从而有效降低了各节点的处理负荷,也提升了对leader节点的选举效率。并且,任一投票节点在leader节点的任期内,均不会接收其他节点发送的投票请求,这样,就可以保证各投票节点只接收leader节点发出的投票请求。
当然,在实际应用中,分布式系统中的各节点处理大量的业务,leader节点就有可能出现处理负载增加、数据更新滞后等情况,使得该leader节点不符合预设的标准,那么,在这样的情况下,本申请实施例提供一种基于时间的节点选举方法,如图8所示,所述方法用于分布式系统中确定leader节点,具体包括以下步骤:
S801,当所有节点中包含leader节点,且所述leader节点确定自身不符合预设标准时,所述leader节点根据时间配置信息中的leader节点的任期,在其他节点中筛选出符合所述预设标准的节点,作为继承节点。
leader节点确定自身不符合预设标准,就表明该leader节点可能出现处理负责过高,或者数据更新程度过低,在这样的情况下,该leader节点处理指定业务的效率将收到严重影响。也即,当前该leader节点已不适合再处理指定业 务。
从而,在本申请实施例中,当leader节点的任期结束前,所述leader节点将从其他节点中筛选出继承节点。作为本申请实施例中的一种方式,可由leader节点向其他节点发送查询请求,以查询其他节点的节点信息,根据节点信息选定继承节点。作为本申请实施例中的另一种方式,也可以由主机指定该leader节点选定继承节点,也即,进行leader节点的改选,那么,当前的leader节点接收到改选指令后,就会从其他节点中选定一个节点作为该leader节点的继承节点。当然,上述方式并不作为对本申请的限定。
S802,所述leader节点在所述投票时段内,向其他节点发出针对该继承节点的投票请求,使得所述继承节点接收其他节点发送的投票信息,并在计票时间内统计所述投票信息的数量确定为新任leader节点。
在投票时间内,leader节点将向其他节点发送的投票请求中,携带有继承节点的节点标识,也就是说,接收到该投票请求的节点会生成相应的投票信息,并根据继承节点的节点标识,将投票信息发送至该继承节点中。这样一来,各节点的投票信息只发送给继承节点,而不会发送给当前的leader节点。
显然,只有继承节点接收到各节点发送的投票信息,故在计票时间内,继承节点将统计接收到的投票信息,确定为leader节点。并向各节点发送通知消息,以通知各节点,该继承节点已成为新任leader节点。
在上述如图8所示的方法S801~S802的情况下,本申请实施例另提供一种基于时间的节点选举方法,如图9所示,所述方法用于分布式系统中确定leader节点,具体包括以下步骤:
S901,当所有节点中存在leader节点时,至少两个节点作为投票节点,在时间配置信息中携带的投票时间内,接收所述leader节点发送的针对继承节点的投票请求。
S902,所述投票节点根据所述投票请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述继承节点,使得所述继承节点在计票时间内 统计所述投票信息的数量,确定新任leader节点。
同样,对于上述步骤S901~S902,由于leader节点发送的投票请求中,携带有继承节点的节点标识,所以,投票节点会根据投票请求生成相应的投票信息,并根据继承节点的节点标识,将投票信息发送至该继承节点中,而不会发送到其他节点中。这就保证了继承节点可以顺利成为新任的leader节点。
通过以上方法和实例,在分布式系统中不存在leader节点的情况下,分布式系统的主机为各节点配置相同的投票时间和计票时间,使得各节点在投票时间内同步进行投票,并且在计票时间内同步进行计票。这样一来,就不会出现各节点进行投票或计票的时机不确定的情况,从而极大提升了分布式系统中各节点选举leader节点的效率。
并且,在选举出leader节点之后,各节点仍根据周期性的投票时间和计票时间,在下一次投票时间和计票时间到来时,leader节点会判断自身的状态,以生成针对自身的投票请求或者是针对继承节点的投票请求,使得其他节点根据该投票请求生成投票信息发送至对应节点中。这样的方式保证选举出的用于对指定业务进行处理的leader节点,始终处于高性能状态,可提升分布式系统整体对业务处理的效率。
以上为本申请实施例提供的基于时间的节点选举方法,基于同样的思路,本申请实施例还提供一种基于时间的节点选举装置,如图10所示。
在图10中,所述基于时间的节点选举装置包括:配置模块1001和发送模块1002,其中,
所述配置模块1001,用于为所有节点配置相同的投票时间、计票时间以及leader节点的任期。
所述发送模块1002,用于将配置的所述投票时间、计票时间以及leader节点的任期携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点,并使得各节点根据所述leader节点的任期进行周期性节点选举。
在如图10所示的情况下,本申请实施例还提供一种基于时间的节点选举装置,如图11所示,所述装置用于分布式系统中确定leader节点,设置在竞选节点中。
在图11中,所述基于时间的节点选举装置包括:投票请求模块1101、接收模块1102、统计模块1103和确定模块1104,其中,当所有节点中不存在leader节点时,
所述投票请求模块1101,用于在时间配置信息所携带的投票时间内,向所有节点发送投票请求。
所述接收模块1102,用于接收其他节点根据所述投票请求生成的投票信息。
所述统计模块1103,用于在所述时间配置信息所携带的计票时间内,统计各自接收到的投票信息的数量。
所述确定模块1104,用于根据统计出的各自的投票信息的数量确定leader节点,对指定业务进行处理。
在本申请实施例中,所述接收模块1102,还用于在所述计票时间到来时,停止接收所述投票信息。
所述确定模块1104,具体用于当判断统计出的所述投票信息的数量,超过预设的阈值时,将所述竞选节点确定为leader节点。
其中,所述阈值为所有节点数量的二分之一。
本申请实施例还提供一种基于时间的节点选举装置,如图12所示,所述装置用于分布式系统中确定leader节点,设置在投票节点中。
在图12中,所述基于时间的节点选举装置包括:接收模块1201和投票信息模块1202,其中,当所有节点中不包含有leader节点时,
所述接收模块1201,用于在时间配置信息所携带的投票时间内,接收竞选节点发送的投票请求。
所述投票信息模块1202,用于根据所述投票请求,在投票时间内生成投票信息发送至竞选节点,使得所述竞选节点在计票时间内统计所述投票信息的数 量,确定leader节点。
在本申请实施例中,所述投票信息模块1202,具体用于确定接收到的所述投票请求中所携带的节点信息,根据所述节点信息,确定所述竞选节点的节点状态权重,选定节点状态权重最大的竞选节点,并生成针对该竞选节点的投票信息,发送至选定的竞选节点。
本申请实施例还提供一种基于时间的节点选举装置,如图13所示,所述装置用于分布式系统中确定leader节点,设置在leader节点中。
在图13中,所述基于时间的节点选举装置包括:连任请求模块1301、接收模块1302、统计模块1303以及确定模块1304,其中,当所有节点中包含leader节点,且所述leader节点确定自身符合预设标准时,
所述连任请求模块1301,用于根据时间配置信息中的leader节点的任期,在投票时间内向所有节点发送连任请求。
所述接收模块1302,用于接收其他节点根据所述连任请求生成的投票信息。
所述统计模块1303,用于在计票时间内,统计接收到的所述投票信息的数量。
所述确定模块1304,根据统计出的所述投票信息的数量确定连任状态,并在成功连任后对指定业务进行处理。
其中,所述预设标准,包括处理负载标准、数据更新程度中的至少一种。
本申请实施例还提供一种基于时间的节点选举装置,如图14所示,所述装置用于分布式系统中确定leader节点,设置在leader节点中。
在图14中,所述基于时间的节点选举装置包括:筛选模块1401和投票请求模块1402,其中,当所有节点中包含leader节点,且所述leader节点确定自身不符合预设标准时,
所述筛选模块1401,用于根据时间配置信息中的leader节点的任期,在其他节点中筛选出符合所述预设标准的节点,作为继承节点。
所述投票请求模块1402,用于在所述投票时段内,向其他节点发出针对该 继承节点的投票请求,使得所述继承节点接收其他节点发送的投票信息,并在计票时间内统计所述投票信息的数量确定为新任leader节点。
本申请实施例还提供一种基于时间的节点选举装置,如图15所示,所述装置用于分布式系统中确定leader节点,设置在投票节点中。
在图15中,所述基于时间的节点选举装置包括:接收模块1501和投票信息模块1502,其中,当所有节点中包含leader节点时,
所述接收模块1501,用于在时间配置信息中所携带的投票时间内,接收所述leader节点发送的连任请求。
所述投票信息模块1502,用于根据所述连任请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述leader节点,使得所述leader节点在计票时间内统计所述投票信息的数量确定连任状态,并用于在所述leader节点的任期内只接收所述leader节点发送的投票请求。
本申请实施例还提供一种基于时间的节点选举装置,如图16所示,所述装置用于分布式系统中确定leader节点,设置在投票节点中。
在图16中,所述基于时间的节点选举装置包括:接收模块1601和投票信息模块1602,其中,当所有节点中存在leader节点时,
所述接收模块1601,用于在时间配置信息中携带的投票时间内,接收所述leader节点发送的针对继承节点的投票请求。
所述投票信息模块1602,用于根据所述投票请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述继承节点,使得所述继承节点在计票时间内统计所述投票信息的数量,确定新任leader节点。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (20)

  1. 一种基于时间的节点选举方法,其特征在于,所述方法用于分布式系统中确定leader节点,所述方法包括:
    主机为所有节点配置相同的投票时间、计票时间以及leader节点的任期;
    将配置的所述投票时间、计票时间以及leader节点的任期携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票,在所述计票时间内进行计票,并根据计票结果选举出leader节点,并使得各节点根据所述leader节点的任期进行周期性节点选举。
  2. 一种基于时间的节点选举方法,其特征在于,所述方法用于分布式系统中确定leader节点,所述方法包括:
    当所有节点中不存在leader节点时,至少一个节点作为竞选节点,在时间配置信息所携带的投票时间内,向所有节点发送投票请求;
    各竞选节点接收其他节点根据所述投票请求生成的投票信息;
    各竞选节点在所述时间配置信息所携带的计票时间内,统计各自接收到的投票信息的数量;
    各竞选节点根据统计出的各自的投票信息的数量确定leader节点,对指定业务进行处理。
  3. 如权利要求2所述的方法,其特征在于,在所述竞选节点在计票时间内,统计接收到的所述投票信息的数量之前,还包括:
    所述竞选节点在所述计票时间到来时,停止接收所述投票信息。
  4. 如权利要求2所述的方法,其特征在于,各竞选节点根据统计出的各自的投票信息的数量确定leader节点,具体包括:
    当所述竞选节点判断统计出的所述投票信息的数量,超过预设的阈值时,该竞选节点将自身确定为leader节点;
    其中,所述阈值为所有节点数量的二分之一。
  5. 一种基于时间的节点选举方法,其特征在于,所述方法用于分布式系 统中确定leader节点,所述方法包括:
    当所有节点中不存在leader节点时,至少两个节点作为投票节点,在时间配置信息所携带的投票时间内,接收竞选节点发送的投票请求;
    所述投票节点根据所述投票请求,在投票时间内生成投票信息发送至竞选节点,使得所述竞选节点在计票时间内统计所述投票信息的数量,确定leader节点。
  6. 如权利要求5所述的方法,其特征在于,生成投票信息发送至竞选节点,具体包括:
    所述投票节点确定接收到的所述投票请求中所携带的节点信息;
    根据所述节点信息,确定所述竞选节点的节点状态权重;
    选定节点状态权重最大的竞选节点,并生成针对该竞选节点的投票信息,发送至选定的竞选节点。
  7. 一种基于时间的节点选举方法,其特征在于,所述方法用于分布式系统中确定leader节点,所述方法包括:
    当所有节点中存在leader节点,且所述leader节点确定自身符合预设标准时,所述leader节点根据时间配置信息中的leader节点的任期,在投票时间内向所有节点发送连任请求;
    所述leader节点接收其他节点根据所述连任请求生成的投票信息;
    所述leader节点在计票时间内,统计接收到的所述投票信息的数量;
    所述leader节点根据统计出的所述投票信息的数量确定连任状态,并在成功连任后对指定业务进行处理;
    其中,所述预设标准,包括处理负载标准、数据更新程度中的至少一种。
  8. 一种基于时间的节点选举方法,其特征在于,所述方法用于分布式系统中确定leader节点,所述方法包括:
    当所有节点中存在leader节点,且所述leader节点确定自身不符合预设标准时,所述leader节点根据时间配置信息中的leader节点的任期,在其他节点 中筛选出符合所述预设标准的节点,作为继承节点;
    所述leader节点在所述投票时段内,向其他节点发出针对该继承节点的投票请求,使得所述继承节点接收其他节点发送的投票信息,并在计票时间内统计所述投票信息的数量确定为新任leader节点。
  9. 一种基于时间的节点选举方法,其特征在于,包括:
    当所有节点中存在leader节点时,至少两个节点作为投票节点,在时间配置信息中所携带的投票时间内,接收所述leader节点发送的连任请求;
    所述投票节点根据所述连任请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述leader节点,使得所述leader节点在计票时间内统计所述投票信息的数量确定连任状态;
    并且,所述投票节点在所述leader节点的任期内只接收所述leader节点的投票请求。
  10. 一种基于时间的节点选举方法,其特征在于,所述方法用于分布式系统中确定leader节点,所述方法包括:
    当所有节点中存在leader节点时,至少两个节点作为投票节点,在时间配置信息中携带的投票时间内,接收所述leader节点发送的针对继承节点的投票请求;
    所述投票节点根据所述投票请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述继承节点,使得所述继承节点在计票时间内统计所述投票信息的数量,确定新任leader节点。
  11. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,所述装置包括:
    配置模块,用于为所有节点配置相同的投票时间、计票时间以及leader节点的任期;
    发送模块,用于将配置的所述投票时间、计票时间以及leader节点的任期携带在时间配置信息中发送至各节点,使得各节点在所述投票时间内进行投票, 在所述计票时间内进行计票,根据计票结果选举出leader节点,并使得各节点根据所述leader节点的任期进行周期性节点选举。
  12. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,设置在竞选节点中,且当所有节点中不存在leader节点时,所述装置包括:
    投票请求模块,用于在时间配置信息所携带的投票时间内,向所有节点发送投票请求;
    接收模块,用于接收其他节点根据所述投票请求生成的投票信息;
    统计模块,用于在所述时间配置信息所携带的计票时间内,统计各自接收到的投票信息的数量;
    确定模块,用于根据统计出的各自的投票信息的数量确定leader节点,对指定业务进行处理。
  13. 如权利要求12所述的装置,其特征在于,所述接收模块,还用于在所述计票时间到来时,停止接收所述投票信息。
  14. 如权利要求12所述的装置,其特征在于,所述确定模块,具体用于当判断统计出的所述投票信息的数量,超过预设的阈值时,将所述竞选节点确定为leader节点;
    其中,所述阈值为所有节点数量的二分之一。
  15. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,设置在投票节点中,且当所有节点中不存在leader节点时,所述装置包括:
    接收模块,用于在时间配置信息所携带的投票时间内,接收竞选节点发送的投票请求;
    投票信息模块,用于根据所述投票请求,在投票时间内生成投票信息发送至竞选节点,使得所述竞选节点在计票时间内统计所述投票信息的数量,确定leader节点。
  16. 如权利要求15所述的装置,其特征在于,所述投票信息模块,具体用于确定接收到的所述投票请求中所携带的节点信息,根据所述节点信息,确定所述竞选节点的节点状态权重,选定节点状态权重最大的竞选节点,并生成针对该竞选节点的投票信息,发送至选定的竞选节点。
  17. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,设置在leader节点中,当所有节点中存在leader节点,且所述leader节点确定自身符合预设标准时,所述装置包括:
    连任请求模块,用于根据时间配置信息中的leader节点的任期,在投票时间内向所有节点发送连任请求;
    接收模块,用于接收其他节点根据所述连任请求生成的投票信息;
    统计模块,用于在计票时间内,统计接收到的所述投票信息的数量;
    确定模块,用于根据统计出的所述投票信息的数量确定连任状态,并在成功连任后对指定业务进行处理;
    其中,所述预设标准,包括处理负载标准、数据更新程度中的至少一种。
  18. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,设置在leader节点中,当所有节点中存在leader节点,且所述leader节点确定自身不符合预设标准时,所述装置包括:
    筛选模块,用于根据时间配置信息中的leader节点的任期,在其他节点中筛选出符合所述预设标准的节点,作为继承节点;
    投票请求模块,用于在所述投票时段内,向其他节点发出针对该继承节点的投票请求,使得所述继承节点接收其他节点发送的投票信息,并在计票时间内统计所述投票信息的数量确定为新任leader节点。
  19. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,设置在投票节点中,当所有节点中存在leader节点时,所述装置包括:
    接收模块,用于在时间配置信息中所携带的投票时间内,接收所述leader 节点发送的连任请求;
    投票信息模块,用于根据所述连任请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述leader节点,使得所述leader节点在计票时间内统计所述投票信息的数量确定连任状态,并用于在所述leader节点的任期内只接收所述leader节点的投票请求。
  20. 一种基于时间的节点选举装置,其特征在于,所述装置用于分布式系统中确定leader节点,设置在投票节点中,当所有节点中存在leader节点时,所述装置包括:
    接收模块,用于在时间配置信息中携带的投票时间内,接收所述leader节点发送的针对继承节点的投票请求;
    投票信息模块,用于根据所述投票请求,在时间配置信息中所携带的投票时间内,生成投票信息发送至所述继承节点,使得所述继承节点在计票时间内统计所述投票信息的数量,确定新任leader节点。
PCT/CN2016/076414 2015-04-02 2016-03-15 一种基于时间的节点选举方法及装置 WO2016155496A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
KR1020177031627A KR102139410B1 (ko) 2015-04-02 2016-03-15 시간 기반 노드 선출 방법 및 장치
SG11201708022YA SG11201708022YA (en) 2015-04-02 2016-03-15 Time-based node election method and apparatus
EP16771251.2A EP3279794B1 (en) 2015-04-02 2016-03-15 Time-based node election method and apparatus
JP2017551678A JP6731201B2 (ja) 2015-04-02 2016-03-15 時間ベースのノード選出方法及び装置
US15/719,125 US10534634B2 (en) 2015-04-02 2017-09-28 Efficient, time-based leader node election in a distributed computing system
US16/737,262 US10802869B2 (en) 2015-04-02 2020-01-08 Efficient, time-based leader node election in a distributed computing system
US17/068,576 US11106489B2 (en) 2015-04-02 2020-10-12 Efficient, time-based leader node election in a distributed computing system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510155909.9A CN106155780B (zh) 2015-04-02 2015-04-02 一种基于时间的节点选举方法及装置
CN201510155909.9 2015-04-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/719,125 Continuation US10534634B2 (en) 2015-04-02 2017-09-28 Efficient, time-based leader node election in a distributed computing system

Publications (1)

Publication Number Publication Date
WO2016155496A1 true WO2016155496A1 (zh) 2016-10-06

Family

ID=57005448

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076414 WO2016155496A1 (zh) 2015-04-02 2016-03-15 一种基于时间的节点选举方法及装置

Country Status (7)

Country Link
US (3) US10534634B2 (zh)
EP (1) EP3279794B1 (zh)
JP (1) JP6731201B2 (zh)
KR (1) KR102139410B1 (zh)
CN (1) CN106155780B (zh)
SG (1) SG11201708022YA (zh)
WO (1) WO2016155496A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200394183A1 (en) * 2019-06-12 2020-12-17 Subramanya R. Jois System and method of executing, confirming and storing a transaction in a serverless decentralized node network

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10542049B2 (en) 2014-05-09 2020-01-21 Nutanix, Inc. Mechanism for providing external access to a secured networked virtualization environment
CN106155780B (zh) 2015-04-02 2020-01-31 阿里巴巴集团控股有限公司 一种基于时间的节点选举方法及装置
US11218418B2 (en) 2016-05-20 2022-01-04 Nutanix, Inc. Scalable leadership election in a multi-processing computing environment
US10310762B1 (en) * 2016-08-30 2019-06-04 EMC IP Holding Company LLC Lease-based leader designation for multiple processes accessing storage resources of a storage system
CN108123987A (zh) * 2016-11-30 2018-06-05 华为技术有限公司 从云计算系统中确定主调度器的方法及装置
CN106952207A (zh) * 2017-03-10 2017-07-14 深圳市博信诺达经贸咨询有限公司 监控云平台分布式系统的选举方法及系统
CN107248064A (zh) * 2017-06-07 2017-10-13 福建榕基软件股份有限公司 一种查控申请方法及系统
CN107729359A (zh) * 2017-09-01 2018-02-23 广州市百果园信息技术有限公司 统计投票数据的方法及装置
US10911433B1 (en) * 2017-09-27 2021-02-02 Amazon Technologies, Inc. Network traffic distribution using certificate scanning in agent-based architecture
WO2019061384A1 (zh) * 2017-09-30 2019-04-04 麦格创科技(深圳)有限公司 分布式爬虫系统中任务管理器的选举方法及系统
JP6965832B2 (ja) * 2018-05-29 2021-11-10 日本電信電話株式会社 投票システム、投票中継サーバ、クライアント端末、投票方法、広告配信システム、及びプログラム
CN108829497A (zh) * 2018-05-31 2018-11-16 阿里巴巴集团控股有限公司 事务因果序的校正方法及装置、电子设备
CN113672938B (zh) * 2018-06-06 2023-08-29 北京八分量信息科技有限公司 一种区块链节点可信状态确定方法
US11194680B2 (en) 2018-07-20 2021-12-07 Nutanix, Inc. Two node clusters recovery on a failure
US11770447B2 (en) 2018-10-31 2023-09-26 Nutanix, Inc. Managing high-availability file servers
US11327854B2 (en) 2018-11-15 2022-05-10 Walmart Apollo, Llc System and method for an adaptive election in semi-distributed environments
CN111327447B (zh) * 2018-12-17 2021-09-14 华为技术有限公司 一种分布式系统、仲裁方法、节点设备及存储介质
US11503036B2 (en) * 2019-03-13 2022-11-15 Nec Corporation Methods of electing leader nodes in a blockchain network using a role-based consensus protocol
US11748029B2 (en) * 2019-07-26 2023-09-05 Salesforce, Inc. Protecting writes to shared storage in a distributed search system
CN110618863A (zh) * 2019-09-18 2019-12-27 神州数码融信软件有限公司 一种基于Raft算法的作业调度方法
EP4046333A1 (en) * 2019-10-15 2022-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Method for dynamic leader selection for distributed machine learning
US11768809B2 (en) 2020-05-08 2023-09-26 Nutanix, Inc. Managing incremental snapshots for fast leader node bring-up
CN113742417B (zh) * 2020-05-29 2024-06-07 同方威视技术股份有限公司 多级分布式共识方法及系统、电子设备及计算机可读介质
US11671488B1 (en) * 2022-02-24 2023-06-06 Bank Of America Corporation Domain-based Raft consensus selection of leader nodes in distributed data services
CN114866554B (zh) * 2022-05-20 2023-07-07 东风商用车有限公司 一种免选举分布式协议的方法、装置、设备及存储介质
CN115794478B (zh) * 2023-02-06 2023-06-23 天翼云科技有限公司 系统配置方法、装置、电子设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090274050A1 (en) * 2006-10-30 2009-11-05 Huawei Technologies Co., Ltd. Load control of ue mbms measurement reporting
CN102682572A (zh) * 2012-03-27 2012-09-19 南京邮电大学 一种基于无线传感器网络定位的人员智能看护方法

Family Cites Families (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6108644A (en) * 1998-02-19 2000-08-22 At&T Corp. System and method for electronic transactions
US6321086B1 (en) * 1999-06-07 2001-11-20 Motorola, Inc. Comparator and methods for voting therewith
US7139790B1 (en) * 1999-08-17 2006-11-21 Microsoft Corporation Weak leader election
US20030046144A1 (en) * 2001-08-28 2003-03-06 International Business Machines Corporation System and method for anonymous message forwarding and anonymous voting
JP2004165976A (ja) * 2002-11-13 2004-06-10 Japan Information Technology Co Ltd 時限暗号化復号化システム、時限暗号化復号化方法および時限暗号化復号化プログラム
US7296269B2 (en) 2003-04-22 2007-11-13 Lucent Technologies Inc. Balancing loads among computing nodes where no task distributor servers all nodes and at least one node is served by two or more task distributors
WO2005006732A1 (ja) * 2003-07-11 2005-01-20 Yoshiaki Takida インターネット端末型次世代ファクシミリ装置
US20050132154A1 (en) * 2003-10-03 2005-06-16 International Business Machines Corporation Reliable leader election in storage area network
US7334154B2 (en) 2004-06-18 2008-02-19 Microsoft Corporation Efficient changing of replica sets in distributed fault-tolerant computing system
US20080288659A1 (en) * 2006-11-09 2008-11-20 Microsoft Corporation Maintaining consistency within a federation infrastructure
RU2312396C2 (ru) * 2005-03-24 2007-12-10 Федеральный центр информатизации при Центральной избирательной комиссии Российской Федерации Способ подготовки и проведения голосования с помощью автоматизированной системы
JP2007255977A (ja) * 2006-03-22 2007-10-04 Nissan Motor Co Ltd 物体検出方法および物体検出装置
US9596301B2 (en) * 2006-09-18 2017-03-14 Hewlett Packard Enterprise Development Lp Distributed-leader-election service for a distributed computer system
US20080071878A1 (en) 2006-09-18 2008-03-20 Reuter James M Method and system for strong-leader election in a distributed computer system
US8494436B2 (en) * 2006-11-16 2013-07-23 Watertown Software, Inc. System and method for algorithmic selection of a consensus from a plurality of ideas
CN101252603B (zh) * 2008-04-11 2011-03-30 清华大学 基于存储区域网络san的集群分布式锁管理方法
US8230253B2 (en) * 2008-07-21 2012-07-24 International Business Machines Corporation Byzantine fault tolerant dynamic quorum using a trusted platform module
CN101771488B (zh) 2009-01-05 2014-06-04 华为技术有限公司 提高多业务传送网可靠性的方法、系统及设备
FR2946212B1 (fr) * 2009-05-29 2012-04-27 Taztag Dispositif et procede d'interfacage d'au moins un terminal de stockage et de tranmission de donnees avec au moins un support de transmission de donnees
GB2474074A (en) * 2009-10-05 2011-04-06 Your View Ltd Electronic voting
US8630894B2 (en) * 2011-01-27 2014-01-14 Leroy Robinson Method and system for searching for, and monitoring assessment of, original content creators and the original content thereof
CN102999529B (zh) * 2011-09-16 2015-09-16 腾讯科技(深圳)有限公司 平台间信息共享系统及方法
US8595546B2 (en) 2011-10-28 2013-11-26 Zettaset, Inc. Split brain resistant failover in high availability clusters
US9537973B2 (en) 2012-11-01 2017-01-03 Microsoft Technology Licensing, Llc CDN load balancing in the cloud
US9185003B1 (en) * 2013-05-02 2015-11-10 Amazon Technologies, Inc. Distributed clock network with time synchronization and activity tracing between nodes
US9261898B1 (en) * 2013-05-02 2016-02-16 Amazon Technologies, Inc. Activity tracing using distributed clock network
US10284247B2 (en) * 2013-06-10 2019-05-07 Nxp B.V. System and method for bit processing in a central network component
JP6091376B2 (ja) 2013-08-12 2017-03-08 日本電信電話株式会社 クラスタシステムおよびSplit−BrainSyndrome検出方法
CN103401947A (zh) 2013-08-20 2013-11-20 曙光信息产业(北京)有限公司 多个服务器的任务分配方法和装置
CN103634375B (zh) * 2013-11-07 2017-01-11 华为技术有限公司 扩容集群节点的方法、装置及设备
US9230104B2 (en) * 2014-05-09 2016-01-05 Cisco Technology, Inc. Distributed voting mechanism for attack detection
CN104301971A (zh) * 2014-10-13 2015-01-21 东南大学 一种适用于移动ad hoc网络的节能节点选举方法
CN106155780B (zh) 2015-04-02 2020-01-31 阿里巴巴集团控股有限公司 一种基于时间的节点选举方法及装置
CN104933132B (zh) * 2015-06-12 2019-11-19 深圳巨杉数据库软件有限公司 基于操作序列号的分布式数据库有权重选举方法
US11055363B2 (en) * 2016-07-24 2021-07-06 Saber Salehkaleybar Method for distributed multi-choice voting/ranking
CN106412124B (zh) 2016-12-01 2019-10-29 广州高能计算机科技有限公司 一种并序化云服务平台任务分配系统及任务分配方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090274050A1 (en) * 2006-10-30 2009-11-05 Huawei Technologies Co., Ltd. Load control of ue mbms measurement reporting
CN102682572A (zh) * 2012-03-27 2012-09-19 南京邮电大学 一种基于无线传感器网络定位的人员智能看护方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSZHOUWEI: "The Raft Consensus Algorithm", 4 August 2014 (2014-08-04), pages 1, XP055491159, Retrieved from the Internet <URL:blog.csdn.net/cszhouwei/article/details/38374603> *
See also references of EP3279794A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200394183A1 (en) * 2019-06-12 2020-12-17 Subramanya R. Jois System and method of executing, confirming and storing a transaction in a serverless decentralized node network

Also Published As

Publication number Publication date
CN106155780B (zh) 2020-01-31
EP3279794B1 (en) 2022-01-26
EP3279794A1 (en) 2018-02-07
KR102139410B1 (ko) 2020-07-30
KR20170134576A (ko) 2017-12-06
US20180018198A1 (en) 2018-01-18
JP6731201B2 (ja) 2020-07-29
JP2018512678A (ja) 2018-05-17
US10534634B2 (en) 2020-01-14
US20200142729A1 (en) 2020-05-07
US11106489B2 (en) 2021-08-31
US20210026682A1 (en) 2021-01-28
CN106155780A (zh) 2016-11-23
US10802869B2 (en) 2020-10-13
SG11201708022YA (en) 2017-10-30
EP3279794A4 (en) 2018-12-19

Similar Documents

Publication Publication Date Title
WO2016155496A1 (zh) 一种基于时间的节点选举方法及装置
TWI755417B (zh) 計算任務分配方法、流計算任務的執行方法、控制伺服器、流計算中心伺服器集群、流計算系統及異地多活系統
US20190324819A1 (en) Distributed-system task assignment method and apparatus
CN106406983B (zh) 一种集群中的任务调度方法及装置
KR101959153B1 (ko) 데이터베이스에서의 계좌와 관련된 거래 요청의 효율적인 처리를 위한 시스템
WO2020134609A1 (zh) 数据存储的方法及装置
CN109995669B (zh) 分布式限流方法、装置、设备及可读存储介质
CN110058940B (zh) 一种多线程环境下的数据处理方法及装置
CN106911592A (zh) 一种自适应资源分配方法及装置
WO2015085969A1 (zh) 推荐算法优化方法、装置及系统
CN111782692B (zh) 一种频率控制方法及装置
CN106130960B (zh) 盗号行为的判断系统、负载调度方法和装置
CN110599148B (zh) 集群数据处理方法、装置、计算机集群及可读存储介质
CN108132837A (zh) 一种分布式集群调度系统及方法
CN111552701B (zh) 确定分布式集群中数据一致性的方法及分布式数据系统
CN117667963A (zh) 一种分布式集群系统中生成全局唯一递增订单流水号的方法
US20160253391A1 (en) Data communication in a distributed data grid
CN116302406A (zh) 流量控制与数据复制方法、节点、系统及存储介质
US11561777B2 (en) System and method for intelligent update flow across inter and intra update dependencies
CN102811154B (zh) 资源获取方法与网络服务器系统
CN112966051A (zh) 一种基于分布式的数据交换系统及方法
JP2007206913A (ja) データベースアクセスシステム、アプリケーションサーバノード、データベースアクセス方法及びプログラム
Shen Distributed storage system model design in internet of things based on hash distribution
US12047305B2 (en) Using multi-phase constraint programming to assign resource guarantees of consumers to hosts
CN115168366B (zh) 数据处理方法、装置、电子设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16771251

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 11201708022Y

Country of ref document: SG

ENP Entry into the national phase

Ref document number: 2017551678

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20177031627

Country of ref document: KR

Kind code of ref document: A