Multi-cluster deployment processing method, device, electronic device and storage medium
By adopting a multi-cluster deployment processing method in the digital system, receiving error messages and switching task requests to the backup cluster, the problem of poor system stability when a cluster fails is solved and high availability and stability of the system are achieved.
Patent Information
- Application Number
- CN202211123922.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-09-15
AI Technical Summary
It is difficult for the existing digital system to maintain stable operation when a cluster fails, affecting the normal operation of the entire system.
By implementing a multi-cluster deployment processing method in the digital system, we receive error messages, determine whether the fault level of the faulty cluster exceeds the preset threshold, and switch the task request to the backup cluster to ensure that the task request of the faulty cluster can be processed by the backup cluster.
It improves the stability and reliability of the digital system, ensures that even if a certain cluster fails, the system can still operate normally, and reduces the impact of the failure on the overall system.
Smart Images

Figure CN115484267B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a multi-cluster deployment processing method, device, electronic device and storage medium. Background Art
[0002] As enterprises continue to advance their digital transformation, the amount of data carried by their core digital systems is increasing. The stable operation of digital systems is crucial to ensuring the normal operation of enterprises. Therefore, it is necessary to deploy digital systems reasonably so that even if a failure occurs in the system, the impact can be reduced, and the system business services can be quickly restored to ensure the stable operation of the digital system.
[0003] like Figure 1 As shown, the digital system is usually composed of multiple clusters, each of which includes physical devices such as aggregation devices, computers, switches, etc., and each cluster is deployed with deployment resources such as application software and / or data, so that each cluster can operate independently. In order to prevent the operation of a cluster from being affected when a computer and / or switch device in a cluster fails, it is usually necessary to back up the deployment resources on the computer and switch, and back up the deployment resources of each computer device on the remaining computer devices in the cluster, and back up the deployment resources on the switch device on the remaining switch devices in the cluster. Therefore, even if a computer and / or switch in the cluster fails, the corresponding backup computer or switch can be called to respond, so that the cluster can operate more stably.
[0004] However, in the existing digital system, when a physical device in a cluster fails, the cluster may still not be able to operate normally, which affects the stable operation of the entire digital system. Summary of the invention
[0005] The present application provides a multi-cluster deployment processing method, device, electronic device and storage medium, which have solved the problem of poor stability of digital systems in the prior art.
[0006] In a first aspect, the present application provides a multi-cluster deployment processing method, the method being applied to a digital system, the digital system comprising at least two clusters, each cluster comprising at least two physical devices, each cluster in the digital system having at least one backup cluster in the digital system, the method comprising:
[0007] Receive an error message from the digital system, where the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information;
[0008] Determining whether the fault degree of the first cluster exceeds a preset threshold according to the fault description information;
[0009] If the failure degree of the first cluster exceeds a preset threshold, the task request of the first cluster is switched to a backup cluster corresponding to the first cluster.
[0010] In a second aspect, the present application provides a multi-cluster deployment processing device, the device is applied to a digital system, the digital system includes at least two clusters, each cluster includes at least two physical devices, each cluster in the digital system has at least one backup cluster in the digital system, and the device includes:
[0011] A receiving module, configured to receive an error message from a digital system, wherein the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information;
[0012] A determination module, configured to determine whether the fault degree of the first cluster exceeds a preset threshold according to the fault description information;
[0013] The switching module is used to switch the task request of the first cluster to the backup cluster corresponding to the first cluster if the failure degree of the first cluster exceeds a preset threshold.
[0014] In a third aspect, the present application provides a multi-cluster deployment processing device, including:
[0015] at least one processor and memory;
[0016] The memory stores computer-executable instructions;
[0017] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the multi-cluster deployment processing method as described in the first aspect above.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the multi-cluster deployment processing method described in the first aspect above is implemented.
[0019] The present application provides a multi-cluster deployment processing method, device, electronic device and storage medium. If a fault occurs in a digital system, the cluster where the fault occurs is determined according to the cluster identifier contained in the error message, and a threshold judgment is performed according to the fault description information contained in the error message. If the fault degree of the cluster where the fault occurs is high and exceeds the corresponding preset threshold, the task request received by the fault cluster is switched to the backup cluster of the fault cluster. When the fault cluster cannot operate normally, the backup cluster of the fault cluster can respond to the task request received by the fault cluster, thereby not affecting the normal operation of the digital system and improving the stability of the digital system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] Figure 1 Schematic diagram of a multi-cluster deployment architecture of a digital system provided in an embodiment of the present application Figure 1 ;
[0022] Figure 2 A schematic diagram of an application scenario of the multi-cluster deployment processing method provided in an embodiment of the present application;
[0023] Figure 3 Schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 1 ;
[0024] Figure 4 Schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 2 ;
[0025] Figure 5 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 1 ;
[0026] Figure 6 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 2 ;
[0027] Figure 7 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 3 ;
[0028] Figure 8 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 4 ;
[0029] Fig. 9 Schematic diagram of a multi-cluster deployment architecture of a digital system provided in an embodiment of the present application Figure 2 ;
[0030] Fig.10 A schematic diagram of the structure of a multi-cluster deployment processing device provided in an embodiment of the present application;
[0031] Fig.11 A hardware structure diagram of a multi-cluster deployment processing device provided in an embodiment of the present application.
[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0034] Figure 2 Schematic diagram of application scenario of the multi-cluster deployment processing method provided in the embodiment of the present application. Figure 2 As shown, the digital system is usually composed of multiple clusters, for example, the first cluster, the second cluster, etc. The digital system can be any data processing system for processing large amounts of data, for example, a system for processing data in a ticketing system, a system for processing sales in an e-commerce industry, etc. The normal and stable operation of the digital system is crucial for the normal operation of the enterprise and the protection of customer data information security.
[0035] like Figure 1 As shown, in order to improve the data processing capability of the digital system and facilitate the horizontal expansion of the digital system, it is usually deployed in a multi-cluster mode. Each cluster can include multiple aggregation devices, computers, servers, switches and other physical devices. In addition, in order to reduce the impact of equipment failure on the entire digital system, multiple clusters in the digital system are usually deployed in an exclusive resource manner, that is, some resources are divided. For example, the host of a computer room is used to deploy system applications, and the system application service container is deployed on a designated host. The computer room can be called a cluster for processing some task requests of the digital system. This deployment method is adopted so that when a cluster fails, it will not affect the processing of task requests by other clusters. Task requests can be requests such as data queries sent by customers received by the cluster. For example, for a ticketing system, task requests can be queries for the number of train tickets from Beijing to Shanghai sent by customers.
[0036] In order to further improve the stability and high availability of each cluster, the computers, switches and other equipment in the cluster are usually backed up so that even if a computer or switch in the cluster fails, there is a corresponding backup computer or switch to respond, so that the cluster can run stably, thereby improving the stability of the digital system.
[0037] However, when the aggregation device or access device in a cluster fails, or the backbone network fails, the entire cluster will not be able to operate normally, thus affecting the stable operation of the digital system and making it impossible to respond to some task requests in a timely manner. Even if some devices in the cluster fail, when a device and its backup device fail at the same time, the normal operation of the cluster will still be affected. Therefore, how to further improve the stable operation of the digital system is still an urgent problem to be solved.
[0038] If the stability of the digital system is to be further improved, backup is required between the clusters of the digital system, so that even if a cluster fails and cannot normally respond to the task request it receives, it can still respond through the backup cluster of the cluster, thereby ensuring the normal operation of the digital system. Figure 2 As shown, when the first cluster fails and cannot operate normally, the task request received by the first cluster can be switched to a backup cluster of the first cluster, and the backup cluster of the first cluster can be the second cluster and / or the Nth cluster.
[0039] It should be noted that Figure 2 This is just an example to illustrate an application scenario. In this application, there is no specific restriction on the number of clusters included in the digital system, and no specific display of the physical devices in the clusters is made.
[0040] The technical solutions shown in the present application are described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar contents will not be repeated in different embodiments.
[0041] Figure 3 Schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 1 The multi-cluster deployment processing method is applied to a digital system, the digital system includes at least two clusters, each cluster includes at least two physical devices, and each cluster in the digital system has at least one backup cluster in the digital system, such as Figure 3 As shown, the method includes:
[0042] S301. Receive an error message from a digital system, where the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information.
[0043] The error message may be a message sent to the monitoring device of the digital system indicating that there are equipment and / or network faults in the digital system. The first cluster may be any cluster in the digital system. The first cluster includes at least two physical devices, and the physical devices may be computers, switches, aggregation devices, etc. The cluster identifier refers to an identifier used to record and distinguish clusters in the digital system. Exemplarily, the cluster identifier may be 101, 102, 103, etc., where 101 identifies the first cluster; 102 identifies the second cluster; and 103 identifies the third cluster. The fault description information refers to information data about equipment and / or network faults in the digital system contained in the error message. Exemplarily, the fault description information may be: "3 faults in 102," where "102" may refer to the second cluster, and "3" may refer to the third host in the second cluster. Then the above fault description information means: the third host in the second cluster is faulty.
[0044] Cluster division in a digital system can be done in different ways. For example, a physical device in a computer room can be called a cluster, and the number of clusters in the digital system is determined according to the number of computer rooms in which the physical devices in the digital system are deployed. In a possible implementation, the network topology links of the digital system can be recorded, and the topological shortest path of the network topology links of the digital system can be analyzed to obtain the optimal cluster resource group, and different cluster identifiers can be marked on different clusters to distinguish different clusters.
[0045] In another possible implementation, different device numbers may be recorded for different physical devices in the digital system, and the available resource space in each cluster may be recorded at the same time, so as to facilitate monitoring of the usage of the physical devices in each cluster.
[0046] S302: Determine whether the fault degree of the first cluster exceeds a preset threshold according to the fault description information.
[0047] The fault degree may be the degree of the fault in the first cluster, for example, the network abnormality time in the first cluster, etc. The preset threshold may be the number of faulty devices, the number of error reports, the duration, etc. With different network fault types, the corresponding preset threshold may be different.
[0048] S303: If the failure degree of the first cluster exceeds a preset threshold, the task request of the first cluster is switched to the backup cluster corresponding to the first cluster.
[0049] The task request can be any data processing request received by the first cluster. The backup cluster refers to a cluster that can be used to process task requests received in the first cluster, and it can be deployed with all the application software deployed in the first cluster. At the same time, the backup cluster can also be a cluster that is not in an idle state, or a cluster that does not deploy any application software or database. When the backup cluster is a cluster that does not deploy any application software or database, the same application software and database as those in the first cluster can be deployed in the backup cluster, and then the task request in the first cluster can be switched to the backup cluster. The number of backup clusters can be one or more.
[0050] If the failure degree of the first cluster exceeds the preset threshold, it means that it is difficult to respond to and process some or even all task requests in the first cluster. At this time, it is necessary to switch the task requests that are difficult for the first cluster to respond to and process to the backup cluster of the first cluster, so that the backup cluster can respond to and process these part of the task requests.
[0051] In one possible implementation, if the failure degree of the first cluster does not exceed a preset threshold, all task requests received by the physical device that cannot respond to the task requests it receives will be switched to the backup device of the physical device in the first cluster, or the physical device that cannot respond to the task requests it receives will be placed in a waiting state for a response.
[0052] The multi-cluster deployment processing method provided in the embodiment of the present application deploys the digital system in a multi-cluster manner and performs backup between clusters at the same time. When a cluster fails, a corresponding threshold is used to determine whether to switch the task request of the failed cluster to its backup cluster. Even if a cluster in the digital system fails, there is a corresponding backup cluster to respond to and process the task request of the failed cluster, thereby not affecting the stable operation of the entire digital system and improving the stability and reliability of the digital system.
[0053] Figure 4 Schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, the method includes:
[0054] S401: Receive an error message from a digital system, where the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information.
[0055] It should be understood that S401 and Figure 3 The specific implementation process of S301 in is similar and will not be repeated here.
[0056] S402: Determine a fault type of the first cluster according to the fault description information.
[0057] If it is a device failure type, execute S403 and / or S406;
[0058] If it is a network failure type, execute S409.
[0059] The fault description information includes information about the device and / or network that has failed in the first cluster, and the fault type in the first cluster can be determined through the fault description information. For example, if the fault description information includes information such as abnormal restart of a physical device, it is possible to determine whether the physical device is faulty by the number of abnormal restarts of the physical device within a certain time period. Exemplarily, the preset number of abnormal restarts can be 3 times, that is, the device is determined to be faulty after the device abnormally restarts 3 times. If the fault description information includes the following information: the first switch abnormally restarts 5 times, since 5 times is greater than 3 times, the network fault type in the first cluster can be determined to be a device fault through the above fault description information.
[0060] Exemplarily, the preset network fault duration is 15 minutes, that is, if the network disconnection duration exceeds 15 minutes, the network fault is determined. If the fault description information includes the following content: the first branch network disconnection duration is 20 minutes. Since 20 minutes exceeds 15 minutes, the network fault type of the first cluster can be determined as a network fault through the above fault description information.
[0061] S403, determining whether the number of device failures is greater than a first preset threshold;
[0062] If it is greater, execute S404;
[0063] If it is less, the task request sent to the failed device is switched to the backup device of the failed device in the first cluster.
[0064] The first preset threshold is the preset upper limit number of backup devices that need to be determined to be faulty for the faulty device. For example, the first preset threshold may be 1. If the number of faulty devices is greater than 1, it is necessary to determine whether the backup device of the faulty device is faulty; if the number of faulty devices is 1, it is only necessary to switch the task request sent to the faulty device to its backup device in the first cluster. If the number of faulty devices is less than the first preset threshold, the backup device of the faulty device in the first cluster is required to respond to and process the task request received by the faulty device on behalf of the faulty device.
[0065] S404, determining whether a backup device corresponding to the failed device in the first cluster also fails;
[0066] If yes, execute S405;
[0067] If not, the task request sent to the failed device is switched to a backup device of the failed device in the first cluster.
[0068] When the number of failed devices is greater than a first preset threshold, it is necessary to determine whether the backup device of the failed device in the first cluster is failed. It should be understood that when a device failure occurs in a cluster, it is preferred to switch the task request that the failed device needs to respond to to its backup device in the cluster. If the backup device of the failed device in the cluster also fails, that is, it is impossible to respond to the task request that the failed device needs to respond to in the cluster, then it is necessary to switch the task request that the failed device needs to respond to to the backup cluster of the cluster.
[0069] S405: Switch the task request sent to the failed device to the backup cluster corresponding to the first cluster.
[0070] When the number of faulty devices is greater than a first preset threshold, it is determined whether the backup device of the faulty device is faulty. If the backup device of the faulty device also fails, it is necessary to switch the task request received by the faulty device to the backup cluster. Otherwise, it is necessary to switch the task request received by the faulty device to its backup device in the first cluster. Through the above technical solution, when the same cluster is able to process the task request of the faulty device, the device in the same cluster is preferentially used to respond, and then cross-cluster migration is performed, which helps to improve the efficiency of task request switching, thereby improving the recovery efficiency of the faulty cluster and the digital system, and improving the stability and high availability of the digital system.
[0071] S406: Determine a critical faulty device among the faulty devices according to the fault description information.
[0072] The critical fault device can be the type of device that has failed, which can be a computer, host, server, switch, aggregation device, access device, etc. When the number of failed devices is greater than one, the critical fault device can be multiple. For example, when the number of failed devices is two, the critical fault device can be a host and a switch, and both a host and a switch have failed.
[0073] In a possible implementation, the physical devices in each cluster of the digital system are marked respectively, and the marked physical device numbers are stored. For example, the three switches in the first cluster may be numbered 001-1-01, 001-1-02, and 001-1-03. Among them, 001 may refer to the first cluster, that is, the cluster where the device is located; 1 may refer to the switch, that is, the device type of the device; 01, 02, and 03 respectively refer to the number of the device in the cluster, 01 may refer to the first switch; 02 may refer to the second switch; and 03 may refer to the third switch. Correspondingly, the fault description information includes the physical device number of the key fault device, and the cluster where the key fault device is located, the device type, and which specific device of the device type in the cluster can be quickly determined according to the physical device number. Exemplarily, when the fault description information includes the following information: 002-2-03 abnormally restarted 5 times. Through the above information, it can be determined that the cluster where the fault device is located is 002, that is, the second cluster; the device type is 2, that is, the host; the fault device is 03 host, that is, the third host. It can be further determined that the faulty device is the third host in the third cluster.
[0074] S407, determining whether the number of critical faulty devices is greater than a second preset threshold;
[0075] If it is greater, execute S408;
[0076] If it is less, the task request sent to the critical faulty device is switched to the backup device of the critical faulty device in the first cluster.
[0077] The second preset threshold is the preset upper limit of the number of faulty devices, that is, when the number of faulty devices exceeds this value, all task requests in the first cluster need to be switched to the backup cluster of the first cluster. The second preset threshold can be the same or different depending on the type of critical faulty device. Exemplarily, the second preset threshold corresponding to the computer can be 5; the second preset threshold of the aggregation device can be 0; if the critical faulty device is an aggregation device and the number is 1, all task requests of the first cluster need to be switched to the backup cluster of the first cluster.
[0078] In one possible implementation, the second preset threshold is determined according to the load rate of the devices in the first cluster. The higher the load rate of the physical device, the lower the corresponding second preset threshold. Exemplarily, if the load rate of the host in the first cluster is 70%, the second preset threshold may be 3; if the load rate of the host in the first cluster is 30%, the second preset threshold may be 8. That is, if the task request of the faulty device is switched to the backup cluster in the first cluster where it is located, the load rate of the physical devices in the first cluster needs to be considered. When the load rate of the devices in the first cluster is too large, the task request of the faulty device is switched to its backup device in the first cluster at the same time, which will further increase the load rate of the devices in the first cluster, making it easy for the first cluster to fail and affecting the normal operation of the entire cluster.
[0079] S408: Switch all task requests in the first cluster to the backup cluster corresponding to the first cluster.
[0080] First, determine whether the number of faulty devices is greater than the second preset threshold. If so, switch all task requests in the first cluster to the backup cluster of the first cluster; if less, switch the task requests of the key faulty devices to the backup cluster of the first cluster. When the number of faulty devices is small, the task request is switched within the same cluster, which is convenient for increasing the switching rate of task requests and further improving the recovery efficiency of the first cluster. When the number of key faulty devices is large, it means that the first cluster is unable to carry all task requests. At this time, switch all task requests to reduce the crash of other normally operating devices in the first cluster, which is convenient for the normal operation of the digital system.
[0081] S409: Determine whether the network fault type is a branch network fault or a trunk network fault according to the fault description information;
[0082] A branch network failure means that some devices in the first cluster are affected by the network failure; a backbone network failure means that all devices in the first cluster are affected by the network failure.
[0083] If the network fault type is a branch network fault, execute S410;
[0084] If the network fault type is a backbone network fault, execute S412.
[0085] S410, determining whether the network failure duration is greater than a second preset duration;
[0086] If it is greater, execute S411;
[0087] If it is less, the physical devices covered by the first cluster branch network are put into a state of waiting for response.
[0088] S411: Switch the task request received by the physical device covered by the faulty branch network to the backup cluster of the first cluster.
[0089] The second preset duration is the upper limit of the duration of the preset branch network failure, which can be any value greater than 0. When the network failure duration of the branch network is greater than the second preset duration, it is considered that the physical devices covered by the branch network cannot respond to the task request in time, and the task request received by the physical devices covered by the branch network needs to be switched to the backup cluster of the first cluster, so that the task request received by this part of the physical devices can be responded to in time, which is conducive to the stable operation of the digital system.
[0090] S412, determining whether the network failure duration is greater than a third preset duration;
[0091] If it is greater, execute S413;
[0092] If it is smaller, the physical devices in the first cluster are put into a state of waiting for response.
[0093] S413: Switch all task requests of the first cluster to the backup cluster corresponding to the first cluster.
[0094] The third preset duration is the upper limit of the duration of the preset backbone network failure, which can be any value greater than 0. When the backbone network failure duration is greater than the third preset duration, it is considered that all devices in the first cluster are unable to respond to the task request received by the first cluster, and all task requests of the first cluster need to be switched to the backup cluster of the first cluster, thereby ensuring the stable operation of the digital system and improving its high availability.
[0095] It should be understood that the third preset time length and the second preset time length may be the same or different.
[0096] In a possible implementation manner, after switching the task request of the first cluster to the backup cluster corresponding to the first cluster, the multi-cluster deployment processing method further includes: determining whether a database is deployed in the first cluster;
[0097] If so, switch the data source address accessed by the remaining clusters to the cluster where the backup database is located.
[0098] The digital system may contain a database, which stores the data required for processing and / or processed by the digital system, and the database may be stored in any cluster in the digital system. In order to improve the stability of the digital system, the database and the backup database may be stored in different clusters respectively, and there may be one or more backup databases. When there are multiple backup databases, the backup databases may be stored in the same or different clusters. If a database is stored in the first cluster where the failure occurs, when the remaining clusters need to access the data in the database, the first cluster may not be able to receive and respond to the corresponding data read request. At this time, it is necessary to switch the address of the remaining clusters accessing the database so that the remaining clusters will subsequently give priority to accessing the backup database. Exemplarily, if a database is stored in the first cluster and a backup database is stored in the second cluster, when the first cluster fails, the address of the remaining clusters accessing the data in the digital system is switched to the second cluster, so that the remaining clusters have priority to access the backup database. This helps to further improve the stability of the digital system.
[0099] In another possible implementation, switching the task request of the first cluster to a backup cluster corresponding to the first cluster specifically includes:
[0100] Determine the number of backup clusters of the first cluster;
[0101] If there is only one backup cluster, switch the tasks of the first cluster to the backup cluster corresponding to the first cluster;
[0102] If the number of backup clusters is greater than one, the task requests of the first cluster are evenly distributed and switched to each backup cluster of the first cluster; or, the amount of task requests to be switched to each backup cluster is determined based on the load conditions of each backup cluster in the multiple backup clusters corresponding to the first cluster, and the task requests of the corresponding amount of task requests are switched to each backup cluster accordingly.
[0103] The first cluster may have one or more backup clusters. When the first cluster has one backup cluster, when it is necessary to switch the task requests received by the first cluster, all the task requests to be switched are switched to the backup cluster of the first cluster.
[0104] If there are multiple backup clusters for the first cluster, the task requests of the first cluster can be switched to its backup clusters in different ways. For example, the task requests in the first cluster can be evenly distributed, that is, each backup cluster receives the same amount of task requests from the first cluster, and each backup can randomly receive task requests from the first cluster. In addition, the distribution can be made according to the load of the backup cluster. If the load of a backup cluster is higher, it can receive fewer task requests from the first cluster accordingly; if the load of the backup cluster is lower, it can receive more task requests from the first cluster accordingly, so that each cluster will not be overloaded, causing the cluster to crash, which helps to further improve the stability of the digital system.
[0105] In a possible implementation manner, before switching the task request of the first cluster to the backup cluster corresponding to the first cluster, the multi-cluster deployment processing method further includes:
[0106] Compare the number of application software deployed in the first cluster and the backup cluster of the first cluster;
[0107] If the number of application software in the backup cluster is less than the number of application software in the first cluster, determining the missing application software in the backup cluster;
[0108] Deploy the missing application software in the backup cluster.
[0109] Application software is an application program deployed on physical devices in each cluster, such as a computing engine. The backup cluster needs to be able to fully process all task requests received by the first cluster. Therefore, the backup cluster needs to include all application software in the first cluster. By monitoring the number of application software in the backup cluster and the first cluster, if the number of application software in the backup cluster is less than the number of application software in the first cluster, it means that the backup cluster is missing an application software and needs to be supplemented later. Through the above-mentioned technical solution, when the task request of the first cluster is switched to the backup cluster, the backup cluster can process the task request, reducing the situation where the backup cluster cannot process the task request in the first cluster due to lack of application software, so as to ensure the stable operation of the digital system.
[0110] Figure 5 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 1 .like Figure 5 As shown, the multi-cluster deployment processing method includes three specific processes: process 1, process 2, and process 3.
[0111] In process 1, an error message is first obtained, and the cluster where the fault occurs is determined to be the first cluster through the error message. In process 2, the fault description information in the error message is used to determine that the fault type in the first cluster is a device fault, and the faulty devices are computer 1 and computer 2, which are greater than the first preset threshold value through threshold judgment. It is further determined that the backup device of computer 1 is computer 2, and the backup device of computer 2 is computer 3. Then, in process 3, the task request received by computer 1 is switched to the backup cluster of the first cluster, and the task request received by computer 2 is switched to computer 3.
[0112] Figure 6 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 2 .like Figure 6 As shown, the multi-cluster deployment processing method includes three specific processes: process 1, process 2, and process 3.
[0113] In process 1, an error message is first obtained, and the cluster where the fault occurs is determined to be the first cluster through the error message. In process 2, the fault description information in the error message is used to determine that the fault type in the first cluster is a device fault, and the faulty devices are switch 1 and switch 2. Through threshold judgment, the number 2 of critical faulty devices is greater than the second preset threshold. Therefore, in process 3, all task requests of the first cluster are switched to the backup cluster of the first cluster.
[0114] Figure 7 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 3 .like Figure 7 As shown, the multi-cluster deployment processing method includes three specific processes: process 1, process 2, and process 3.
[0115] In process 1, an error message is first obtained, and the cluster where the fault occurs is determined to be the first cluster through the error message. In process 2, the fault type in the first cluster is determined to be a network fault through the fault description information in the error message, and further determined to be a second branch network fault in the first cluster. Through threshold judgment, the fault duration of the second branch network is greater than the first preset duration. Therefore, in process 3, the task request received by the second branch network coverage device in the first cluster is switched to the backup cluster of the first cluster.
[0116] Figure 8 A schematic diagram of the multi-cluster deployment processing method provided in the embodiment of the present application Figure 4 .like Figure 8 As shown, the multi-cluster deployment processing method includes three specific processes: process 1, process 2, and process 3.
[0117] In process 1, an error message is first obtained, and the cluster where the fault occurs is determined to be the first cluster through the error message. In process 2, the fault type in the first cluster is determined to be a network fault through the fault description information in the error message, and further determined to be a backbone network fault in the first cluster. Through threshold judgment, the fault duration of the backbone network is greater than the second preset duration. Therefore, in process 3, all task requests in the first cluster are switched to the backup cluster of the first cluster.
[0118] Fig. 9 Schematic diagram of a multi-cluster deployment architecture of a digital system provided in an embodiment of the present application Figure 2 .like Fig. 9 As shown, the digital system consists of multiple clusters, each cluster is deployed with deployment resources such as application software and / or data, and each cluster receives different task requests and responds to the received task requests.
[0119] The physical resource detection module manages the resources within the digital system, identifies the categories of physical devices, and stores and records the categories of each physical device; each host in the digital system is installed with detection software to detect the network connectivity between the hosts, and analyzes the recorded network topology links to analyze the shortest topological path to obtain the optimal physical isolation cluster; each physically isolated cluster is numbered and recorded as a cluster identifier, and the physical device category and resource space within each physically isolated cluster are recorded; the physical resource detection module also provides an external interface for other modules in the digital system to obtain information such as physical devices and resource space within each physically isolated cluster; in addition, a resource marking interface is also provided to mark the application software and databases deployed on each host.
[0120] The isolation system deployment module can obtain information such as physical equipment and resource space in each physically isolated cluster through the external interface in the physical resource detection module, and deploy application software, database and other deployment resources in each physically isolated cluster based on the above information; it is also used to monitor the number of application software deployed in each physically isolated cluster. If the application software is deployed incorrectly or missing in a physically isolated cluster, an alarm will be issued to prompt the automatic completion of the missing application software.
[0121] The device anomaly perception module is used to obtain monitoring data information of each physical device in the digital system, and summarize the network topology link information detected by the physical resource detection module; if a fault occurs in the digital system, the error message of the digital system is obtained, and the threshold judgment is performed based on the cluster identification and fault description information contained in the error message.
[0122] The gateway proxy flow switching module is used to switch the task request according to the threshold judgment structure of the device abnormality perception module.
[0123] The data source switching module is used to manage the addresses of each physically isolated cluster accessing the database; the device anomaly perception module sends an instruction to the data source switching module on whether to switch the data source address based on the threshold judgment result and the information obtained through the external interface in the physical resource detection module on whether the database is deployed in the physically isolated cluster where the fault occurs. The data source switching module receives the instruction, and if switching is required, the address of the remaining clusters accessing the database is switched to the database deployed with the backup cluster; in addition, the deployment information of the database, the backup database, and the data source address of each physically isolated cluster accessing the database are updated.
[0124] Fig.10 This is a schematic diagram of the structure of a multi-cluster deployment processing device provided in an embodiment of the present application. Fig.10 As shown, the multi-cluster deployment processing device 100 includes: a receiving module 1001, a determining module 1002, and a switching module 1003.
[0125] A receiving module 1001 is used to receive an error message from a digital system, where the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information;
[0126] A determination module 1002 is used to determine whether the fault degree of the first cluster exceeds a preset threshold according to the fault description information;
[0127] The switching module 1003 is configured to switch the task request of the first cluster to the backup cluster corresponding to the first cluster if the failure degree of the first cluster exceeds a preset threshold.
[0128] Optionally, the determination module 1002 is specifically configured to determine whether the fault type of the first cluster is a device fault type according to the fault description information;
[0129] If so, determining whether the number of device failures is greater than a first preset threshold;
[0130] Accordingly, the switching module 1003 is specifically configured to determine whether a backup device corresponding to the failed device in the first cluster also fails if the number of failed devices in the first cluster is greater than a first preset threshold;
[0131] If the backup device corresponding to the failed device in the first cluster also fails, the task request sent to the failed device is switched to the backup cluster corresponding to the first cluster.
[0132] Optionally, the determination module 1002 is specifically configured to determine whether the fault type of the first cluster is a device fault type according to the fault description information;
[0133] If yes, determine the key faulty device among the faulty devices according to the fault description information;
[0134] Correspondingly, the switching module 1003 is specifically configured to switch all task requests in the first cluster to the backup cluster corresponding to the first cluster if the number of critical faulty devices is greater than a second preset threshold.
[0135] Optionally, the determination module 1002 is specifically configured to determine whether the fault type of the first cluster is a network fault type according to the fault description information;
[0136] If so, determine whether the network fault type belongs to a branch network fault according to the fault description information;
[0137] Accordingly, the switching module 1003 is specifically configured to, if the network fault type is a branch network fault, determine whether the network fault duration is greater than a first preset duration;
[0138] If it is greater, the task request received by the physical device covered by the failed branch network is switched to the backup cluster of the first cluster.
[0139] Optionally, the determination module 1002 is specifically configured to determine whether the fault type of the first cluster is a network fault type according to the fault description information;
[0140] If yes, determine whether the network fault type belongs to a backbone network fault according to the fault description information;
[0141] Accordingly, the switching module 1003 is specifically configured to, if the network fault type is a backbone network fault, determine whether the network fault duration is greater than a second preset duration;
[0142] If it is greater, all task requests of the first cluster are switched to the backup cluster corresponding to the first cluster.
[0143] Optionally, the multi-cluster deployment processing device 100 further includes: a data source switching module, configured to determine whether a database is deployed in the first cluster;
[0144] If so, switch the data source address accessed by the remaining clusters to the cluster where the backup database is located.
[0145] Optionally, the switching module 1003 is specifically used to determine the number of backup clusters of the first cluster;
[0146] If there is only one backup cluster, switch the tasks of the first cluster to the backup cluster corresponding to the first cluster;
[0147] If the number of backup clusters is greater than one, the task requests of the first cluster are evenly distributed and switched to each backup cluster of the first cluster; or, the amount of task requests to be switched to each backup cluster is determined based on the load conditions of each backup cluster in the multiple backup clusters corresponding to the first cluster, and the task requests of the corresponding amount of task requests are switched to each backup cluster accordingly.
[0148] Optionally, the multi-cluster deployment processing device 100 further includes a comparison module, which is used to compare the number of application software deployed in the first cluster and the backup cluster of the first cluster;
[0149] If the number of application software in the backup cluster is less than the number of application software in the first cluster, determining the missing application software in the backup cluster;
[0150] Deploy the missing application software in the backup cluster.
[0151] A multi-cluster deployment processing device provided in an embodiment of the present application is applicable to the above method embodiment and will not be described in detail here.
[0152] Fig.11 This is a hardware structure diagram of a multi-cluster deployment processing device provided in an embodiment of the present application. Fig.11 As shown, the multi-cluster processing device 110 includes:
[0153] At least one processor 1101 and a memory 1102;
[0154] Memory 1102 stores computer executable instructions;
[0155] At least one processor 1101 executes the computer-executable instructions stored in the memory 1102 , so that at least one processor 1101 executes the above multi-cluster deployment processing method.
[0156] The specific implementation process of the processor 1101 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0157] The processor 1101 and the memory 1102 are connected via a bus 1103 .
[0158] An embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the multi-cluster deployment processing method as described above.
[0159] In the above-mentioned embodiments, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0160] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0162] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0163] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0164] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0165] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0166] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0167] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a terminal or server.
[0168] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-cluster deployment processing method, characterized in that: The method is applied to a digital system, the digital system includes at least two clusters, each cluster includes at least two physical devices, each cluster in the digital system has at least one backup cluster in the digital system, and the method includes: Receive an error message from the digital system, where the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information; Determining whether the fault degree of the first cluster exceeds a preset threshold according to the fault description information; If the failure degree of the first cluster exceeds a preset threshold, switching the task request of the first cluster to the backup cluster corresponding to the first cluster; The determining, according to the fault description information, whether the fault degree of the first cluster exceeds a preset threshold specifically includes: Determine, according to the fault description information, whether the fault type of the first cluster is a device fault type; If so, determining whether the number of device failures is greater than a first preset threshold; Correspondingly, if the failure degree of the first cluster exceeds a preset threshold, switching the task request of the first cluster to the backup cluster corresponding to the first cluster specifically includes: If the number of device failures in the first cluster is greater than the first preset threshold, switching the task request sent to the failed device to the backup cluster corresponding to the first cluster; The determining, according to the fault description information, whether the fault degree of the first cluster exceeds a preset threshold further specifically includes: Determine, according to the fault description information, whether the fault type of the first cluster is a device fault type; If yes, determining the key faulty device among the faulty devices according to the fault description information; Correspondingly, if the failure degree of the first cluster exceeds a preset threshold, switching the task request of the first cluster to the backup cluster corresponding to the first cluster specifically includes: If the number of the critical faulty devices is greater than a second preset threshold, all task requests in the first cluster are switched to a backup cluster corresponding to the first cluster.
2. The method according to claim 1, characterized in that If the number of device failures in the first cluster is greater than a first preset threshold, switching the task request sent to the failed device to the backup cluster corresponding to the first cluster specifically includes: If the number of device failures in the first cluster is greater than a first preset threshold, determining whether a backup device corresponding to the failed device in the first cluster also fails; If a backup device corresponding to the failed device in the first cluster also fails, the task request sent to the failed device is switched to the backup cluster corresponding to the first cluster.
3. The method according to claim 1, characterized in that The determining, according to the fault description information, whether the fault degree of the first cluster exceeds a preset threshold specifically includes: Determine, according to the fault description information, whether the fault type of the first cluster is a network fault type; If yes, determining whether the network failure duration is greater than a first preset duration; Correspondingly, if the failure degree of the first cluster exceeds a preset threshold, switching the task request of the first cluster to the backup cluster corresponding to the first cluster specifically includes: If the network failure duration is greater than the first preset duration, the task request of the first cluster is switched to the backup cluster corresponding to the first cluster.
4. The method according to claim 3, characterized in that The determining whether the network failure duration is greater than a first preset duration specifically includes: Determine whether the network fault type belongs to a branch network fault according to the fault description information; If yes, determining whether the network failure duration is greater than a second preset duration; Correspondingly, if the network failure duration is greater than the first preset duration, switching the task request of the first cluster to the backup cluster corresponding to the first cluster specifically includes: If the network failure duration is greater than a second preset duration, the task request received by the physical device covered by the failed branch network is switched to the backup cluster of the first cluster.
5. The method according to claim 3, characterized in that: The determining whether the network failure duration is greater than a first preset duration specifically includes: Determine whether the network fault type belongs to a backbone network fault according to the fault description information; If yes, determining whether the network failure duration is greater than a third preset duration; Correspondingly, if the network failure duration is greater than the first preset duration, switching the task request of the first cluster to the backup cluster corresponding to the first cluster specifically includes: If the network failure duration is longer than a third preset duration, all task requests of the first cluster are switched to a backup cluster corresponding to the first cluster.
6. The method according to any one of claims 1 to 5, characterized in that: After the task request of the first cluster is switched to the backup cluster corresponding to the first cluster, the method further includes: Determining whether a database is deployed in the first cluster; If so, switch the data source address accessed by the remaining clusters to the cluster where the backup database is located.
7. The method according to any one of claims 1 to 5, characterized in that: The step of switching the task request of the first cluster to the backup cluster corresponding to the first cluster specifically includes: Determining the number of backup clusters of the first cluster; If the number of the backup cluster is one, switch the tasks of the first cluster to the backup cluster corresponding to the first cluster; If the number of backup clusters is greater than one, the task requests of the first cluster are evenly distributed and switched to each backup cluster of the first cluster; or, the amount of task requests to be switched to each backup cluster is determined based on the load conditions of each backup cluster in the multiple backup clusters corresponding to the first cluster, and the task requests of the corresponding amount of task requests are switched to each backup cluster accordingly.
8. The method according to any one of claims 1 to 5, characterized in that: Before switching the task request of the first cluster to the backup cluster corresponding to the first cluster, the method further includes: comparing the number of application software deployed in the first cluster and the backup cluster of the first cluster; If the number of application software in the backup cluster is less than the number of application software in the first cluster, determining the application software missing from the backup cluster; Deploy the missing application software in the backup cluster.
9. A multi-cluster deployment processing device, characterized in that: The device is applied to a digital system, the digital system includes at least two clusters, each cluster includes at least two physical devices, each cluster in the digital system has at least one backup cluster in the digital system, and the device includes: A receiving module, used to receive an error message of the digital system, wherein the error message includes a cluster identifier of a first cluster where a fault occurs and fault description information; A determination module, configured to determine whether the fault degree of the first cluster exceeds a preset threshold according to the fault description information; A switching module, configured to switch the task request of the first cluster to a backup cluster corresponding to the first cluster if the failure degree of the first cluster exceeds a preset threshold; The determination module is specifically configured to determine whether the fault type of the first cluster is a device fault type according to the fault description information; if so, determine whether the number of device faults is greater than a first preset threshold; The switching module is specifically configured to switch the task request sent to the failed device to the backup cluster corresponding to the first cluster if the number of device failures in the first cluster is greater than the first preset threshold; The determination module is further specifically configured to determine whether the fault type of the first cluster is a device fault type according to the fault description information; if so, determine a key fault device among the faulty devices according to the fault description information; The switching module is further specifically configured to switch all task requests in the first cluster to a backup cluster corresponding to the first cluster if the number of critical faulty devices is greater than a second preset threshold.
10. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the multi-cluster deployment processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the multi-cluster deployment processing method according to any one of claims 1 to 8.
