High-availability optimization method of server cluster and server
Actively acquiring and disseminating server status through the data processing unit, combined with the power-off protection circuit, solves the problem of time-consuming server cluster fault detection in the existing technology, and improves the high availability and stability of the server cluster.
Patent Information
- Application Number
- CN202410742912.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-10-15
AI Technical Summary
In existing server clusters, it takes a long time to detect faulty servers through heartbeat packets, resulting in poor timeliness of fault detection and affecting overall stability.
The data processing unit is used to actively obtain server status data, determine the running status and send messages to other servers to avoid sending heartbeat packets, update the cluster status in real time, and use power-off protection circuits to ensure uninterrupted power supply to the data processing unit.
It shortens the server running status detection time, improves the timeliness and accuracy of fault detection, ensures the high availability and stability of the server cluster, and improves the user experience.
Smart Images

Figure CN118784455A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a high-availability optimization method and a server for a server cluster. Background Art
[0002] With the rapid development of information technology, server clusters have become the core support system of all walks of life. Server clusters are composed of multiple servers, which work together to provide high availability, high performance and scalability services. However, as the scale of the cluster expands, how to effectively monitor the operating status of each server in the server cluster has become an urgent problem to be solved.
[0003] In the related art, each server in a server cluster sends heartbeat packets to each other through communication protocols such as Internet Control Message Protocol (ICMP), Transmission Control Protocol (TCP), and User Datagram Protocol (UDP) to detect the operating status of the other server.
[0004] However, this detection method is time-consuming, so that other servers in the server cluster cannot detect the faulty server in time, and the server cluster has poor timeliness in detecting the running status of each server, which in turn affects the stability of the entire server cluster. Summary of the invention
[0005] The embodiments of the present application provide a high availability optimization method and a server for a server cluster, which can improve the high availability of the server cluster.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a high-availability optimization method for a server cluster is provided, which is applied to a first server, wherein the first server includes a data processing unit and a power-off protection circuit, wherein the power-off protection circuit is electrically connected to the data processing unit, and the power-off protection circuit is used to supply power to the data processing unit when the first server loses power, and the high-availability optimization method is executed by the data processing unit; the method includes: obtaining status data of the first server; the first server is any server in the server cluster; based on the status data, determining a first status message, wherein the first status message is used to characterize the operating status of the first server; and sending the first status message to a second server, wherein the second server is a server other than the first server in the server cluster.
[0008] In this solution, the data processing unit determines the running status of the first server through the status data of the first server, and then sends a message indicating the running status to other servers in the server cluster. The high-availability optimization method provided by the embodiment of the present application is that the data processing unit actively obtains the status data of the first server, determines the running status of the first server, and notifies other servers, so that after the other servers learn that the first server has failed, they avoid communication with the failed first server, update the server cluster status information stored in each of them in real time, maintain the consistency of the server cluster status, save the time of sending heartbeat packets to the target server and the time of the target server responding to the heartbeat packets, thereby shortening the detection time of the running status of the first server and improving the high availability of the server cluster. When the first server fails, the second server, such as the management server, can take corresponding measures according to the received running status of the first server, provide a basis for isolating the failed server as soon as possible, and migrate the business carried by the failed server as soon as possible, improve the stability of the server cluster, and enhance the user experience. In addition, the power-off protection circuit will provide an uninterrupted power supply for the data processing unit, ensuring that the data processing unit can continue to operate, avoiding the situation where the data processing unit is unable to continuously monitor the operating status of the first server due to power outages, and improving the reliability of the data processing unit's monitoring of the first server.
[0009] In one possible implementation, the status data includes at least one of power status data, network status data, hardware status data, and operating system status data. Based on the status data, a first status message is determined, including: determining fault messages corresponding to each type of status data, the fault messages are used to characterize whether various types of faults occur on the first server; the type of status data corresponds to the fault type; and determining the first status message based on each fault message.
[0010] In this implementation, by analyzing multiple types of status data, the data processing unit can more accurately identify the fault type of the first server, thereby determining the first status message of the first server according to the determined fault type, thereby improving the accuracy of monitoring the operating status of each server in the server cluster. At the same time, when the data processing unit receives the first status message of other servers, it can locate the cause of the fault in a timely manner when other servers fail, provide a basis for the server cluster to take repair measures, simplify the troubleshooting process, and shorten the fault recovery time.
[0011] In one possible implementation, a fault message includes a field name and a field identifier corresponding to the field name; the field name is used to characterize the fault type; the field identifier is used to characterize whether a fault of the fault type has occurred; the fault message corresponding to each type of status data is determined, including: if the first type of status data is abnormal, the field identifier corresponding to the first field name in the fault message is determined as the first field identifier; if the first type of status data is normal, the field identifier corresponding to the first field name in the fault message is determined as the second field identifier; the first type of status data is any type of status data in the status data.
[0012] In one possible implementation, the fault message is a fault identifier, which is used to characterize whether a fault occurs on the first server; the fault messages corresponding to each type of status data are determined, including: if the first type of status data is abnormal, then the fault identifier corresponding to the first type of status data is determined to be the first fault identifier; if the first type of status data is normal, then the fault identifier corresponding to the first type of status data is determined to be the second fault identifier; the first type of status data is any type of status data.
[0013] In a possible implementation, determining the first status message based on each fault message includes: merging each fault message in a preset order to obtain the first status message; the preset order is determined according to the fault type indicated by each fault message.
[0014] In this implementation, by merging the fault messages, the first status message can fully reflect the operating status of the first server, avoiding the dispersion of fault messages, improving the readability of the first status message and the processing efficiency of the first status message by other servers. At the same time, the first status message is merged in the order of fault types. When other servers receive the first status message of the first server, they can accurately determine the type of fault that has occurred in the first server based on the fault identifier and the order of the fault identifiers in the first status message, provide a basis for other servers to take repair measures, simplify the troubleshooting process, and shorten the fault recovery time.
[0015] In a possible implementation, the method further includes: receiving a second status message corresponding to a second server, where the second server is any server other than the first server in the server cluster; and determining an operating status of the second server based on the second status message.
[0016] In one possible implementation, the second status message includes at least one field name and at least one field identifier corresponding to the field name; the field name is used to characterize the fault type; the field identifier is used to characterize whether a fault of the fault type occurs on the second server; determining the operating status of the second server based on the second status message includes: determining a target field name among the field names in the second status message, the field identifier corresponding to the target field name characterizing that a fault has occurred on the second server; based on the target field name, determining that a fault of the fault type corresponding to the target field name occurs on the second server.
[0017] In this implementation, the field names in the fault message enable the fault message to be expressed more accurately. Through the field names and field identifiers in the fault message, the first server can quickly and clearly identify the type of fault that occurred in the second server, so that it can quickly adjust its own network configuration or communication strategy, trigger the corresponding fault handling mechanism, reduce the fault response time of the server cluster, and improve fault handling efficiency.
[0018] In one possible implementation, the second status message includes at least one fault identifier combined in a preset order; the fault identifier is used to indicate whether various types of faults occur in the second server; the preset order is determined according to the fault types represented by each fault identifier; determining the operating status of the second server based on the second status message includes: determining a target fault identifier among the fault identifiers in the second status message, the target fault identifier indicating that a fault has occurred in the second server; determining the fault type of the second server based on the order of the target fault identifiers in the second status message, and determining the fault type of the second server.
[0019] In this implementation, a unified and standard fault identifier is determined based on whether the status data is normal. The first server can intuitively and quickly determine whether the second server has a fault, reducing the complexity of status message data processing and transmission, and shortening the fault identification time of the first server for the second server.
[0020] In one possible implementation, the first server provides power to the data processing unit through a preset port, the status data includes power status data, and obtaining the status data of the first server includes: obtaining a power supply signal from the preset port, the power supply signal being used to indicate whether the first server supplies power to the data processing unit normally; and using the power supply signal as the power status data.
[0021] In this implementation, the first server supplies power to the data processing unit through a preset port, and directly uses the power supply signal as the power status data of the first server, thereby simplifying the process of obtaining the power status data. By real-time monitoring of the power supply signal of the preset port, the power supply failure of the first server can be discovered in time, thereby enhancing the reliability of the first server.
[0022] In one possible implementation, the status data includes network status data, hardware status data, and operating system status data, and obtaining the status data of the first server includes: sending a first request to an operating system agent in the first server; the first request is used to obtain any one of the network status data, hardware status data, and operating system status data of the first server; and receiving the status data of the operating system agent.
[0023] In a possible implementation, the management server of the server cluster isolates the server in the faulty state, and migrates the services carried by the server in the faulty state to the server in the normal state.
[0024] In this implementation, the management server in the server cluster isolates the faulty server to prevent the fault from spreading to other servers in the cluster, protecting other normally operating servers in the server cluster from being affected. At the same time, the services carried by the server in a faulty state are migrated to the normally operating servers to ensure business continuity, avoid service interruptions caused by server failures, and improve the reliability of the server cluster.
[0025] In the second aspect, a high-availability optimization device for a server cluster is provided, which is applied to a data processing unit of a first server, and the first server also includes a power-off protection circuit, which is electrically connected to the data processing unit. The device includes: a functional unit for executing any one of the methods provided in the first aspect, and the actions performed by each functional unit are implemented by hardware or by hardware executing corresponding software. For example, the high-availability optimization device for a server cluster may include: an acquisition module, a first determination module, and a sending module; the acquisition module is used to acquire the status data of the first server; the first server is any server in the server cluster; the first determination module is used to determine a first status message based on the status data, and the first status message is used to characterize the operating status of the first server; the sending module is used to send the first status message to the second server, and the second server is a server other than the first server in the server cluster.
[0026] In a third aspect, a server is provided, comprising: a data processing unit and a power-off protection circuit, wherein the data processing unit is electrically connected to the power-off protection circuit, and the data processing unit is used to implement any one of the methods provided in the first aspect.
[0027] In a fourth aspect, a server cluster is provided, comprising a plurality of servers, each server comprising a data processing unit and a power-off protection circuit, the data processing unit being connected to the power-off protection circuit, and the data processing unit being used to implement any one of the methods provided in the first aspect.
[0028] In a fifth aspect, a chip is provided, the chip comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any one of the methods provided in the first aspect above.
[0029] In a sixth aspect, a computer-readable storage medium is provided, which stores computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes any one of the methods provided in the first aspect.
[0030] In a seventh aspect, a computer program product is provided, comprising computer execution instructions, which, when executed on a computer, enable the computer to execute any one of the methods provided in the first aspect.
[0031] Among them, the technical effects brought about by any implementation method in the second to seventh aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 An application scenario diagram of a high availability optimization method for a server cluster provided in an embodiment of the present application;
[0033] Figure 2 A system architecture diagram of a server cluster provided in an embodiment of the present application;
[0034] Figure 3 A system architecture diagram of another server cluster provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0036] Figure 5 A flowchart of a high availability optimization method for a server cluster provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of obtaining status data provided in an embodiment of the present application;
[0038] Figure 7 Schematic diagram of integrated fault message provided in an embodiment of the present application
[0039] Figure 8 A flowchart for determining the operating status of a second server provided in an embodiment of the present application;
[0040] Fig. 9 A schematic diagram of a high-availability optimization device for a server cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0042] In the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship between associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0043] Furthermore, in the description of the present application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0044] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0045] The following is an introduction to the terms involved in the embodiments of the present application.
[0046] High availability (HA) capability: refers to the ability of a server cluster to keep the services carried by some servers available in the event of server failure or maintenance through redundant design, automatic failover and other technologies.
[0047] Power outage protection device: also known as power outage protection circuit (such as when integrated in the server provided in the embodiment of the present application), refers to a device used to protect the data processing unit from the adverse effects of sudden power outages. Such devices usually include uninterruptible power supplies and various types of power filters and power regulators to provide a stable power supply to prevent voltage surges, voltage fluctuations and continuous power outages from damaging the data processing unit.
[0048] Data processing unit: refers to a hardware unit used to process data, usually with programmable capabilities, used to perform various calculations, logic and data transfer operations. Data processing units can cover a variety of devices and systems, including processors, specialized data processors, software modules that can process data, etc.
[0049] Virtualization platform: A software or hardware environment used to create and manage virtual machines (VMs). A virtual machine is a complete computer system simulated on physical hardware. Through virtualization technology, a virtual machine divides an independent execution environment on a physical server, so that each virtual machine can run and operate like an independent physical machine.
[0050] Hyperconverged infrastructure (HCI) is an Internet technology (IT) infrastructure platform that integrates computing, storage, networking and virtualization functions to simplify the deployment, management and maintenance of data center infrastructure. Compared with traditional data center architecture based on separate hardware, HCI provides a more compact and easier to manage solution, providing users with integrated hardware and software solutions that can better meet the needs of data centers, reduce complexity, and improve flexibility and efficiency.
[0051] Fencing: is a system-level security mechanism used to isolate faulty servers from a server cluster to prevent the faulty server from affecting the entire server cluster.
[0052] Recovery: refers to the process of restoring the business carried by a server in a server cluster after a server fails. In this process, the server cluster will try to transfer the business carried by the failed server to other servers to restore the server cluster to normal working state.
[0053] The following is an illustrative introduction to the application scenarios of the embodiments of the present application.
[0054] When high availability is applied to server clusters (such as hyper-converged infrastructure or virtualization platform scenarios), when a server in the server cluster fails, the server cluster will isolate the failed server and migrate the virtual machines or other workloads carried by the failed server to other servers, thereby ensuring the continuity and reliability of the server cluster business. After the server is detected to be normal, the virtual machines or other workloads carried by the server will be restored. In addition, server clusters with high availability can give full play to virtualization to a certain extent, reduce the frequency of emergency maintenance due to failures, and thus reduce the maintenance cost of the server cluster.
[0055] like Figure 1 As shown, the server cluster includes three servers. When server 1 is detected to have a fault, the server cluster will force server 1 to shut down, and at the same time migrate VM-A carried by server 1 to server 3, and migrate VM-B to server 2, to avoid service interruption caused by the failure of server 1.
[0056] The embodiment of the present application provides a high-availability optimization method for a server cluster, which is applied to the data processing unit of the server. In this scenario, the data processing unit determines the operating state of the target server through the state data of the target server obtained, and then sends a message indicating the operating state to other servers in the server cluster. The high-availability optimization method provided by the embodiment of the present application is that the data processing unit actively obtains the state data of the target server, determines the operating state of the target server, and notifies other servers, so that after the other servers learn that the target server fails, they avoid communication with the failed target server, update the server cluster state information stored in each of them in real time, maintain the consistency of the server cluster state, save the time of sending a heartbeat packet to the target server and the time of the target server responding to the heartbeat packet, thereby shortening the detection time of the operating state of the target server. When the target server fails, the management server in the server cluster can take corresponding measures according to the operating state of the received target server, provide a basis for isolating the failed server as soon as possible, and migrate the business carried by the failed server as soon as possible, improve the stability of the server cluster, and enhance the user experience.
[0057] In some embodiments, in the high-availability optimization method provided by the embodiment of the present application, the data processing unit first obtains the status data of the first server; the first server is any server in the server cluster. Then, based on the status data of the first server, a first status message is determined, and the first status message is used to characterize the operating status of the first server. Finally, the first status message is sent to other servers other than the first server in the server cluster, so that other servers can perceive the operating status of the first server based on the first status message. After learning that the target server has failed, other servers can not only avoid communicating with the failed target server, but also update the server cluster status messages stored in their respective internal servers in real time, maintain the consistency of the server cluster status, and ensure the stability and reliability of the server cluster. The high-availability optimization method provided by the embodiment of the present application shortens the monitoring time of the server and improves the monitoring efficiency.
[0058] The embodiment of the present application also provides a server cluster. Below, the system architecture of the server cluster in the embodiment of the present application is exemplarily introduced.
[0059] The server cluster includes a plurality of servers. Each server includes a data processing unit and a power-off protection circuit. The server provides power to the data processing unit through a peripheral component interconnect (PCI) interface. The data processing unit is used to monitor the operating status of the server. The power-off protection circuit is used to provide an uninterruptible power supply to the data processing unit in the event of a power failure in the data processing unit. This helps to avoid the situation where the data processing unit is unable to continuously monitor the operating status of the server due to power outages, thereby improving the reliability of the data processing unit's monitoring of the server.
[0060] In a possible implementation, for each server in the server cluster, a power-off protection circuit may be deployed on a data processing unit, such as Figure 2 Of course, the power-off protection circuit can also be deployed in the server separately from the data processing unit, such as Figure 3 In the following embodiments, when the power supply status of the server is normal, the server supplies power to the data processing unit through the PCI interface. When the power supply status of the server is abnormal, the data processing unit cannot be supplied with power through the PCI interface. At this time, in order to prevent the data processing unit from losing power, the power-off protection circuit provides an uninterruptible power supply to the data processing unit.
[0061] In a possible implementation, the data processing units in the servers are connected to each other and share the running status of the servers. For example, the servers are connected via switches. Specifically, the connection mode of the data processing units can be serial connection or parallel connection, which is not specifically limited here.
[0062] It should be noted that the data processing unit can also be deployed separately from the server and used as a separate device to monitor the running status of the server. In the following embodiments, the data processing unit is used as a part of the server as an example to illustrate the high availability optimization method.
[0063] In the embodiment of the present application, the server may be a physical server, or may be two or more physical servers that share different responsibilities and cooperate with each other to implement various functions of the server.
[0064] Exemplarily, the server may be a blade server, a high-density server, a rack server, a tower server, or the like.
[0065] The hardware part of the server includes a processor, a basic input output system (BIOS) chip, an out-of-band controller, a memory, a data processing unit, and a power-off protection circuit. The software part mainly includes BIOS, an out-of-band management module, an operating system (OS), and an operating system agent (OS agent). Figure 4 shown.
[0066] The processor may include a central processing unit (CPU), which includes one or more CPU cores, and the CPU's data processing operations are all performed by the CPU cores. The more CPU cores included in the CPU, the faster the data processing speed.
[0067] The BIOS chip is a chip installed on the motherboard and used to initialize and detect various hardware during the server startup process. The BIOS chip includes a flash memory area.
[0068] The out-of-band management module is located in the out-of-band controller, and the operating system agent is located in the processor.
[0069] The out-of-band management module can be a management unit of a non-business module. For example, the out-of-band management module can remotely maintain and manage the server through a dedicated data channel. The out-of-band management module is completely independent of the server's operating system and can communicate with the BIOS and operating system agent through the server's out-of-band management interface.
[0070] Exemplarily, the out-of-band management module may include a management unit for the server operating status, a management system in a management chip, a server motherboard management unit (baseboard management controller, BMC), a system management module (system management mode, SMM), etc. It should be noted that the embodiments of the present application do not limit the specific form of the out-of-band management module, and the above is only an exemplary description. In the following embodiments, only the out-of-band management module is used as an example for description. In the following embodiments, the BMC is used to obtain the status data of the server.
[0071] OS is a computer program that manages and controls the hardware and software resources of the server. Any other software must be supported by the operating system to run. After the server is powered on, the BIOS first starts a series of operations such as self-test and initialization, and then guides the OS to start, so that users can use the server normally.
[0072] Among them, the operating system agent is a software program running in the server, which acts as an intermediate layer between the OS and other applications in the server. Its main function is to manage and coordinate the resources of the server and provide services and interfaces for other applications. The operating system agent can provide a variety of functions, including process management, memory management, file system management, device driver management, etc. In the following embodiments, the operating system agent is used to obtain the status data of the server. Exemplarily, the data processing unit obtains the status data through the automatic health monitoring mechanism in the operating system agent. Among them, the automatic health monitoring mechanism realizes real-time monitoring of the health status of the operating system by regularly collecting various data related to the operating system (such as process status, etc.), thereby ensuring the stability and reliability of the operating system.
[0073] BIOS is a set of programs that are fixed on the BIOS chip on the motherboard of the server. The main function of BIOS is to provide the lowest-level and most direct hardware settings and controls for the server.
[0074] Memory, also called internal memory or main memory, is installed in memory slots on the server's motherboard.
[0075] It should be noted that the embodiments of the present application do not limit the device form of the server.
[0076] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0077] For ease of understanding, the high availability optimization method for the server cluster provided in the present application is exemplarily introduced below with reference to the accompanying drawings.
[0078] The following embodiments of the present application will be divided into three parts to exemplarily introduce the solutions of the high availability optimization method of the server cluster.
[0079] Part I: Combination Figure 5 , Figure 6 , introduces the high availability optimization method provided by the embodiment of the present application, aiming to introduce the overall process of the high availability optimization method of the server cluster.
[0080] Part II: Combination Figure 7 , introduces the high availability optimization method provided in the embodiment of the present application, aiming to introduce the implementation method of determining the fault message corresponding to various types of status data.
[0081] Part III: Combination Figure 8 , introduces the high availability optimization method provided in an embodiment of the present application, aiming to introduce an implementation method for determining the operating status of the second server based on the second status message corresponding to the received second server.
[0082] Figure 5 1 is a flow chart of a method for optimizing the high availability of a server cluster according to an exemplary embodiment. Exemplarily, the method includes the following S501-S503. The execution subject of the method is the data processing unit mentioned in the above embodiment, such as Figure 3 The data processing unit in the embodiment of the present application is described below by taking the data processing unit as an example of the execution subject of the high availability optimization method.
[0083] S501: The data processing unit obtains status data of the first server.
[0084] The first server is any server in the server cluster.
[0085] In a possible implementation, the status data includes, but is not limited to, power status data, network status data, hardware status data, and operating system status data.
[0086] In a possible implementation, the power status data reflects the power status of the first server, and whether the power status data is normal or not is directly related to the stable operation of the first server.
[0087] Optionally, when the power status of the first server is normal, the first server supplies power to the data processing unit through a preset port, such as the first server supplies power to the data processing unit through a PCI interface. Therefore, the power supply signal of the PCI port can be used as power status data, wherein the power supply signal can be parameters such as voltage, current, and power. Using the power supply signal directly as the power status data of the first server helps to simplify the process of acquiring the power status data. When the power supply signal corresponding to the first server is abnormal, such as the voltage is too high, the voltage is too low, etc., that is, when the power supply provided by the first server to the data processing unit is abnormal, it can be considered that the power supply of the first server is faulty.
[0088] Optionally, when the first server also includes a power-off protection circuit: when the power supply status of the first server is normal, the first server supplies power to the data processing unit; when a power supply abnormality occurs in the first server, that is, when the data processing unit is powered off, the power-off protection circuit provides an uninterrupted power supply to the first server, which can be understood as the power-off protection circuit serving as a backup power supply for the data processing unit. From this, it can be seen that the data processing unit can also determine whether the power supply of the first server is normal based on the power supply subject of the data processing unit. If the current power supply subject of the data processing unit is the first server, it indicates that there is no abnormality in the power supply of the first server; if the current power supply subject of the data processing unit is the power-off protection circuit, it is determined that the power supply of the first server is faulty. Therefore, the power supply subject of the data processing unit can also be used as power supply status data.
[0089] Optionally, the data processing unit may obtain the power status data of the first server through the BMC in the first server. Exemplarily, the data processing unit may obtain the power status data by sending a command to the BMC to request the power status of the first server. The power status data includes but is not limited to the voltage value, current value, power value, etc. provided by the power supply in the first server to each component in the first server. Of course, the power status data may also include the temperature of the power supply in the first server. When the temperature is too high, it indicates that the power supply of the first server is abnormal. Exemplarily, after receiving the command, the BMC obtains the power status information by reading the power sensor data in the server.
[0090] In a possible implementation, the network status data reflects the network connection status of the first server, such as the connection status of the network interface, delay, packet loss rate, etc. Whether the network connection status is normal is particularly important for data transmission and synchronization between servers in the server cluster.
[0091] Optionally, the network status data includes but is not limited to management network status data, business network status data and storage network status data. Among them, the management network refers to the network to which the first server is connected based on management needs. The devices in the management network manage the first server by communicating with management components such as BMC. Accordingly, the management network status data reflects the network status of management components such as BMC in the first server, such as whether the interface of BMC is online, etc. The business network refers to the local area network or the Internet to which the first server is connected based on business needs. Accordingly, the business network status data reflects the network status of the first server connected to the local area network or the Internet, and whether normal business can be achieved. The storage network refers to the network where the storage device corresponding to the first server is located. Accordingly, the storage network status data refers to whether the storage device corresponding to the first server is online, whether the storage device connection is stable, etc. It should be noted that the storage device corresponding to the first server can be a memory located in the first server, or it can be an external storage device of the first server.
[0092] Optionally, the data processing unit may obtain the network status data of the first server through an operating system agent (OSagent).
[0093] Exemplarily, the data processing unit sends a request for the network interface status of the first server to the operating system agent, and after receiving the request, the operating system agent remotely logs into the operating system in the first server and checks the network interface status through the ifconfig command. The ifconfig command is used to display the network parameters of the network interface of the first server, such as the number of sent and received data packets, the open and closed status of the interface, etc.
[0094] Optionally, the data processing unit may also monitor the network status of the first server through the BMC to obtain the network status data of the first server. Specifically, the data processing unit sends a request for the network status data of the first server to the BMC, and after receiving the request from the data processing unit, the BMC sends the monitored network status data to the data processing unit.
[0095] Of course, the data processing unit can also obtain the network status data of the first server through the open source tools psutil and pciutils, which is not specifically limited here. Exemplarily, the open source tools psutil and pciutils can be installed on the first server. The data processing unit sends a request for the network status data of the first server to the operating system in the first server by calling the relevant functions in the open source tools psutil and pciutils.
[0096] In a possible implementation, the hardware status data reflects the status of each hardware device in the first server, such as the usage rate of the processor, the occupancy rate of the memory, etc. By monitoring the hardware status data, it is timely discovered whether there is an abnormality in the hardware device in the first server.
[0097] Exemplarily, the data processing unit may acquire the hardware status data of the first server by sending a request for the hardware status data of the first server to the BMC or the operating system agent.
[0098] In a possible implementation, the operating system status data reflects the running status of the operating system in the first server, including but not limited to process status, system resource usage, error logs, etc.
[0099] Exemplarily, the data processing unit sends an instruction to the operating system agent to obtain the operating system status data of the first server, so that the operating system agent starts the automatic health monitoring mechanism and collects the operating system status data at a set frequency (such as every second). In addition, the data processing unit can also obtain the operating system status data through the open source tool psutil, which is similar to the above-mentioned acquisition of network status data, and is not repeated here.
[0100] Figure 6 The schematic diagram is a diagram of a data processing unit obtaining status data through a BMC and an operating system agent. The data processing unit sends a request to obtain status data to the BMC and the operating system agent. After receiving the request, the BMC and the operating system agent send the obtained status data to the data processing unit. The data processing unit determines the operating status of the first server based on various status data.
[0101] S502: Based on the status data, the data processing unit determines a first status message.
[0102] The first status message is used to represent the running status of the first server.
[0103] In a possible implementation, the operating state of the first server includes but is not limited to a normal state and a fault state.
[0104] Exemplarily, when the running state of the first server is a fault state, the first state information also includes the fault type of the first server.
[0105] In a possible implementation, the status data includes at least one of power status data, network status data, hardware status data and operating system status data. The above S502 includes the following S502a and S502b.
[0106] S502a: The data processing unit determines the fault message corresponding to each type of status data.
[0107] The fault message is used to indicate whether a fault of various fault types occurs on the first server; the type of the status data corresponds to the fault type.
[0108] In one possible implementation, when the status data is power status data, the corresponding fault type is power failure; when the status data is network status data, the corresponding fault type is network failure; when the status data is hardware status data, the corresponding fault type is hardware failure; when the status data is operating system status data, the corresponding fault type is operating system failure.
[0109] In a possible implementation, the fault message is represented by an identifier, and two identifiers may be defined to correspond to whether a fault occurs on the first server.
[0110] Optionally, the identifier includes a first fault identifier and a second fault identifier. Wherein, when the status data of the first server is abnormal, it can be understood that the first server is faulty, and the first fault identifier is used to indicate the fault message. When the status data of the first server is abnormal, it can be understood that the first server is not faulty, and the second fault identifier is used to indicate the fault message.
[0111] Exemplarily, the first fault flag is set to 1, and the second fault flag is set to 0. When the state data of the first server is abnormal, the flag corresponding to the fault message is set to 1; when the state data of the first server is not abnormal, the flag corresponding to the fault message is set to 0.
[0112] S502b: Determine a first status message based on each fault message.
[0113] In a possible implementation, the fault messages corresponding to various types of status data may be merged to obtain a first status message.
[0114] Optionally, when the fault message is represented by an identifier, the identifiers corresponding to various types of status data may be combined to obtain a first status message.
[0115] Exemplarily, identifiers corresponding to various types of status data are concatenated in sequence to obtain a first status message.
[0116] Exemplarily, when the status data is normal, the identifier corresponding to the status data is set to 0; when the status data is abnormal, the identifier corresponding to the status data is set to 1. In the case where the status data includes power status data, network status data, hardware status data, and operating system status data, when the power status data of the first server is abnormal, and the other three types of status data are normal, the identifier corresponding to the power status data is 1, and the identifiers corresponding to the other status data are 0. The identifiers corresponding to the four types of status data are combined, and the first status message can be any one of 1000, 0100, 0010, and 0001.
[0117] In the above S502a and S502b, by analyzing multiple types of status data, the data processing unit can more accurately identify the fault type of the first server, thereby determining the first status message of the first server according to the determined fault type, thereby improving the accuracy of monitoring the operating status of each server in the server cluster. At the same time, when the data processing unit receives the first status message of other servers, it can locate the cause of the fault in time when other servers fail, provide a basis for the server cluster to take repair measures, simplify the troubleshooting process, and shorten the fault recovery time.
[0118] S503: The data processing unit sends the first status message to the second server.
[0119] The second server is another server other than the first server in the server cluster. It can be understood that there may be one or more second servers, that is, the data processing unit may send the first status message to one or more second servers.
[0120] by Figure 3 Taking data processing unit 1 in the example, after determining the first status message of server 1, data processing unit 1 will send the first status message of server 1 to data processing unit 2 to data processing unit n, and data processing unit 2 will send the first status message of server 1 to server 2...data processing unit n will send the first status message of server 1 to server n. At this time, servers 2 to server n in the server cluster will all obtain the operating status of the target server.
[0121] In this way, after learning that the target server has failed, other servers can not only avoid communicating with the failed target server, but also update their own internally stored server cluster status messages in real time to maintain the consistency of the server cluster status and ensure the stability and reliability of the server cluster.
[0122] In one possible implementation, when the management server in the server cluster finds that the first server has failed, the first server can be isolated, that is, forced to shut down, to prevent data corruption and brain split problems. At the same time, the business carried by the first server can be switched to a normally operating server in the server cluster to ensure the normal operation of the business carried by the first server.
[0123] It should be noted that when the first server is a management server, in the event of a failure of the management server, other servers in the server cluster will re-elect a new management server, which will take over the management of the server cluster to ensure cluster stability and business continuity.
[0124] Based on the above, the data processing unit determines the operating status of the target server through the status data of the target server obtained, and then sends the message indicating the operating status to other servers in the server cluster. The high-availability optimization method provided by the embodiment of the present application is that the data processing unit actively obtains the status data of the target server, determines the operating status of the target server, and notifies other servers, so that other servers can avoid communication with the failed target server after learning that the target server has failed, and update the server cluster status information stored in each of them in real time to maintain the consistency of the server cluster status, eliminating the time for sending heartbeat packets to the target server and the time for the target server to respond to the heartbeat packets, thereby shortening the detection time of the operating status of the target server. When the target server fails, the second server such as the management server can take corresponding measures according to the operating status of the received target server, provide a basis for isolating the failed server as soon as possible, and migrate the business carried by the failed server as soon as possible, improve the stability of the server cluster, and enhance the user experience.
[0125] The above is the first part of the embodiment of this application. Figure 7 , describes the implementation method of determining the fault message corresponding to each type of status data.
[0126] In the implementation of the present application, the fault message corresponding to each type of status data is determined, including multiple implementation methods. The following is an exemplary description through method 1 and method 2.
[0127] Mode 1: The fault message includes a field name and a field identifier corresponding to the field name.
[0128] The field name is used to indicate the fault type; the field identifier is used to indicate whether a fault of the fault type occurs.
[0129] In a possible implementation, in the above S502a, if the first type of status data is abnormal, the data processing unit determines the field identifier corresponding to the first field name in the fault message as the first field identifier. If the first type of status data is normal, the data processing unit determines the field identifier corresponding to the first field name in the fault message as the second field identifier.
[0130] The first type of status data is any type of status data.
[0131] In a possible implementation, when the first type of status data is power status data, when the power status data is a power supply signal between the first server and the data processing unit, when the power supply signal does not meet a preset range, the first type of status data is determined to be abnormal. Exemplarily, when the power supply signal is a voltage value, if the voltage value is not within a preset voltage range, the first status data is determined to be abnormal.
[0132] In a possible implementation, when the first type of status data is network status data, the network status data is a log containing a network interface connection status, and when a network interface connection status alarm appears in the log, the first type of status data is determined to be abnormal.
[0133] In a possible implementation, when the first type of status data is hardware status data, the hardware status data is a log containing hardware usage information, and when an alarm appears in the log, the first type of status data is determined to be abnormal.
[0134] In a possible implementation, when the first type of status data is operating system status data, if the automatic health monitoring mechanism in the operating system agent detects that the operating system log is abnormal, the first type of status data is determined to be abnormal.
[0135] In the above S502b, the data processing unit integrates the fault message including the field name and the field identifier to obtain a first status message. Figure 7 is a schematic diagram of the integrated fault message. Figure 7 It contains n field names and the field identifier corresponding to each field name.
[0136] Exemplarily, when the status data is normal, the field identifier corresponding to the status data is set to 0; when the status data is abnormal, the field identifier corresponding to the status data is set to 1. The data format of the first status message may be as shown in Table 1.
[0137] Table 1
[0138] Field Name Field Tags power supply 1 Managing the network 0 Business Network 0 Storage Network 0 hardware 1 operating system 0
[0139] From Table 1, it can be seen that in the first status message, the field names included are power supply, management network, business network, storage network, hardware and operating system. Among them, the first server has a power failure and a hardware failure, so the field identifier of the power supply and the field identifier of the hardware are both 1.
[0140] In a possible implementation, the field identifier in the first status message may also include time, running status, and an identity document (ID) of the first server in the server cluster.
[0141] Table 2
[0142] Field Name Field Tags time 2024-04-11 Running status Fault ID 1 power supply 1 Managing the network 0 Business Network 0 Storage Network 0 hardware 1 operating system 0
[0143] It can be seen from Table 2 that at 2024-04-11, the operating status of server 1 is a faulty status, and a power failure and a hardware failure have occurred.
[0144] Mode 2: The fault message is a fault identifier.
[0145] The fault identifier is used to indicate whether a fault occurs on the first server.
[0146] In a possible implementation, in the above S502a, if the first type of status data is abnormal, the data processing unit determines the fault identifier corresponding to the first type of status data as the first fault identifier. If the first type of status data is normal, the data processing unit determines the fault identifier corresponding to the first type of status data as the second fault identifier.
[0147] The first type of status data is any type of status data.
[0148] In the above S502b, the data processing unit merges the fault messages according to a preset order to obtain a first status message.
[0149] The preset order is determined according to the fault type indicated by each fault message.
[0150] Exemplarily, when the status data is normal, the fault flag corresponding to the status data is set to 0; when the status data is abnormal, the fault flag corresponding to the status data is set to 1, and each fault message is sorted in the order of power supply, network, hardware, and operating system. If the data processing unit detects that a hardware fault occurs in the first server, the first status message of the first server is set to 0010.
[0151] In mode 2, compared with mode 1, the first status message only includes a unified and standard fault identification determined according to whether the status data is normal, thereby reducing the complexity of the first status message in data processing and transmission.
[0152] The above is the second part of the embodiment of this application. Figure 8 , introduces an implementation method for determining the operating status of the second server based on a received second status message corresponding to the second server.
[0153] In an embodiment of the present application, a server cluster includes a plurality of servers. Each server includes its own data processing unit. Each data processing unit is used to monitor the operating status of the server corresponding to the data processing unit, determine the status message of the corresponding server, and send the status message to the data processing units corresponding to other servers. When the data processing unit receives the status message sent by the data processing units corresponding to other servers, it can also judge the operating status of other servers according to the received status message.
[0154] Figure 8 The flowchart of a data processing unit in a first server determining the running state of a second server according to an exemplary embodiment is shown. Exemplarily, the method includes the following S801-S802.
[0155] S801: A data processing unit in a first server receives a second status message corresponding to a second server.
[0156] The second server is any server other than the first server in the server cluster.
[0157] S802: The data processing unit in the first server determines the operating status of the second server based on the second status message.
[0158] In the implementation of the present application, the operating state of the second server is determined based on the second state message, including multiple implementation methods, which are exemplified below by methods a and b. Among them, the second state message in method a is obtained through the fault message in the above method 1, and the second state message in method b is obtained through the fault message in the above method 2.
[0159] Mode a: The second status message includes at least one field name and at least one field identifier corresponding to the field name. The field name is used to indicate the fault type. The field identifier is used to indicate whether a fault of the fault type occurs on the second server.
[0160] In the above S802, the following S802a-S802b are specifically included.
[0161] S802a: The data processing unit in the first server determines a target field name from among the field names in the second status message.
[0162] The field identifier corresponding to the target field name indicates that a failure has occurred in the second server.
[0163] S802b: The data processing unit in the first server determines, based on the target field name, that a fault of a fault type corresponding to the target field name occurs in the second server.
[0164] Exemplarily, in the second status message, the field names included are power supply, management network, business network, storage network, hardware, and operating system. When the status data is normal, the field identifier corresponding to the status data is set to 0; when the status data is abnormal, the field identifier corresponding to the status data is set to 1. When the data processing unit of the first server receives the second status message shown in Table 1, the data processing unit of the first server can obtain the target field name with the field identifier of 1, namely, power supply and hardware, and further, it can be determined that the second server has a power failure and a hardware failure.
[0165] In an embodiment of the present application, the field names in the fault message enable the fault message to be expressed more accurately. Through the field names and field identifiers in the fault message, the first server can quickly and clearly identify the type of fault that occurred in the second server, so that it can quickly adjust its own network configuration or communication strategy, trigger the corresponding fault handling mechanism, reduce the fault response time of the server cluster, and improve fault handling efficiency.
[0166] Mode b: The second status message includes at least one fault identifier combined in a preset order. The fault identifier is used to indicate whether a fault of various fault types occurs on the second server. The preset order is determined according to the fault type indicated by each fault identifier.
[0167] In the above S802, the following steps are specifically included.
[0168] First, the data processing unit in the first server determines a target fault identifier among the fault identifiers in the second status message.
[0169] The target fault identifier indicates that a fault occurs on the second server.
[0170] Then, the data processing unit in the first server determines the fault type of the second server based on the order of the target fault identifiers in the second status message, and determines that a fault of the fault type occurs in the second server.
[0171] For example, when the status data is normal, the fault flag corresponding to the status data is set to 0; when the status data is abnormal, the fault flag corresponding to the status data is set to 1, and each fault message is sorted in the order of power supply, network, hardware, and operating system. If the data processing unit of the first server receives the second status message as 0010, it can be determined that the status data at the third position in the second status message is abnormal, and the fault type corresponding to the third position is used as the fault type of the second server.
[0172] In an embodiment of the present application, a unified and standard fault identifier is determined based on whether the status data is normal, and the first server can intuitively and quickly determine whether a fault occurs in the second server, thereby reducing the complexity of status message data processing and transmission, and shortening the fault identification time of the first server for the second server.
[0173] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the high-availability optimization device of the server cluster includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0174] The embodiment of the present application can divide the functional modules of the high-availability optimization device of the server cluster according to the above method. For example, the high-availability optimization device of the server cluster can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0175] For example, Fig. 9A possible structural diagram of the high-availability optimization device of the server cluster involved in the above embodiment is shown, and the high-availability optimization device of the server cluster is applied to the data processing unit of the first server, and the first server includes the data processing unit and the power-off protection circuit, and the power-off protection circuit is electrically connected to the data processing unit. The device includes: an acquisition module 901, a first determination module 902 and a sending module 903; the acquisition module 901 is used to obtain the status data of the first server; the first server is any server in the server cluster; the first determination module 902 is used to determine the first status message based on the status data, and the first status message is used to characterize the running status of the first server; the sending module 903 is used to send the first status message to the second server, and the second server is a server other than the first server in the server cluster.
[0176] Optionally, the status data includes at least one of power status data, network status data, hardware status data and operating system status data. The first determination module 902 is specifically used to: determine the fault messages corresponding to the various types of status data, the fault messages are used to characterize whether various types of faults occur in the first server; the type of status data corresponds to the fault type; based on each fault message, determine the first status message.
[0177] Optionally, the fault message includes a field name and a field identifier corresponding to the field name; the field name is used to characterize the fault type; the field identifier is used to characterize whether a fault of the fault type has occurred. The first determination module 902 is specifically used to: if the first type of status data is abnormal, then the field identifier corresponding to the first field name in the fault message is determined as the first field identifier; if the first type of status data is normal, then the field identifier corresponding to the first field name in the fault message is determined as the second field identifier; the first type of status data is any type of status data in the status data.
[0178] Optionally, the fault message is a fault identifier, which is used to characterize whether a fault occurs in the first server; the first determination module 902 is specifically used to: if the first category of status data is abnormal, determine that the fault identifier corresponding to the first category of status data is the first fault identifier; if the first category of status data is normal, determine that the fault identifier corresponding to the first category of status data is the second fault identifier; the first category of status data is any category of status data.
[0179] Optionally, the first determination module 902 is specifically used to: merge the fault messages according to a preset order to obtain a first status message; the preset order is determined according to the fault type indicated by each fault message.
[0180] Optionally, the device further includes: a receiving module and a second determining module. The receiving module is used to: receive a second status message corresponding to a second server, where the second server is any server other than the first server in the server cluster; and the second determining module is used to: determine the operating status of the second server based on the second status message.
[0181] Optionally, the second status message includes at least one field name and at least one field identifier corresponding to the field name; the field name is used to characterize the fault type; the field identifier is used to characterize whether a fault of the fault type occurs on the second server; the second determination module is specifically used to: determine the target field name among the field names in the second status message, the field identifier corresponding to the target field name characterizing that a fault has occurred on the second server; based on the target field name, determine that a fault of the fault type corresponding to the target field name occurs on the second server.
[0182] Optionally, the second status message includes at least one fault identifier merged in a preset order; the fault identifier is used to indicate whether various types of faults occur on the second server; the preset order is determined according to the fault types represented by each fault identifier; the second determination module is specifically used to: determine a target fault identifier among the fault identifiers in the second status message, the target fault identifier indicating that a fault has occurred on the second server; determine the fault type of the second server based on the order of the target fault identifiers in the second status message, and determine the fault type of the second server.
[0183] Optionally, the first server provides power to the data processing unit through a preset port, and the status data includes power status data. The acquisition module 901 is specifically used to: obtain a power supply signal from the preset port, the power supply signal is used to indicate whether the first server supplies power to the data processing unit normally; and use the power supply signal as power status data.
[0184] Optionally, the status data includes network status data, hardware status data and operating system status data, and the acquisition module 901 is specifically used to: send a first request to the operating system agent in the first server; the first request is used to obtain any one of the network status data, hardware status data and operating system status data of the first server; receive the status data of the operating system agent.
[0185] Optionally, the management server of the server cluster isolates the server in the faulty state, and migrates the business carried by the server in the faulty state to the server in the normal state.
[0186] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any high-availability optimization device for server clusters provided above and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0187] The embodiment of the present application also provides a server, which includes a data processing unit and a power-off protection circuit, the data processing unit is connected to the power-off protection circuit, and the data processing unit is used to implement the high-availability optimization method in the above embodiment. The embodiment of the present application does not impose any restrictions on the specific form of the server. For example, the server can be a physical or logical server, or it can be two or more physical or logical servers that share different responsibilities and cooperate with each other to implement the various functions of the server.
[0188] An embodiment of the present application also provides a server cluster, including multiple servers, each server including a data processing unit and a power-off protection circuit, the data processing unit is connected to the power-off protection circuit, and the data processing unit is used to implement the high-availability optimization method in the above embodiment.
[0189] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on a computer, the computer is enabled to execute any of the methods executed by the data processing units provided above.
[0190] For the explanation of the relevant contents and description of the beneficial effects of any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, which will not be repeated here.
[0191] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned data processing unit. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gatearray, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0192] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that may be integrated with one or more available media. The available media may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0193] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.
[0194] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0195] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0196] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A high availability optimization method for a server cluster, characterized in that: Applied to a first server, the first server includes a data processing unit and a power-off protection circuit, the power-off protection circuit is electrically connected to the data processing unit, the power-off protection circuit is used to supply power to the data processing unit when the first server loses power, the high availability optimization method is executed by the data processing unit, and the method includes: Acquire status data of the first server; the first server is any server in the server cluster; Determine a first status message based on the status data, where the first status message is used to characterize an operating status of the first server; The first status message is sent to a second server, where the second server is another server in the server cluster other than the first server.
2. The high availability optimization method according to claim 1, characterized in that: The state data includes at least one of power state data, network state data, hardware state data, and operating system state data, and determining the first state message based on the state data includes: Determine a fault message corresponding to each type of status data, wherein the fault message is used to indicate whether a fault of each type of fault occurs to the first server; the type of the status data corresponds to the fault type; Based on each of the fault messages, the first status message is determined.
3. The high availability optimization method according to claim 2, characterized in that: The fault message includes a field name and a field identifier corresponding to the field name; the field name is used to characterize the fault type; The field identifier is used to indicate whether a fault of the fault type occurs; the fault message corresponding to each type of status data is determined, including: If the first type of status data is abnormal, determining the field identifier corresponding to the first field name in the fault message as the first field identifier; If the first type of status data is normal, determining the field identifier corresponding to the first field name in the fault message as the second field identifier; The first type of status data is any type of status data.
4. The high availability optimization method according to claim 2, characterized in that: The fault message is a fault identifier, and the fault identifier is used to indicate whether a fault occurs on the first server; The determining of the fault message corresponding to each type of status data includes: If the first type of status data is abnormal, determining that the fault identifier corresponding to the first type of status data is a first fault identifier; If the first type of status data is normal, determining that the fault identifier corresponding to the first type of status data is a second fault identifier; The first type of status data is any type of status data.
5. The high availability optimization method according to claim 4, characterized in that: The determining the first status message based on each of the fault messages includes: The fault messages are combined in a preset order to obtain the first status message; the preset order is determined according to the fault type indicated by each fault message.
6. The high availability optimization method according to any one of claims 1 to 5, characterized in that: The method further comprises: receiving a second status message corresponding to a second server, where the second server is any server other than the first server in the server cluster; An operating status of the second server is determined based on the second status message.
7. The high availability optimization method according to claim 6, characterized in that: The first server provides power to the data processing unit through a preset port, the status data includes power status data, and the acquiring of the status data of the first server includes: Acquire a power supply signal of the preset port, where the power supply signal is used to indicate whether the first server supplies power to the data processing unit normally; The power supply signal is used as the power supply status data.
8. The high availability optimization method according to claim 1, characterized in that: The state data includes network state data, hardware state data and operating system state data, and the acquiring the state data of the first server includes: Sending a first request to an operating system agent in the first server; the first request is used to obtain any one of network status data, hardware status data and operating system status data of the first server; State data of the operating system agent is received.
9. The high availability optimization method according to any one of claims 1 to 8, characterized in that: The management server of the server cluster isolates the server in a faulty state, and migrates the business carried by the server in a faulty state to the server in a normal state.
10. A server, characterized in that: include: A data processing unit and a power-off protection circuit, wherein the data processing unit is electrically connected to the power-off protection circuit, and the data processing unit is used to execute the method according to any one of claims 1 to 9.
Citation Information
Cited By
Server cluster control method and device
CN120567860A
