CN107294781B - Method and system for cluster configuration node failover - Google Patents

Method and system for cluster configuration node failover Download PDF

Info

Publication number
CN107294781B
CN107294781B CN201710522134.3A CN201710522134A CN107294781B CN 107294781 B CN107294781 B CN 107294781B CN 201710522134 A CN201710522134 A CN 201710522134A CN 107294781 B CN107294781 B CN 107294781B
Authority
CN
China
Prior art keywords
node
cluster
configuration node
configuration
nodes
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710522134.3A
Other languages
Chinese (zh)
Other versions
CN107294781A (en
Inventor
崔波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710522134.3A priority Critical patent/CN107294781B/en
Publication of CN107294781A publication Critical patent/CN107294781A/en
Application granted granted Critical
Publication of CN107294781B publication Critical patent/CN107294781B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a method for cluster configuration node failover, which comprises the steps that when an original configuration node leaves a cluster, the original configuration node selects an online node meeting preset conditions from a cluster information database as a candidate configuration node, and the cluster information database is used for storing the state of each node in the cluster before the original configuration node leaves the cluster; initializing the candidate configuration nodes to become configuration nodes, and managing each node of the cluster; according to the method disclosed by the invention, when the configuration node leaves the cluster, the original configuration node can directly select the online node meeting the preset condition from the database as the candidate configuration node, and the candidate configuration node is not required to be selected in a complex election mode, so that the step of selecting the configuration node is simplified, and the time for replacing the configuration node is reduced; the invention also discloses a cluster configuration node fault transfer system which also has the beneficial effects.

Description

Method and system for cluster configuration node failover
Technical Field
The invention relates to the field of server storage, in particular to a method and a system for cluster configuration node failover.
Background
Currently, as the demand of each industry for data processing capability is increasing, the real-time performance of data processing is also increasing. At present, a multi-node cluster system is usually selected to process data, and each node of the multi-node cluster system is mutually matched to provide service for a user as a whole. In a multi-node cluster system, a configuration node is usually provided to manage the whole cluster, for example, add other nodes to the cluster, manage a storage back-end disk, and so on. In the whole cluster, the configuration nodes have the authority to operate the resources in the cluster, and each node can only operate the running state of the node. When the configuration node needs to leave the cluster for some reason, such as failure or offline maintenance, another node needs to be selected as a new configuration node to manage the whole cluster.
In the prior art, when a configuration node needs to be replaced, a new configuration node needs to be selected in a competitive manner, for example, an ID number of each node currently on line is obtained, then the size of each ID number is compared, a node with the smallest ID number is selected as a candidate configuration node, and finally, the candidate configuration node is initialized to become the new configuration node.
However, in the prior art, it often takes a certain time to exchange configuration nodes, which results in that the real-time performance of the whole cluster is not high when processing data, and a stuck phenomenon often occurs.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method for failover of a cluster configuration node, which can effectively reduce the time for replacing the configuration node; another objective of the present invention is to provide a system for cluster configuration node failover, which can increase the real-time performance of a cluster in processing data.
In order to solve the above technical problem, the present invention provides a method for cluster configuration node failover, where the method includes:
when an original configuration node leaves a cluster, the original configuration node selects an online node meeting a preset condition from a cluster information database as a candidate configuration node, wherein the cluster information database is used for storing the state of each node in the cluster in real time;
the candidate configuration nodes are initialized to become configuration nodes, and each node of the cluster is managed.
Optionally, the selecting, by the original configuration node, an online node that meets a preset condition from the cluster information database as a candidate configuration node includes:
the original configuration nodes inquire the cache information of the cluster information database one by one;
and the original configuration node takes the inquired first online node as a candidate configuration node.
Optionally, the method further comprises:
when the original configuration node leaves the cluster, the original configuration node sends leaving information to each node of the cluster;
after the candidate configuration node is initialized to become a configuration node, the method further comprises:
and the configuration node sends initialization completion information to each node of the cluster.
Optionally, the original configuration node notifies all node configuration nodes in the cluster of the cluster leaving cluster event by the event management module, and the method further includes:
and the original configuration node gives up the authority of managing the cluster.
Optionally, after the candidate configuration node is initialized to become a configuration node, the method further includes:
and the configuration node rejoins the nodes to be joined into the cluster.
The invention also provides a system for cluster configuration node failover, which comprises a cluster and a cluster information database, wherein the cluster comprises a plurality of nodes, the original configuration node is a node selected from the plurality of nodes and is used for managing the cluster, and the cluster information database is used for storing the state of each node in the cluster in real time;
when the original configuration node leaves the cluster, the original configuration node is used for selecting an online node meeting a preset condition from the cluster information database as a candidate configuration node;
the candidate configuration nodes are configured to initialize to become configuration nodes and manage the nodes of the cluster.
Optionally, the original configuration node is specifically configured to:
inquiring the cache information of the cluster information database one by one;
and taking the inquired first online node as a candidate configuration node.
Optionally, the original configuration node is further configured to:
when the original configuration node leaves the cluster, the original configuration node is used for sending leaving information to each node of the cluster;
after the candidate configuration node initializes to become a configuration node, the configuration node is further configured to:
and sending initialization completion information to each node of the cluster.
Optionally, the original configuration node is further configured to:
and after the original configuration node sends the leaving information to each node of the cluster, giving up the authority of managing the cluster.
Optionally, the configuration node is further configured to:
and adding the nodes to be added into the cluster again.
According to the cluster configuration node fault transfer method provided by the invention, when the configuration node leaves the cluster, the original configuration node directly selects the online node meeting the preset condition from the database as the candidate configuration node instead of selecting the candidate configuration node in a complex election mode, so that the step of selecting the stowage node is simplified, and the time for replacing the configuration node is reduced. The invention also provides a system for cluster configuration node failover, which also has the beneficial effects and is not repeated herein.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a first method for failover of a cluster configuration node according to an embodiment of the present invention;
fig. 2 is a flowchart of a second cluster configuration node failover method according to an embodiment of the present invention;
fig. 3 is a block diagram of a cluster configuration node failover system according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a method for cluster configuration node failover. In the prior art, when a configuration node needs to be replaced, a new configuration node needs to be selected in a competitive manner, for example, an ID number of each node currently on line is obtained, then the size of each ID number is compared, a node with the smallest ID number is selected as a candidate configuration node, and finally, the candidate configuration node is initialized to become the new configuration node. The above-mentioned process from the failure of the original configuration node to the final selection of the new configuration node requires a lot of steps, which also takes a lot of time. When a new configuration node is elected, the service being executed by the whole cluster generally needs to be interrupted, which results in that the real-time performance of the whole cluster is not high when the data is processed, and the phenomenon of blocking often occurs.
When the configuration node leaves the cluster, the original configuration node directly selects the online node meeting the preset condition from the database as the candidate configuration node instead of selecting the candidate configuration node in a complex election mode, so that the step of selecting the assignment node is simplified, and the time for replacing the configuration node is reduced. The process of selecting the online nodes meeting the preset conditions from the database is to read the state of each node in the current cluster and select the online nodes meeting the preset conditions from the read nodes. While reading the state of each node in the current cluster is equivalent to reading a static file from the database, this process is very fast and consumes substantially no resources of the entire cluster.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a first cluster configuration node failover method according to an embodiment of the present invention, where the method includes:
s101: and when the original configuration node leaves the cluster, the original configuration node selects an online node meeting the preset condition from the cluster information database as a candidate configuration node.
In this step, the cluster is used to provide data processing service for the user, where the cluster includes a plurality of nodes, and the original configuration node is a node selected from the plurality of nodes and is used as a configuration node for managing the cluster. In the whole cluster, only the configuration node has the authority to operate the resources of the whole cluster, for example, other nodes are added into the cluster, and the management of a storage back-end disk is performed. While the remaining nodes in the cluster can only change the state of the node itself, e.g., online or offline, etc.
The cluster information database is used for storing the state of each node in the cluster before the original configuration node leaves the cluster, wherein the state of each node is that each node sends the current state of each node to the cluster information database through a respective synchronization module. The state of each node includes an online status of each node, and may further include an index number in a cluster of each node, an id of the node in the cluster, and the like, which are not specifically limited herein. If only the online condition of each node is stored in the cluster information database, each corresponding node only needs to send the online condition of the node to the cluster information database when the node is online or offline; if the cluster information database stores index numbers of the clusters of the nodes, ids of the nodes in the clusters, and the like in addition to the online condition of each node, it is correspondingly required that each node sends its own state value to the cluster information database through the synchronization module in real time.
In this step, since the cluster information database is used for storing the states of the nodes in the cluster before the original configuration node leaves the cluster, it means that when the original configuration node selects a node from the cluster information database, the cluster information database is equivalent to having obtained the states of the nodes in advance, and it is not necessary to obtain the states of the nodes again when the configuration node needs to be replaced, as in the prior art.
In the invention, in order to ensure the normal operation of the whole cluster, the selected candidate configuration nodes are at least on-line nodes, so that the nodes can be ensured to fulfill the task of configuring the nodes as soon as possible, thereby ensuring the smooth operation service of the whole cluster.
In this step, a detailed process of how to select an online node meeting a preset condition from the cluster information database as a candidate configuration node will be described in detail in the following embodiments, and will not be described herein again.
S102: the candidate configuration nodes are initialized to become configuration nodes, and each node of the cluster is managed.
In this step, the initialization process is equivalent to a process of acquiring the authority of the configuration node, and after the candidate configuration node is initialized, the process is equivalent to acquiring the authority of the configuration node, and at this time, the configuration node can perform a management task that the configuration node should perform in the cluster to manage the cluster. The specific management task is described in detail in S101, and is not described herein again.
According to the cluster configuration node fault transfer method provided by the embodiment of the invention, when the configuration node leaves the cluster, the original configuration node directly selects the online node meeting the preset condition from the database as the candidate configuration node instead of selecting the candidate configuration node in a complex election mode, so that the step of selecting the stowage node is simplified, and the time for replacing the configuration node is reduced.
In the present invention, there are many ways to select online nodes meeting preset conditions from the cluster information database as candidate configuration nodes, which will be described in detail in the following embodiments and added with some technical features.
Referring to fig. 2, fig. 2 is a flowchart of a second cluster configuration node failover method according to an embodiment of the present invention, where the method includes:
s201: when the original configuration node leaves the cluster, all the online nodes in the cluster receive the event information of the configuration node leaving the cluster.
In this step, the original configuration node sends the leaving information to each node in the cluster through a synchronization module arranged in the original configuration node, after each node in the cluster receives the leaving information, it means that the configuration node needs to be replaced at this time, and the real cluster is managed without the configuration node in a time period of replacing the configuration node, and at this time, in order to prevent the service processed by the whole cluster from being wrong, the service executed by each node is usually interrupted.
In the embodiment of the present invention, usually, when each node in a cluster needs to leave the whole cluster, a synchronization module arranged in each node sends leaving information to each node in the cluster, so when a configuration node sends leaving information to the whole cluster, the configuration node also sends the leaving information to itself, when receiving the leaving information, the configuration node usually first determines whether the leaving information is sent by itself, and if so, executes the subsequent steps; and if not, the driving configuration node permission enables the node sending the leaving information to leave the cluster.
S202: and the original configuration node gives up the authority of managing the cluster.
In this step, the original configuration node is required to give up the authority to manage the cluster. In the embodiment of the present invention, the original configuration node may also be added to the cluster again as a common node in the subsequent steps, and if the node has the authority to manage the cluster, the whole cluster is equivalent to two configuration nodes, and a split brain situation is likely to occur at this time, which may cause great damage to the whole cluster.
In the usual case, the rest of the nodes in the cluster have the authority to contend for the authority to manage the cluster only after the original configuration node relinquishes the authority to manage the cluster.
S203: and the original configuration nodes inquire the cache information of the cluster information database one by one.
In this step, the state of each node in the cluster is stored in each cache information in the cluster information database, and more specifically, the state of each node is the cache information stored in the cluster information database in a txt format static file.
S204: and the original configuration node takes the inquired first online node as a candidate configuration node.
In this step, the first online node is determined according to the query sequence of the original configuration node. When the original configuration node queries the cache information of the cluster information database, all data cannot be obtained at the same time, the cache information of the cluster information database is generally queried one by one according to a certain sequence, which is similar to a situation when people read books, and only the configuration node is very fast in obtaining the state of each node in the cluster.
Of course, in addition to using the first online node as the candidate configuration node, other online nodes may be selected as the candidate configuration nodes according to the query sequence, which is not specifically limited herein. In addition to determining the candidate configuration nodes only according to the query sequence, other conditions may be further added, for example, an online node whose queried first load state value is smaller than a preset value is used as a candidate configuration node, and since the workload of managing the service of the whole cluster is usually large, if a node with a high load state value is selected as a configuration node, a fault is easily caused. Accordingly, the load status values of the respective nodes in the cluster should be stored in the cluster information database. Of course, other conditions may be added in addition to the above additional conditions, and are not particularly limited herein.
In this step, compared with the prior art, the step of comparing the parameters of each node can be further omitted when the configuration node is replaced, or the parameters of each node are only compared with a fixed parameter, so that the step of selecting candidate configuration nodes is further simplified, and the time for replacing the configuration node is reduced.
S205: the candidate configuration nodes are initialized to become configuration nodes, and each node of the cluster is managed.
In this step, the initialization process is equivalent to a process of acquiring the authority of the configuration node, and the details are described in detail in the above embodiment S102, and will not be described herein.
S206: and the configuration node sends the initialization completion information to each node of the cluster.
In this step, the configuration node sends initialization completion information to each node through a synchronization module arranged in the configuration node, and after each node in the cluster receives the initialization completion information, the initialization is completed, a new node can manage the whole cluster, and at this time, each node can continue interrupted services.
S207: and the configuration node rejoins the nodes to be joined into the cluster.
In the embodiment of the present invention, there are many reasons for the original configuration node to leave the cluster, for example, the original configuration node fails, and may also be the reason for the original configuration node to need maintenance, and the like, and other nodes in the cluster may also have similar reasons so that the original configuration node needs to leave the cluster for a short time. And when the node is maintained, the node can rejoin the cluster to continue to execute the service.
In this step, immediately after the configuration node is replaced, the configuration node may further add the node to be added to the cluster again by managing the authority of the whole cluster, so that the whole cluster may process the service faster.
The method for cluster configuration node failover provided by the embodiment of the invention can inform the whole cluster of temporarily setting the service when the configuration node is replaced, so as to ensure that no obvious error occurs during service operation; the embodiment of the invention further enables the original configuration node to give up the authority of managing the cluster, so as to ensure that the split brain condition can not occur when the node is added into the cluster again in the follow-up process; the embodiment of the invention can further omit the step of comparing the parameters of each node when the configuration node is replaced, thereby reducing the time for replacing the configuration node; the embodiment of the invention can also rejoin the nodes to be joined into the cluster after the configuration nodes are just replaced, so that the whole cluster can process the service more quickly.
In the following, a cluster configuration node failover system provided in an embodiment of the present invention is introduced, and the cluster configuration node failover system described below and the cluster configuration node failover method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a cluster configuration node failover system according to an embodiment of the present invention, where the system includes a cluster 100 and a cluster information database 200, where the cluster 100 includes a plurality of nodes, an original configuration node 101 is a node selected from the plurality of nodes and is used to manage the cluster 100, and the cluster information database 200 is used to store states of the nodes in the cluster 100 before the original configuration node 101 leaves the cluster 100.
In the embodiment of the present invention, the cluster 100 is used to provide a data processing service for a user, and in the whole cluster 100, only the configuration node has authority to operate the resources of the whole cluster 100, for example, add other nodes to the cluster 100, manage a storage backend disk, and the like. While the remaining nodes in the cluster 100 can only change the state of the node itself, e.g., online or offline, etc.
The cluster information database 200 is configured to store the state of each node in the cluster 100 before the original configuration node 101 leaves the cluster 100, where the state of each node is that each node sends its current state to the cluster information database 200 through its own synchronization module. Details of the cluster information database 200 have been described in detail in the above embodiments, and are not described herein again.
In the embodiment of the present invention, since the cluster information database 200 is used to store the state of each node in the cluster before the original configuration node 101 leaves the cluster 100, which means that when the original configuration node 101 selects a node from the cluster information database 200, the cluster information database 200 is equivalent to having obtained the state of each node in advance, and it is not necessary to obtain the state of each node again when the configuration node needs to be replaced, as in the prior art, the present invention simplifies the step of selecting a configuration node, and reduces the time for replacing the configuration node.
When the original configuration node 101 leaves the cluster 100, the original configuration node 101 is configured to send leaving information to each node of the cluster 100.
In the embodiment of the present invention, the original configuration node 101 sends the leaving information to each node in the cluster 100 through a synchronization module arranged in the original configuration node 101, and after each node in the cluster 100 receives the leaving information, it means that the configuration node needs to be replaced at this time, and at this time, in order to prevent the service processed by the whole cluster 100 from being in error, the service executed by each node is usually interrupted.
After the original configuration node 101 sends the leaving information to each node of the cluster 100, the original configuration node 101 is further configured to give up the right to manage the cluster 100.
In the usual case, the remaining nodes in cluster 100 have authority to contend for authority to manage cluster 100 only after the original configuration node 101 relinquishes authority to manage cluster 100.
When the original configuration node 101 leaves the cluster 100, the original configuration node 101 is configured to select an online node meeting a preset condition from the cluster information database 200 as a candidate configuration node 102.
More specifically, the original configuration node 101 is specifically configured to:
and inquiring the cache information of the cluster information database 200 one by one.
The first online node queried is taken as candidate configuration node 102.
In the embodiment of the present invention, the first online node is determined according to the query sequence of the original configuration node 101. Of course, other online nodes may be selected as the candidate configuration node 102 according to the query sequence, except that the first online node is used as the candidate configuration node 102, which is not specifically limited herein. In addition to determining the candidate configuration nodes 102 based solely on query order, other conditions may be further added, and details refer to the above embodiments and are not described herein.
The candidate configuration nodes 102 are configured to initialize to become configuration nodes, and manage each of the nodes of the cluster 100.
In the embodiment of the present invention, the initialization process is equivalent to a process of acquiring a node configuration authority, and specific details are described in detail in the above embodiment and are not described herein again.
After the candidate configuration node 102 is initialized to become a configuration node, the configuration node is further configured to send initialization completion information to each of the nodes of the cluster 100.
In the embodiment of the present invention, the configuration node sends the initialization completion information to each node through the synchronization module arranged in the configuration node, and after each node in the cluster 100 receives the initialization completion information, it means that the initialization work is completed, and at this time, each node may continue the interrupted service.
The configuration node is also used to rejoin the cluster 100 with nodes that are to join the cluster 100.
In the embodiment of the present invention, immediately after the configuration node is replaced, the configuration node may further add the node to be added to the cluster 100 again by managing the authority of the whole cluster 100, so that the whole cluster 100 may process a service more quickly.
The cluster configuration node failover system according to the embodiment of the present invention is used to implement the foregoing method for cluster configuration node failover, so that the specific implementation manner in the cluster configuration node failover system can be seen in the foregoing embodiment of the method for cluster configuration node failover, and details are not described here again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method and system for cluster configuration node failover provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (8)

1. A method for cluster configuration node failover, the method comprising:
when an original configuration node leaves a cluster, the original configuration node selects an online node meeting a preset condition from a cluster information database as a candidate configuration node, the cluster information database is used for storing the state of each node in the cluster before the original configuration node leaves the cluster, and the state of each node is cache information stored in the cluster information database in a static file in a txt format; storing the load state values of all nodes in the cluster information database;
initializing the candidate configuration nodes to become configuration nodes, and managing each node of the cluster;
the method for selecting the online node meeting the preset condition from the cluster information database as the candidate configuration node by the original configuration node comprises the following steps:
the original configuration nodes inquire the cache information of the cluster information database one by one;
the original configuration node takes the inquired first online node as a candidate configuration node; the first online node is determined according to the query sequence of the original configuration node, and specifically, the queried online node with the first load state value smaller than a preset value is used as a candidate configuration node.
2. The method of claim 1, further comprising:
when the original configuration node leaves the cluster, each node in the cluster receives an event that the configuration node leaves the cluster;
after the candidate configuration node is initialized to become a configuration node, the method further comprises:
and the configuration node closes the initialization process of the cluster configuration node.
3. The method of claim 2, wherein after each node in the cluster receives an event that configures a node to leave the cluster, the method further comprises:
and the original configuration node sets the cluster to be in a configuration node election stage.
4. The method according to any of claims 1 to 3, wherein after the candidate configuration node is initialized to become a configuration node, the method further comprises:
and the configuration node rejoins the nodes to be joined into the cluster.
5. A cluster configuration node failover system is characterized in that the system comprises a cluster and a cluster information database, wherein the cluster comprises a plurality of nodes, an original configuration node is a node selected from the plurality of nodes and is used for managing the cluster, the cluster information database is used for storing the state of each node in the cluster before the original configuration node leaves the cluster, and the state of each node is cache information stored in the cluster information database in a static file in a txt format; storing the load state values of all nodes in the cluster information database;
when the original configuration node leaves the cluster, the original configuration node is used for selecting an online node meeting a preset condition from the cluster information database as a candidate configuration node;
the candidate configuration nodes are used for initializing to become configuration nodes and managing each node of the cluster;
wherein the original configuration node is specifically configured to:
inquiring the cache information of the cluster information database one by one;
taking the inquired first online node as a candidate configuration node; the first online node is determined according to the query sequence of the original configuration node, and specifically, the queried online node with the first load state value smaller than a preset value is used as a candidate configuration node.
6. The system of claim 5, wherein the original configuration node is further configured to:
when the original configuration node leaves the cluster, sending leaving information to each node of the cluster;
after the candidate configuration node initializes to become a configuration node, the configuration node is further configured to:
and sending initialization completion information to each node of the cluster.
7. The system of claim 6, wherein the original configuration node is further configured to:
and after the original configuration node sends the leaving information to each node of the cluster, giving up the authority of managing the cluster.
8. The system according to any of claims 5 to 7, wherein the configuration node is further configured to:
and adding the nodes to be added into the cluster again.
CN201710522134.3A 2017-06-30 2017-06-30 Method and system for cluster configuration node failover Active CN107294781B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710522134.3A CN107294781B (en) 2017-06-30 2017-06-30 Method and system for cluster configuration node failover

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710522134.3A CN107294781B (en) 2017-06-30 2017-06-30 Method and system for cluster configuration node failover

Publications (2)

Publication Number Publication Date
CN107294781A CN107294781A (en) 2017-10-24
CN107294781B true CN107294781B (en) 2021-06-29

Family

ID=60099555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710522134.3A Active CN107294781B (en) 2017-06-30 2017-06-30 Method and system for cluster configuration node failover

Country Status (1)

Country Link
CN (1) CN107294781B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768729A (en) * 2018-05-31 2018-11-06 郑州云海信息技术有限公司 A kind of transfer method and device of the memory node based on HDFS clusters
CN117311924A (en) * 2022-06-23 2023-12-29 华为云计算技术有限公司 Micro-service migration method and device and computing equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580915A (en) * 2013-09-26 2014-02-12 东软集团股份有限公司 Method and device for determining main control node of trunking system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958805B (en) * 2010-09-26 2014-12-10 中兴通讯股份有限公司 Terminal access and management method and system in cloud computing
US9916214B2 (en) * 2015-11-17 2018-03-13 International Business Machines Corporation Preventing split-brain scenario in a high-availability cluster
CN106453656B (en) * 2016-12-06 2019-12-06 东软集团股份有限公司 Cluster host selection method and device
CN106713056B (en) * 2017-03-17 2019-06-28 郑州云海信息技术有限公司 A kind of method of standby host election switching under distributed type assemblies

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580915A (en) * 2013-09-26 2014-02-12 东软集团股份有限公司 Method and device for determining main control node of trunking system

Also Published As

Publication number Publication date
CN107294781A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
US10581674B2 (en) Method and apparatus for expanding high-availability server cluster
CN108810100B (en) Method, device and equipment for electing master node
US10509680B2 (en) Methods, systems and apparatus to perform a workflow in a software defined data center
US11516072B2 (en) Hybrid cluster recovery techniques
US20160036924A1 (en) Providing Higher Workload Resiliency in Clustered Systems Based on Health Heuristics
US10484297B1 (en) Automated migration of compute instances to isolated virtual networks
US10846186B2 (en) Central processing unit CPU hot-remove method and apparatus, and central processing unit CPU hot-add method and apparatus
CN113014634A (en) Cluster election processing method, device, equipment and storage medium
CN105337780A (en) Server node configuration method and physical nodes
CN109802986B (en) Equipment management method, system, device and server
US10367676B1 (en) Stable leader selection for distributed services
CN107038192B (en) Database disaster tolerance method and device
CN107294781B (en) Method and system for cluster configuration node failover
US10498617B1 (en) System, method, and computer program for highly available and scalable application monitoring
CN110569124A (en) Task allocation method and device
CN107508700B (en) Disaster recovery method, device, equipment and storage medium
CN113810216A (en) Cluster fault switching method and device and electronic equipment
CN113765690A (en) Cluster switching method, system, device, terminal, server and storage medium
US10771539B2 (en) Systems and methods for cross-cluster service provision
CN114610545A (en) Method, system, device and medium for reducing single point of failure of private cloud computing
US8782364B2 (en) Determining availability of data elements in a storage system
CN108319679B (en) Method and device for generating primary key
US20230388205A1 (en) Cluster availability monitoring and alerting
CN111082959A (en) Load sharing method, device and network equipment
US11550270B2 (en) Redundant automation system, method for creating the automation system, computer program and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant