Cluster management method, device and system, storage medium and computer program product

The server node receives and processes the online event information of the proxy node, determines the work role and sends instructions, and uses finite state machine (FSM) to ensure application under different environments and cluster types. This solves the problem of lack of universality of cluster management solutions in the existing technology, and realizes efficient and flexible cluster management.

CN119814800APending Publication Date: 2025-04-11SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411793243.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The lack of universality of existing high availability cluster management solutions leads to the need to develop and maintain different failover strategies in different environments, increasing the complexity of the system and maintenance costs.

Method used

A cluster management method is proposed, which receives the online event information reported by the proxy node through the server node, determines the working role of the proxy node, and sends instructions to perform corresponding operations. This method uses finite state machine (FSM) for calculations to ensure that it is applicable under different environments and cluster types.

Benefits of technology

It realizes high availability cluster management that can be adopted for different cluster types and topology in different environments, reducing system complexity and maintenance costs, and improving management universality and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814800A_ABST
    Figure CN119814800A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a cluster management method, which is applied to a server node and comprises the following steps: receiving online event information reported by a first agent node; wherein the first agent node runs in a first cluster node and is used for performing node management on the first cluster node, and the online event information comprises attribute characteristic parameters, sensed when the first agent node runs, of the first cluster node; determining a working role of the first agent node based on the online event information; wherein the working role is a master node or a slave node; sending first indication information to the first proxy node; wherein the indication information is used for indicating the first agent node to execute the operation corresponding to the work role. The embodiment of the invention also discloses a first cluster management device, a second cluster management device, a system, a storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a cluster management method, device, system, storage medium and computer program product. Background Art

[0002] With the development of information technology, High Availability Cluster (HACluster) plays an increasingly important role in ensuring the continuity of key businesses and data integrity. HA clusters reduce the risk of single point failures and improve system availability through redundancy and failover mechanisms. However, existing HA cluster management solutions are usually designed for specific cluster types and topologies, lacking versatility, resulting in the need to develop and maintain different failover strategies in different environments, increasing system complexity and maintenance costs. Summary of the invention

[0003] In view of this, the embodiments of the present application hope to provide a cluster management method, device, system, storage medium and computer program product, which solve the problem of poor versatility of current HA cluster management solutions, and propose a reliable cluster management method, which can be used in different environments, for different cluster types and topological structures. The HA cluster management method has versatility and reduces the complexity of the system.

[0004] To achieve the above purpose, the technical solution of this application is implemented as follows:

[0005] In a first aspect, a cluster management method is provided, the method being applied to a server node, the method comprising:

[0006] Receive online event information reported by a first proxy node; wherein the first proxy node runs in a first cluster node and is used to perform node management on the first cluster node, and the online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation;

[0007] Based on the online event information, determine the working role of the first proxy node; wherein the working role is a master node or a slave node;

[0008] Sending first indication information to the first proxy node; wherein the indication information is used to instruct the first proxy node to perform an operation corresponding to the work role.

[0009] In the above scheme, the method further comprises:

[0010] The node identification information of the first proxy node and the work role are recorded.

[0011] In the above solution, determining the working role of the first proxy node based on the online event information includes:

[0012] A finite state machine FSM is used to calculate the online event information to determine the working role of the first proxy node.

[0013] In the above solution, after sending the indication information to the first proxy node, the method further includes:

[0014] If the fault notification information sent by the first proxy node is received, based on the fault notification information, determining the current working role of the fault proxy node indicated in the fault notification information; wherein the fault proxy node is the first proxy node or a second proxy node sensed by the first proxy node, and the second cluster node running the second proxy node belongs to the same cluster as the first cluster node;

[0015] Based on the current working role, determining a management operation corresponding to the faulty proxy node;

[0016] The management operation is performed.

[0017] In the above solution, determining the management operation corresponding to the fault proxy node based on the current working role includes:

[0018] If the current working role is the master node, a finite state machine FSM is used to calculate at least one third proxy node currently managed in a working state to determine a fourth proxy node used as the master node; wherein the second cluster node and the cluster node running the fourth proxy node belong to the same cluster;

[0019] Sending second indication information to the fourth proxy node; wherein the second indication information is used to instruct the fourth proxy node to perform the master node function.

[0020] In the above scheme, if the current working role is the master node, a finite state machine FSM is used to calculate at least one third proxy node currently managed in a working state, and after determining a fourth proxy node used as the master node, the method further includes:

[0021] Based on the network information of the fourth proxy node, the routing configuration of the reverse proxy is modified so that the access request sent to the faulty proxy node is subsequently forwarded to the fourth proxy node.

[0022] In the above scheme, the method further includes:

[0023] Generate fault prompt information that the fault cluster node corresponding to the fault proxy node has a fault;

[0024] The fault prompt information is output.

[0025] In the above scheme, the method further comprises:

[0026] Acquire user feature configuration information of the first cluster node;

[0027] The user feature configuration information is sent to the first proxy node, so that the first proxy node accesses the first cluster node based on the user feature configuration information.

[0028] In the above scheme, the method further comprises:

[0029] The server node includes one or more management nodes, and the load managed by each management node is the load of the cluster system, which is distributed using a consistent hashing algorithm.

[0030] In a second aspect, a cluster management method is provided, the method being applied to a first proxy node running in a first cluster node, the method comprising:

[0031] If the first proxy node is running for the first time, determining online event information;

[0032] Sending the online event information to the server node;

[0033] Receiving first indication information sent by the server node; wherein the first indication information is generated by the server node based on the online event information;

[0034] Based on the first indication information, resource information of the first cluster node is called to implement a function corresponding to the work role indicated by the first indication information.

[0035] In the above scheme, the method further comprises:

[0036] Receiving user feature configuration information of the first cluster node sent by the server node;

[0037] The user feature configuration information is configured.

[0038] In the above scheme, the method further comprises:

[0039] Performing a health check on the first cluster node according to a preset period to obtain a check result;

[0040] If the detection result is that the health detection fails for a preset number of consecutive times, generating fault notification information indicating that the first cluster node has a fault;

[0041] Send the fault notification information to the server node.

[0042] In the above scheme, the method further comprises:

[0043] If the heartbeat information of the second proxy node is not sensed, generating fault notification information indicating that the second cluster node has a fault; wherein the second cluster node running the second proxy node and the first cluster node belong to the same cluster;

[0044] Send the fault notification information to the server node.

[0045] In a third aspect, a first cluster management device is provided, the device being applied to a server node, the device comprising: a first receiving unit, a first determining unit, and a first sending unit; wherein:

[0046] The first receiving unit is used to receive online event information reported by the first proxy node; wherein the first proxy node runs in the first cluster node and is used to perform node management on the first cluster node, and the online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation;

[0047] The first determining unit is used to determine the working role of the first proxy node based on the online event information; wherein the working role is a master node or a slave node;

[0048] The first sending unit is used to send first indication information to the first proxy node; wherein the indication information is used to instruct the first proxy node to perform an operation corresponding to the work role.

[0049] In a fourth aspect, a second cluster management device is provided, which is applied to a first proxy node, and is characterized in that the device comprises: a second determining unit, a second sending unit, a second receiving unit and a calling unit; wherein:

[0050] The second determining unit is configured to determine online event information when the first proxy node is running for the first time;

[0051] The second sending unit is used to send the online event information to the server node;

[0052] The second receiving unit is configured to receive first indication information sent by the server node; wherein the first indication information is generated by the server node based on the online event information;

[0053] The calling unit is used to call the resource information of the first cluster node based on the first indication information to implement the function corresponding to the work role indicated by the first indication information.

[0054] In a fifth aspect, a cluster management system is provided, the system comprising at least: a cluster, a server node, and one or more proxy nodes including a first proxy node; wherein:

[0055] The server node is used to implement the steps of any one of the cluster management methods described above for managing a cluster;

[0056] The first proxy node is used to implement the steps of any one of the cluster management methods described above for managing a cluster.

[0057] According to a sixth aspect, a storage medium stores a cluster management program, and when the cluster management program is executed by a processor, the steps of the cluster management method as described in any one of the above items are implemented.

[0058] In a seventh aspect, a computer program product comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the cluster management method as described in any one of the above items.

[0059] The cluster management method, device, system, storage medium and computer program product provided by the embodiments of the present application, if the first proxy node is running for the first time, it determines the online event information and sends the online event information to the server node. After the server node receives the online event information reported by the first proxy node, it determines the working role of the first proxy node based on the online event information and sends the first indication information to the first proxy node. The first proxy node receives the first indication information sent by the server node and, based on the first indication information, calls the resource information of the first cluster node to implement the function corresponding to the working role indicated by the first indication information. In this way, the proxy nodes running in the cluster nodes are managed by the server node, so as to realize the control and management of the cluster nodes by controlling the proxy nodes, which solves the problem of poor versatility of the current HA cluster management scheme, and proposes a reliable cluster management method, which realizes the HA cluster management method that can be used in different environments, for different cluster types and topological structures, has versatility, and reduces the complexity of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 Schematic diagram of the cluster management method provided in this application embodiment Figure 1 ;

[0061] Figure 2 Schematic diagram of the cluster management method provided in this application embodiment Figure 2 ;

[0062] Figure 3 Schematic diagram of the cluster management method provided in this application embodiment Figure 3 ;

[0063] Figure 4 Schematic diagram of the cluster management method provided in this application embodiment Figure 4 ;

[0064] Figure 5 Schematic diagram of the cluster management method provided in this application embodiment Figure 5 ;

[0065] Figure 6 Schematic diagram of the cluster management method provided in this application embodiment Figure 6 ;

[0066] Figure 7 Schematic diagram of the cluster management method provided in this application embodiment Figure 7 ;

[0067] Figure 8 A schematic diagram of the relationship structure between a proxy node and a cluster node provided in an embodiment of the present application;

[0068] Fig. 9 A schematic diagram of the structure of a FSM provided in an embodiment of the present application;

[0069] Fig.10 A schematic diagram of a routing configuration provided in an embodiment of the present application;

[0070] Fig.11 A warning diagram provided for an embodiment of the present application;

[0071] Fig.12 A schematic diagram of an application structure of multiple server nodes provided in an embodiment of the present application;

[0072] Fig.13 A schematic diagram of the structure of a first cluster management device provided in an embodiment of the present application;

[0073] Fig.14 A schematic diagram of the structure of a second cluster management device provided in an embodiment of the present application;

[0074] Fig.15 A schematic diagram of the structure of a cluster management system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0076] The embodiment of the present application provides a cluster management method, which is applied to a server node, referring to Figure 1 As shown, the method comprises the following steps:

[0077] Step 101: Receive online event information reported by a first agent node.

[0078] The first proxy node runs in the first cluster node and is used to manage the first cluster node. The online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation.

[0079] In an embodiment of the present application, the server node is a management node for managing at least one proxy node. The first proxy node runs in the first cluster node of the cluster system that needs to be managed, so that the server node manages the first cluster node running on it through the first proxy node. The first proxy node can be manually installed in the first cluster node by a user, or it can be automatically installed in the first cluster node under the control of the server node. After the first proxy node is installed in the first cluster node, when it starts running, it obtains the attribute characteristic parameters of the first cluster node where it is located, generates the online event information of the first proxy node, and the first proxy node sends the online event information to the server node.

[0080] Step 102: Determine the working role of the first proxy node based on the online event information.

[0081] Among them, the working role is the master node or the slave node.

[0082] In the embodiment of the present application, the master node is a node that can perform comprehensive management of the slave nodes, which can be called a master node, and the corresponding slave node can be called a slave node. The server node performs information analysis and decision processing on the received online event information to determine the working role of the first proxy node. Usually, for the proxy nodes corresponding to a cluster, usually only one master node is set, and the corresponding other proxy nodes are slave nodes.

[0083] Step 103: Send first indication information to the first proxy node.

[0084] The instruction information is used to instruct the first proxy node to perform operations corresponding to the work role.

[0085] In an embodiment of the present application, after the service end node determines the working role of the first proxy node, it generates a first indication message and sends the first indication message to the first proxy node to control the first proxy node to perform operations corresponding to the working role and realize functions corresponding to the working role.

[0086] The cluster management method provided in the embodiment of the present application determines the working role of the first proxy node based on the online event information after the service node receives the online event information reported by the first proxy node, and sends the first indication information to the first proxy node, so that the first proxy node receives the first indication information sent by the service node, and based on the first indication information, calls the resource information of the first cluster node to implement the function corresponding to the working role indicated by the first indication information. In this way, the proxy node running in the cluster node is managed by the service node, so as to realize the control and management of the cluster node by controlling the proxy node, which solves the problem of poor versatility of the current HA cluster management solution, and proposes a reliable cluster management method, which realizes the HA cluster management method that can be used in different environments, for different cluster types and topological structures, has versatility, and reduces the complexity of the system.

[0087] Based on the above embodiments, the embodiments of the present application provide a cluster management method, referring to Figure 2 As shown, the method is applied to the first proxy node, and the method includes the following steps:

[0088] Step 201: If the first proxy node is running for the first time, determine online event information.

[0089] In the embodiment of the present application, the online event information includes at least the topology type of the cluster to which the first cluster node belongs and the current state of the cluster, and may further include information content such as the remaining resources of the cluster. The current state of the cluster to which the first cluster node belongs may include, for example, which cluster nodes are there, the role of each cluster node, whether the cluster node is online, etc. When the first proxy node starts running after installation, the online event information corresponding to the first cluster node is determined.

[0090] Step 202: Send online event information to the server node.

[0091] In an embodiment of the present application, the first proxy node sends the determined online event information to the server node through the communication interface between the first proxy node and the server node. In this way, after the server node receives the online event information sent by the first proxy node, it analyzes the online event information sent by the first proxy node, determines the working role of the first proxy node, and generates first indication information based on the working role of the first proxy node, and then sends the first indication information to the first proxy node.

[0092] Step 203: Receive first indication information sent by the server node.

[0093] The first indication information is generated by the server node based on the online event information.

[0094] In an embodiment of the present application, the first proxy node sends the first indication information to the server node through the communication interface between the first proxy node and the server node.

[0095] Step 204: Based on the first indication information, call the resource information of the first cluster node to implement the function corresponding to the work role indicated by the first indication information.

[0096] In an embodiment of the present application, the first proxy node responds to the received first indication information, calls the resource information corresponding to the first cluster node according to the first indication information, and implements the function corresponding to the work role indicated by the first indication information.

[0097] The cluster management method provided by the embodiment of the present application, if the first proxy node is running for the first time, determines the online event information, and sends the online event information to the server node, then the first proxy node receives the first indication information sent by the server node, and based on the first indication information, calls the resource information of the first cluster node to implement the function corresponding to the work role indicated by the first indication information. In this way, the proxy node running in the cluster node is managed by the server node, so as to achieve control and management of the cluster node by controlling the proxy node, which solves the problem of poor versatility of the current HA cluster management solution, and proposes a reliable cluster management method, which realizes the HA cluster management method that can be used in different environments, for different cluster types and topological structures, has versatility, and reduces the complexity of the system.

[0098] Based on the above embodiments, the embodiments of the present application provide a cluster management method, referring to Figure 3 As shown, the method comprises the following steps:

[0099] Step 301: If the first proxy node is running for the first time, the first proxy node determines online event information.

[0100] In an embodiment of the present application, exemplarily, when the server node determines that a cluster needs to be managed, the user installs each first agent node in the cluster nodes included in the cluster according to the instructions, and when each installed first agent node is run for the first time, it obtains the online event information corresponding to the environment in which it is located.

[0101] Step 302: The first proxy node sends online event information to the server node.

[0102] In an embodiment of the present application, the first proxy node sends the online event information to the server node, performs online registration at the server node, and requests the server node to determine the working role of the first proxy node based on the online event information.

[0103] Step 303: The server node receives the online event information reported by the first proxy node.

[0104] The first proxy node runs in the first cluster node and is used to manage the first cluster node. The online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation.

[0105] Step 304: The server node determines the working role of the first proxy node based on the online event information.

[0106] Among them, the working role is the master node or the slave node.

[0107] In an embodiment of the present application, the server node analyzes the received online event information using a preset analysis method to determine the working role of the first proxy node.

[0108] In some application scenarios, after receiving the online event information of all the proxy nodes it manages, the server node may perform work role analysis on all the online event information to determine the work role of the first proxy node.

[0109] Step 305: The server node sends first indication information to the first proxy node.

[0110] The instruction information is used to instruct the first proxy node to perform operations corresponding to the work role.

[0111] In the embodiment of the present application, after the server node successfully registers with the first proxy node, the server node sends the determined working role of the first proxy node to the first proxy node via the first indication information.

[0112] Step 306: The first proxy node receives the first indication information sent by the server node.

[0113] The first indication information is generated by the server node based on the online event information.

[0114] Step 307: The first proxy node calls the resource information of the first cluster node based on the first indication information to implement the function corresponding to the work role indicated by the first indication information.

[0115] In an embodiment of the present application, the first proxy node calls some code, function parameters and other resource information in the first cluster node according to the first indication information to implement the function corresponding to the work role indicated by the first indication information.

[0116] For example, when the working role of the first proxy node is determined to be a master node, the first proxy node calls the resource information of the first cluster node to implement the functions of the master node, for example, receiving a business request sent by a user, providing business services to the user, or receiving business data such as data sent by other proxy nodes and slave nodes, or controlling the data to be stored sent by the user to be stored in the first cluster node through other proxy nodes, etc. If the working role of the first proxy node is determined to be a slave node, the first proxy node executes the tasks instructed by the master node and performs business communications with the master node.

[0117] Based on the above embodiment, in other embodiments of the present application, after the server node executes step 304, refer to Figure 4 As shown, it is also used to execute step 308:

[0118] Step 308: The server node records the node identification information and work role of the first proxy node.

[0119] In the embodiment of the present application, the node identification information of the first proxy node may be information used to uniquely identify the first proxy node, such as the node number, name or serial number of the first proxy node. After determining the working role of the first proxy node, the server node also establishes a corresponding relationship between the node identification information of the first proxy node and its working role, records it, and obtains the recorded information, so as to perform corresponding adjustment operations according to the recorded information later.

[0120] Based on the foregoing embodiment, in other embodiments of the present application, step 304 may be implemented by the following steps: using a finite state machine FSM to calculate the online event information and determine the working role of the first proxy node.

[0121] In the embodiment of the present application, when the server node performs the working role of the first proxy node, a finite state machine (FSM) can be used to analyze and calculate the online event information of the first proxy node.

[0122] Based on the above embodiments, in other embodiments of the present application, refer to Figure 5 As shown, after the first proxy node executes step 302, it is also used to execute steps 309 to 311, or steps 312 to 313:

[0123] Step 309: The first proxy node performs a health check on the first cluster node according to a preset period to obtain a check result.

[0124] In the embodiment of the present application, the preset period is an empirical time period obtained from a large number of experiments, or an empirical period set by a user according to actual requirements. The first proxy node performs a health check on the first cluster node to which it belongs according to the preset preset period to obtain a test result. The health check process can be, for example, whether the operating status of the first cluster node is normal, whether the service status of the provided service is normal, etc.

[0125] Step 310: If the detection result is that the health check fails for a preset number of consecutive times, the first proxy node generates fault notification information indicating that the first cluster node has a fault.

[0126] In the embodiment of the present application, the preset number of times may be an empirical value obtained from a large number of experiments, or an empirical value set by the user according to his own needs, for example, 1 time, 2 times, 5 times, etc. Within a period of time, when the first proxy node detects that its corresponding first cluster node fails to pass the health check for consecutive preset times, the first proxy node determines that it has a fault notification information of a fault.

[0127] Step 311: The first proxy node sends fault notification information to the server node.

[0128] Step 312: If the heartbeat information of the second proxy node is not sensed, the first proxy node generates fault notification information indicating that a fault exists in the second cluster node.

[0129] The second cluster node running the second proxy node belongs to the same cluster as the first cluster node.

[0130] In an embodiment of the present application, the proxy nodes running in the cluster will periodically generate heartbeat information during operation to indicate that they are working normally. In this way, when other proxy nodes cannot detect the heartbeat information sent by a certain proxy node, it can be determined that the cluster node corresponding to the proxy node has a fault. In this way, other proxy nodes can generate fault notification information indicating that the cluster node corresponding to the proxy node has a fault and send it to the server node.

[0131] Step 313: The first proxy node sends fault notification information to the server node.

[0132] Correspondingly, after the first proxy node executes steps 309 to 311 or steps 312 to 313, the server node may execute steps 314 to 316:

[0133] Step 314: If the fault notification information sent by the first proxy node is received, the server node determines the current working role of the faulty proxy node indicated in the fault notification information based on the fault notification information.

[0134] The faulty proxy node is the first proxy node or the second proxy node sensed by the first proxy node, and the second cluster node running the second proxy node belongs to the same cluster as the first cluster node.

[0135] In an embodiment of the present application, after the service node receives the fault notification information sent by the first proxy node, it analyzes the node identification information and the record information of the working roles of all the proxy nodes managed by it, and the fault notification information, and determines the current working role of the faulty proxy node indicated in the fault notification information.

[0136] Step 315: The server node determines the management operation corresponding to the faulty proxy node based on the current working role.

[0137] In the embodiment of the present application, the server node determines the management operation required to manage the faulty proxy node according to the working role of the faulty proxy node.

[0138] Step 316: The server node performs management operations.

[0139] In an embodiment of the present application, for example, when the current working role of the faulty proxy node is a master node, the server node needs to determine a new master node from other proxy nodes to take over the work of the faulty proxy node. At this time, the corresponding management operation is to indicate the new proxy node as the master node, and update the status of the faulty proxy node in the record information to a faulty state; if the current working role of the faulty proxy node is a slave node, the corresponding management operation is: the server node updates the record information to indicate that the current status of the faulty proxy node is a faulty state.

[0140] Based on the above embodiment, in other embodiments of the present application, step 315 can be implemented by steps 315a to 315b:

[0141] Step 315a: If the current working role is the master node, the server node uses the finite state machine FSM to calculate at least one third proxy node currently managed and in a working state, and determines a fourth proxy node to be used as the master node.

[0142] The second cluster node and the cluster node running the fourth proxy node belong to the same cluster.

[0143] In an embodiment of the present application, when the current working role of the faulty proxy node is the master node, the server node uses FSM to calculate at least one third proxy node that is currently managed and is in a working state, that is, working normally. Specifically, FSM can be used to calculate and analyze information parameters corresponding to the online event information periodically reported by a third proxy node, and a fourth proxy node that can serve as the master node is determined from at least one third proxy node.

[0144] Step 315b: The server node sends the second indication information to the fourth proxy node.

[0145] The second indication information is used to instruct the fourth agent node to perform the master node function.

[0146] Based on the foregoing embodiment, in other embodiments of the present application, after the server node executes step 315a, it is further configured to execute step 315c:

[0147] Step 315c: The server node modifies the routing configuration of the reverse proxy based on the network information of the fourth proxy node, so as to subsequently forward the access request sent to the faulty proxy node to the fourth proxy node.

[0148] In an embodiment of the present application, the network information of the fourth proxy node may be network parameter information such as the Internet Protocol (IP) address of the fourth proxy node. After the server node determines that the fourth proxy node is the main node, it also modifies the routing configuration of the reverse proxy corresponding to the fourth proxy node. In this way, complete transparency of the business can be achieved.

[0149] Based on the above embodiments, in other embodiments of the present application, refer to Figure 6 As shown, after the server node executes step 314, it is also used to execute steps 317 to 318:

[0150] Step 317: The server node generates fault prompt information indicating that the faulty cluster node corresponding to the faulty proxy node has failed.

[0151] In the embodiment of the present application, the server node may also generate fault prompt information of a faulty cluster node, so as to be used to quickly locate the faulty cluster node and perform fault repair on the faulty cluster node.

[0152] Step 318: The server node outputs fault prompt information.

[0153] In an embodiment of the present application, the service end node outputs the fault prompt information to a display area of ​​a display device of the service end node for display, or the service end node outputs the fault prompt information to a communication device having a communication link with the service end node, so as to display the fault prompt information on the communication device side. The communication device may be a mobile terminal device of a user.

[0154] Based on the above embodiments, in other embodiments of the present application, refer to Figure 7 As shown, the server node is also used to execute steps 319 to 322:

[0155] Step 319: The server node obtains user feature configuration information of the first cluster node.

[0156] In the embodiment of the present application, the user feature configuration information is some operation feature parameters configured by the user when the first cluster node is running, such as the user name and password of the first cluster node and the port information called by the first cluster node. The server node has a higher authority and can dynamically obtain the user feature configuration information of the cluster node to be managed.

[0157] Step 320: The server node sends user feature configuration information to the first proxy node.

[0158] The user feature configuration information is sent to the first proxy node, so that the first proxy node accesses the first cluster node based on the user feature configuration information.

[0159] In an embodiment of the present application, the server node sends the user feature information of the first cluster node where the first proxy node is located to the first proxy node. In this way, after the first proxy node receives the user feature configuration information, it can access the first cluster node, thereby realizing dynamic configuration of the first cluster node at the first proxy node, and ensuring that the first proxy node can quickly access the cluster node.

[0160] Step 321: The first proxy node receives user feature configuration information of the first cluster node sent by the server node.

[0161] Step 322: The first proxy node configures user feature configuration information.

[0162] Based on the foregoing embodiment, in other embodiments of the present application, the server node includes one or more management nodes, and the load managed by each management node is the load of the cluster system, which is distributed using a consistent hashing algorithm.

[0163] In an embodiment of the present application, the service node may be one or more pre-configured management nodes, that is, the service node may be composed of one or more management nodes. In this way, when the service node includes multiple management nodes, one management node may be determined from the multiple management nodes to provide services as the service node, or multiple management nodes may provide services at the same time. In this way, it can be ensured that when a single management node fails, other management nodes can provide services, thereby ensuring the management of the cluster.

[0164] For ease of understanding, some of the terms used can be explained as follows:

[0165] A high availability cluster (HA cluster) is a cluster system composed of multiple servers, which aims to improve the availability and reliability of the entire system through redundancy and failover mechanisms.

[0166] Failover means that when a component in the system fails, the system can switch to a backup component to ensure the continuous operation of the system and the availability of services. This is a common high availability (HA) technology that is widely used in key systems such as servers, networks, and databases.

[0167] Automatic Failover means that when a computer system, network or related equipment encounters a failure, the system can automatically switch to a backup component or path to maintain service continuity and availability. This process usually does not require human intervention, can respond to failures quickly, and reduce system downtime.

[0168] The working principle of automatic failover usually includes the following steps: (1) Monitoring. The system continuously monitors the status of key components, including servers, network connections, databases, applications, etc. (2) Detection. When the monitoring mechanism detects that a component has failed or is abnormal, the failover mechanism will be triggered. (3) Switching. The system will automatically transfer the workload from the failed component to the pre-configured backup component. This may involve operations such as changing network routes, reallocating resources, and starting backup servers. (4) Recovery. After the failed component resumes normal operation, the system may switch the workload back to the original component or continue to use the backup component, depending on the system configuration and fault recovery strategy.

[0169] The advantages of automatic failover include: (1) Reduced downtime: Automated fault handling reduces the time for manual intervention, thereby reducing system downtime. (2) Improved reliability: The system can continue to operate when a fault occurs, improving service reliability. (3) Reduced management burden: Automated fault handling reduces the workload of Internet Technology (IT) managers, allowing them to focus on other tasks.

[0170] Cluster type: Depending on the cluster business, we can divide the cluster into different types, such as MySQL cluster, MongoDB cluster, Redis cluster, etc.

[0171] Topology refers to the physical or logical layout of how computer nodes in a cluster are interconnected, organized, and collaborated. Cluster topology has an important impact on cluster performance, scalability, fault tolerance, and communication efficiency. Common basic topologies in HA clusters include: master-slave structure, one master and multiple slaves structure, chained master-slave structure, and dual-master structure.

[0172] Based on the above embodiments, the present application embodiment provides a system structure for managing cluster nodes, which mainly includes: a server, a client and an agent; wherein:

[0173] server, corresponding to the server node mentioned above in this application, is used to provide arbitration services, can be installed and deployed independently, and supports clustered deployment. Multiple nodes can work together to achieve load balancing and ensure high availability. Specifically, it can include the following functions: arbitration service, based on node event drive, can manage thousands of database / middleware clusters at the same time; elect nodes and send notifications to agents; orchestrate reverse proxy (Ingress) routing to divert business traffic; store cluster configuration mapping and dynamically issue it; achieve high availability deployment based on Raft protocol; achieve load balancing between multiple server nodes based on consistent hashing (Hash) algorithm.

[0174] Client is a command line client used to call the server. It can call the server's Hypertext Transfer Protocol (HTTP) / Google Remote Procedure Call (gRPC) application programming interface (API). System users can use this client to use all the functions of the system, such as creating a management cluster system for the management cluster, querying the management cluster system, etc.

[0175] Agent, corresponding to the aforementioned agent node in this application, is installed on each cluster node of the managed cluster. It communicates with other agent nodes using the Gossip protocol to achieve more reliable fault detection; when the server notifies an event, it executes the corresponding callback, for example, when the master node fails, it executes the promote callback on the slave node to switch to the new Master; the agent and the server can communicate using the xRPC protocol, which supports end-to-end encryption.

[0176] The operation process of managing the cluster based on the above system structure for managing cluster nodes can be as follows:

[0177] Step a11: When a HA cluster needs to be managed, the user calls the arbiter-server API through the client to create an xcluster.

[0178] Step a12: After creating xcluster, the user installs the agent on each cluster node of the HA cluster in sequence as needed.

[0179] The agent runs as a daemon process on the cluster nodes of the HA cluster to manage the cluster nodes.

[0180] For example, Figure 8 The following table takes the MySQL master-slave cluster as an example, where the agent is installed on all cluster nodes.

[0181] Step a13: The agent node goes online and registers.

[0182] After the agent runs, it will join the gossip network. The server will sense the online event of the cluster node running the agent, and then process it through FSM according to the online event information of the cluster node running the agent, that is, the cluster topology type to which the cluster node running the agent belongs, the current state of the cluster (which nodes there are, the role of each node, whether it is online, etc.), calculate the correct role of the online cluster node, and record the node information of the online node including the correct role into the server's built-in database. At the same time, the node information and the corresponding callback instructions (such as promote) are sent to the agent to complete the node registration.

[0183] FSM can ensure that when a node fails, the current cluster state is transferred to a predetermined state and a new role is assigned to each node, thereby maintaining the high availability of the cluster. The use of finite state machines can effectively handle node failure recovery issues and improve system reliability and availability.

[0184] The basic principles of FSM include the following aspects:

[0185] State: The state of an FSM refers to the state of the system at a certain moment. It is an abstract concept and can be represented by an identifier.

[0186] Input: The input of FSM refers to the external signal received by the system, which can be a character, a number, an event, etc.

[0187] Transfer function: The transfer function of FSM refers to the rule for the system to transfer from one state to another. It describes the process of the system transferring from one state to another under a given input;

[0188] Output: The output of FSM refers to the response of the system to the input in a certain state. The output can be a character, a number, an event, etc.

[0189] Since the state machines of different cluster topologies are different, it is necessary to implement the corresponding finite state machine for each cluster topology. For example, the standby node in the active-standby topology also serves as the master node of another node, while the active-standby topology does not require this.

[0190] Here, we take the active-standby topology as an example to explain the state transfer of the state machine. The active-standby topology state machine has the following four states:

[0191] stateInit#initial state, no normal nodes

[0192] stateOnlyMaster#Only Master node

[0193] stateOnlySlave#Only Slave node

[0194] stateMasterSlave#The target state under the master and slave node master-slave topology

[0195] For example, Fig. 9 The diagram shows that the node online / offline events are used as the input of the state machine. The state machine will execute the transfer function and output new roles for the remaining nodes, thereby maintaining the high availability of the cluster.

[0196] Step a14: The agent receives the notification from the server and executes the corresponding callback action according to the above configuration file.

[0197] For example, assuming there is a master-slave MySQL cluster, when the first node A comes online, the server elects it as the master and notifies it to execute the promote-master callback; when the second node B comes online, the arbiter-server will elect it as the slave, associate it with node A, notify it that it is the slave node of node A, and notify it to execute the demote-slave callback to implement the function of the slave node.

[0198] Step a15: Fault detection and automatic failover.

[0199] When the agent detects the following two situations, it will determine that the cluster node is currently faulty. The first situation is: the agent regularly performs health checks on the cluster nodes. When the health checks fail multiple times in a row, the agent determines that the cluster node is faulty and reports the fault information to the server. The second situation is: when the agent's node fails or the network is interrupted, the agent's gossip heartbeat will stop, and the surrounding agents will not be able to sense its heartbeat, so they will sense that it is faulty. At this time, other agents that sense that it is faulty will pass the fault information to the server.

[0200] In this way, after receiving the fault information from the agent, the server will use FSM to process the offline events of the cluster nodes according to the cluster topology type, current cluster status and other offline event information of the cluster node corresponding to the agent, and then update the roles and associated node information of all current nodes to correspond to the aforementioned recorded information; if the role of the node or the associated node changes, the server will send the latest node information and corresponding callback instructions to it!

[0201] The agent receives the notification from the server and executes the corresponding callback action according to the above configuration file to complete the automatic failover.

[0202] Exemplarily, based on the aforementioned master-slave MySQL cluster, assuming that when node A fails, the server elects node B as the new master node, the server notifies node B to execute the promote-master instruction. Further, node A can be elected as the new slave, and its associated node is B; after the agent of node B receives the notification sent by the server, it executes the callback action corresponding to the promote-master instruction, switches the agent of node B to the new master, and completes automatic failover.

[0203] When the aforementioned agent performs a health check or callback action on a cluster node, some configuration information is usually required, such as the MySQL port, user name, password, etc. of the current node, otherwise the agent may not be able to connect to MySQL to complete the health check or callback action. In the embodiment of the present application, dynamic configuration can be performed through server variable configuration management (configmap) to support dynamic creation and update of configuration in the xcluster cluster, which will be pushed to the agent on the relevant cluster node in real time after creation and update.

[0204] For example, for a MySQL cluster, the configuration information that is usually required is as follows:

[0205] -Node SSH information

[0206] SSH_USER

[0207] SSH_PORT

[0208] SSH_PASSWD

[0209] -MySQL port, username and password

[0210] MYSQL_USER

[0211] MYSQL_PORT

[0212] MYSQL_PASSWD

[0213] Then, you can create the following configmap-like command in the server:

[0214] arbiter-client configmap create--xcluster-id=" <xclusterid>"--data="SSH_USER"="sysadm","SSH_PORT"="22345","SSH_PASSWD"="adminsangfornetwork","MYSQL_USER"="root","MYSQL_PORT"="3306","MYSQL_PASSWD"="admin"

[0215] In this way, after the above command is executed successfully, the server stores the information in the built-in database and supports encrypted storage. If there is a change in the subsequent configuration, you can use the client configmap update command to dynamically modify it, and the modified configuration will be pushed to the agent immediately.

[0216] In the above embodiment, when the corresponding cluster node of the agent as the master node fails, the cluster node corresponding to the new agent is determined to be the new master node. After the failover is realized, the business can be completely transparent by modifying the routing configuration of the reverse proxy. For example, Fig.10 As shown in the figure, ProxySQL can be used as a reverse proxy for the MySQL master-slave cluster, and transparent read-write separation can be achieved.

[0217] In the above embodiment, when a cluster node managed by the agent fails, an alarm for the failure can also be implemented. The specific implementation process can be implemented through the xcluster alarm configuration, that is, when it is determined that a cluster node fails, the system user can be notified of the failed cluster node in a timely manner through the configured global alarm rules or the alarm rules configured at the xcluster level. Exemplarily, one implementation method of the alarm configuration can be implemented through the following command:

[0218] arbiter-client alert create webhook-alerter--class-name="webhook"--xcluster-id= <xcluster-id>-f=alert.yaml

[0219] Correspondingly, an alarm example can be found in Fig.11 shown.

[0220] It should be noted that for server applications, in the case of minimal deployment, a single server node can be used to manage a large number of HA clusters. Furthermore, in order to solve the problem of potential single point failure of the server, the server can also be deployed in a cluster, which can not only achieve high availability of the server, but also achieve horizontal expansion of the server, that is, evenly distribute the system load to multiple server nodes. For example, Fig.12 As shown in the figure, when there is a server cluster with 3 servers, the consistent hashing algorithm can be used to share the load. That is, when the server receives an event from a cluster node corresponding to an agent, it will calculate whether it belongs to its own management based on its xcluster id. If it does not belong to its own management, the event will be discarded; if it belongs to its own management, event processing will be performed. In this way, it is assumed that server 1 is responsible for managing clusters with xcluster ids of 1, 4, 7..., server 2 is responsible for managing clusters with xcluster ids of 2, 5, 8..., and server 3 is responsible for managing clusters with xcluster ids of 3, 6, 9...

[0221] In this way, the universal HA cluster automatic failover solution can adapt to HA cluster environments of different types and topologies, improve the versatility and flexibility of the HA cluster, reduce the need for customized solutions for different environments, and simplify the maintenance and management of the HA cluster. A set of systems can simultaneously manage a large number of heterogeneous clusters in one stop, reducing operation and maintenance costs, further improving the fault recovery speed and data consistency of the HA cluster, and enhancing business continuity.

[0222] It should be noted that the explanations of the same steps or concepts in this embodiment as those in other embodiments can refer to the descriptions in other embodiments and will not be repeated here.

[0223] The cluster management method provided by the embodiment of the present application is that if the first proxy node is running for the first time, it determines the online event information and sends the online event information to the server node. After the server node receives the online event information reported by the first proxy node, it determines the working role of the first proxy node based on the online event information and sends the first indication information to the first proxy node. The first proxy node receives the first indication information sent by the server node and, based on the first indication information, calls the resource information of the first cluster node to implement the function corresponding to the working role indicated by the first indication information. In this way, the proxy nodes running in the cluster nodes are managed by the server node, so as to achieve control and management of the cluster nodes by controlling the proxy nodes, which solves the problem of poor versatility of the current HA cluster management scheme and proposes a reliable cluster management method, which realizes the HA cluster management method that can be used in different environments, for different cluster types and topological structures, has versatility and reduces the complexity of the system.

[0224] Based on the above embodiments, the present application provides a first cluster management device 4, which is applied to a server node. The first cluster management device 4 can be applied to Figures 1 to 7 In the corresponding embodiment, refer to Fig.13 As shown, the first cluster management device 4 includes: a first receiving unit 41, a first determining unit 42 and a first sending unit 43; wherein:

[0225] A first receiving unit 41 is used to receive online event information reported by a first proxy node; wherein the first proxy node runs in a first cluster node and is used to perform node management on the first cluster node, and the online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation;

[0226] A first determining unit 42 is used to determine a working role of the first proxy node based on the online event information; wherein the working role is a master node or a slave node;

[0227] The first sending unit 43 is used to send first indication information to the first proxy node; wherein the indication information is used to instruct the first proxy node to perform an operation corresponding to the work role.

[0228] In other embodiments of the present application, the first cluster management device further includes: a recording unit; wherein:

[0229] The recording unit is used to record the node identification information and work role of the first proxy node.

[0230] In other embodiments of the present application, the first determining unit is specifically configured to implement the following steps:

[0231] The finite state machine FSM is used to calculate the online event information and determine the working role of the first proxy node.

[0232] In other embodiments of the present application, after the first sending unit, the first cluster management device further includes: a third determining unit, a fourth determining unit and an executing unit; wherein:

[0233] A third determining unit is configured to determine, if receiving the fault notification information sent by the first proxy node, the current working role of the fault proxy node indicated in the fault notification information based on the fault notification information; wherein the fault proxy node is the first proxy node or the second proxy node perceived by the first proxy node, and the second cluster node running the second proxy node belongs to the same cluster as the first cluster node;

[0234] The fourth determining unit is further used to determine a management operation corresponding to the faulty proxy node based on the current working role;

[0235] Execution unit, used to perform management operations.

[0236] In other embodiments of the present application, the fourth determining unit includes: a determining module and a sending module; wherein:

[0237] A determination module, for, if the current working role is a master node, using a finite state machine FSM to calculate at least one third proxy node currently managed in a working state, to determine a fourth proxy node used as the master node; wherein the second cluster node and the cluster node running the fourth proxy node belong to the same cluster;

[0238] The sending module is used to send the second indication information to the fourth agent node; wherein the second indication information is used to instruct the fourth agent node to perform the master node function.

[0239] In other embodiments of the present application, after determining the module, it further includes: a modification module; wherein:

[0240] The modification module is used to modify the routing configuration of the reverse proxy based on the network information of the fourth proxy node, so as to subsequently forward the access request sent to the faulty proxy node to the fourth proxy node.

[0241] In other embodiments of the present application, after the fourth determining unit, the first cluster management device further includes: a generating unit and an output unit; wherein:

[0242] A generating unit, used for generating fault prompt information of a fault cluster node corresponding to the fault proxy node;

[0243] The output unit is used to output fault prompt information.

[0244] In other embodiments of the present application, the first cluster management device further includes: an acquisition unit; wherein:

[0245] An acquiring unit, configured to acquire user feature configuration information of a first cluster node;

[0246] The first sending unit is further configured to send the user feature configuration information to the first proxy node, so that the first proxy node accesses the first cluster node based on the user feature configuration information.

[0247] In other embodiments of the present application, the server node includes one or more management nodes, and the load managed by each management node is the load of the cluster system, which is distributed using a consistent hashing algorithm.

[0248] It should be noted that the information interaction process between the units and modules in this embodiment can refer to the information interaction process described in the aforementioned method embodiment, which will not be repeated here.

[0249] The first cluster management device provided in the embodiment of the present application, after receiving the online event information reported by the first proxy node through the service end node, determines the working role of the first proxy node based on the online event information, and sends the first indication information to the first proxy node, so that the first proxy node receives the first indication information sent by the service end node, and based on the first indication information, calls the resource information of the cluster node to implement the function corresponding to the working role indicated by the first indication information. In this way, the proxy node running in the cluster node is managed by the service end node, so as to realize the control and management of the cluster node by controlling the proxy node, which solves the problem of poor versatility of the current HA cluster management scheme, and proposes a reliable cluster management method, which realizes the HA cluster management method that can be adopted in different environments, for different cluster types and topological structures, has versatility, and reduces the complexity of the system.

[0250] Based on the above embodiment, the present application embodiment provides a second cluster management device 5, which is applied to the first proxy node. The second cluster management device 5 can be applied to Figures 2 to 7 In the corresponding embodiment, refer to Fig.14 As shown, the second cluster management device 5 includes: a second determining unit 51, a second sending unit 52, a second receiving unit 53 and a calling unit 54; wherein:

[0251] The second determining unit 51 is used to determine the online event information when the first proxy node is running for the first time;

[0252] The second sending unit 52 is used to send online event information to the server node;

[0253] The second receiving unit 53 is used to receive the first indication information sent by the service end node; wherein the first indication information is generated by the service end node based on the online event information;

[0254] The calling unit 54 is configured to call the resource information of the first cluster node based on the first indication information to implement the function corresponding to the work role indicated by the first indication information.

[0255] In other embodiments of the present application, the second cluster management device further includes: a configuration unit; wherein:

[0256] The second receiving unit is further used to receive user feature configuration information of the first cluster node sent by the service end node;

[0257] The configuration unit is used to configure user feature configuration information.

[0258] In other embodiments of the present application, the second cluster management device further includes: a detection unit and a generation unit; wherein:

[0259] A detection unit, used to perform health detection on the first cluster node according to a preset period to obtain a detection result;

[0260] A generating unit, configured to generate fault notification information indicating that the first cluster node has a fault if the detection result fails the health detection for a preset number of consecutive times;

[0261] The second sending unit is further used to send fault notification information to the server node.

[0262] In other embodiments of the present application, the generating unit is further configured to generate fault notification information indicating that the second cluster node has a fault if the heartbeat information of the second proxy node is not sensed; wherein the second cluster node running the second proxy node belongs to the same cluster as the first cluster node;

[0263] The second sending unit is further used to send fault notification information to the server node.

[0264] It should be noted that the information interaction process between the units and modules in this embodiment can refer to the information interaction process described in the aforementioned method embodiment, which will not be repeated here.

[0265] The second cluster management device provided by the embodiment of the present application, if the first proxy node is running for the first time, determines the online event information, and sends the online event information to the server node, then the first proxy node receives the first indication information sent by the server node, and based on the first indication information, calls the resource information of the first cluster node to implement the function corresponding to the work role indicated by the first indication information. In this way, the proxy node running in the cluster node is managed by the server node, so as to achieve control and management of the cluster node by controlling the proxy node, which solves the problem of poor versatility of the current HA cluster management solution, and proposes a reliable cluster management method, which realizes the HA cluster management method that can be used in different environments, for different cluster types and topological structures, has versatility, and reduces the complexity of the system.

[0266] Based on the above embodiments, the embodiments of the present application provide a cluster management system 6, which can be applied to Figures 1 to 4 In the corresponding embodiment, refer to Fig.15 As shown, the cluster management system 6 at least includes: a cluster 61, a server node 62 and one or more proxy nodes 63 including a first proxy node; wherein:

[0267] The server node 62 is used to implement the following for the cluster 61: Figure 1 , 3 ~4 or Figures 2 to 4 The cluster management method provided by the corresponding embodiment will not be described in detail here;

[0268] The first proxy node is used to implement the following for cluster 61: Figure 1 , 3 ~4 or Figures 2 to 4 The cluster management method provided by the corresponding embodiment will not be described in detail here.

[0269] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium, which stores one or more cluster management methods. The one or more cluster management methods can be executed by one or more processors to implement the following. Figures 1 to 7 or Figures 2 to 7 The cluster management method provided by the corresponding embodiment will not be described in detail here.

[0270] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement reference Figures 1 to 7 ,or Figures 2 to 7 The implementation process of the method provided in the corresponding embodiment will not be repeated here.

[0271] It should be noted that, in this article, the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0272] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0273] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, ..., an air conditioner, or a network communication link device, etc.) to execute the methods described in each embodiment of the present application.

[0274] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0275] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0276] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0277] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application. < / xclusterid>

Claims

1. A cluster management method, characterized in that: The method is applied to a server node, and the method comprises: Receive online event information reported by a first proxy node; wherein the first proxy node runs in a first cluster node and is used to perform node management on the first cluster node, and the online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation; Based on the online event information, determine the working role of the first proxy node; wherein the working role is a master node or a slave node; Sending first indication information to the first proxy node; wherein the indication information is used to instruct the first proxy node to perform an operation corresponding to the work role.

2. The method according to claim 1, characterized in that The determining the working role of the first proxy node based on the online event information includes: A finite state machine FSM is used to calculate the online event information to determine the working role of the first proxy node.

3. The method according to claim 1, characterized in that After sending the indication information to the first proxy node, the method further includes: If the fault notification information sent by the first proxy node is received, based on the fault notification information, determining the current working role of the fault proxy node indicated in the fault notification information; wherein the fault proxy node is the first proxy node or a second proxy node sensed by the first proxy node, and the second cluster node running the second proxy node belongs to the same cluster as the first cluster node; Based on the current working role, determining a management operation corresponding to the faulty proxy node; The management operation is performed.

4. The method according to claim 3, characterized in that: The determining, based on the current working role, a management operation corresponding to the faulty proxy node includes: If the current working role is the master node, a finite state machine FSM is used to calculate at least one third proxy node currently managed in a working state to determine a fourth proxy node used as the master node; wherein the second cluster node and the cluster node running the fourth proxy node belong to the same cluster; Sending second indication information to the fourth proxy node; wherein the second indication information is used to instruct the fourth proxy node to perform the master node function.

5. The method according to claim 4, characterized in that If the current working role is the master node, after calculating at least one third proxy node currently managed in a working state using a finite state machine FSM and determining a fourth proxy node used as the master node, the method further includes: Based on the network information of the fourth proxy node, the routing configuration of the reverse proxy is modified so that the access request sent to the faulty proxy node is subsequently forwarded to the fourth proxy node.

6. The method according to claim 3, characterized in that The method further comprises: Generate fault prompt information that the fault cluster node corresponding to the fault proxy node has a fault; The fault prompt information is output.

7. The method according to claim 1, characterized in that The method further comprises: Acquire user feature configuration information of the first cluster node; The user feature configuration information is sent to the first proxy node, so that the first proxy node accesses the first cluster node based on the user feature configuration information.

8. A cluster management method, characterized in that: The method is applied to a first proxy node running in a first cluster node, and the method comprises: If the first proxy node is running for the first time, determining online event information; Sending the online event information to the server node; Receiving first indication information sent by the server node; wherein the first indication information is generated by the server node based on the online event information; Based on the first indication information, resource information of the first cluster node is called to implement a function corresponding to the work role indicated by the first indication information.

9. A first cluster management device, characterized in that: The device is applied to a server node, and comprises: a first receiving unit, a first determining unit and a first sending unit; wherein: The first receiving unit is used to receive online event information reported by the first proxy node; wherein the first proxy node runs in the first cluster node and is used to perform node management on the first cluster node, and the online event information includes attribute characteristic parameters of the first cluster node perceived by the first proxy node during operation; The first determining unit is used to determine the working role of the first proxy node based on the online event information; wherein the working role is a master node or a slave node; The first sending unit is used to send first indication information to the first proxy node; wherein the indication information is used to instruct the first proxy node to perform an operation corresponding to the work role.

10. A second cluster management device, characterized in that: The device is applied to a first proxy node, and is characterized in that the device comprises: a second determining unit, a second sending unit, a second receiving unit and a calling unit; wherein: The second determining unit is configured to determine online event information when the first proxy node is running for the first time; The second sending unit is used to send the online event information to the server node; The second receiving unit is configured to receive first indication information sent by the server node; wherein the first indication information is generated by the server node based on the online event information; The calling unit is configured to call the resource information of the first cluster node based on the first indication information to implement a function corresponding to the work role indicated by the first indication information.

11. A cluster management system, characterized in that: The system at least includes: a cluster, a server node and one or more proxy nodes including a first proxy node; wherein: The server node is used to implement the steps of the cluster management method described in any one of claims 1 to 7 for managing a cluster; The first proxy node is used to implement the steps of any one of the cluster management methods described in claim 8 for managing a cluster.

12. A storage medium, characterized in that: The storage medium stores a cluster management program, and when the cluster management program is executed by the processor, the steps of the cluster management method according to any one of claims 1 to 7 or claim 8 are implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the cluster management method according to any one of claims 1 to 7 or claim 8.