A multi-dimensional predictable load balancing fault switching method and system

By using multi-dimensional data collection and machine learning models to predict load balancing system failures, fast and accurate disaster recovery switching is achieved, improving the system's high availability and business continuity. It is suitable for load balancing systems in complex network environments.

CN119814594BActive Publication Date: 2025-09-30北京志凌海纳科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510303423.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-09-30
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

Existing technologies are unable to detect faults and perform disaster recovery switching in a timely and accurate manner in load balancing scenarios, resulting in insufficient high availability and stability of the system.

Method used

By collecting multi-dimensional load balancing indicators, performing normalization processing and historical data analysis, and building a machine learning model, we can predict the probability of future failures and trigger a preheating mechanism for disaster recovery switching when a failure is predicted, including enabling hot standby and taking over traffic from the backup cluster.

Benefits of technology

It achieves high-accuracy and timely perception of load balancing system failures, significantly improves the system's high availability and business continuity, and reduces business interruption time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814594B_ABST
    Figure CN119814594B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-dimensionally predictable load balancing fault switching method and system; wherein the method includes: constructing a machine learning model based on time series data of historical failure probabilities, using the machine learning model to predict the failure probability of each fault granularity within a preset period of time in the future; when the predicted failure probability exceeds the corresponding standard threshold, triggering the preheating mechanism of disaster recovery switching of the corresponding fault granularity, including the operations of hot standby startup, state synchronization, and backup cluster traffic acceptance. The technical solution of the present invention can perceive and respond to various faults in the load balancing system more timely and accurately through the above-mentioned multi-dimensional prediction and flexible switching mechanism, significantly improving the high availability and reliability of the load balancing system, and ensuring the stable operation of the business and the continuity of the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of load balancing network technology, and in particular to a multi-dimensionally predictable load balancing fault switching method and system. Background Art

[0002] As business grows and architecture evolves, a single data center load balancing deployment model is insufficient to address risks caused by network failures, hardware failures, and other issues. Therefore, a multi-data center load balancing disaster recovery model can be used to improve system availability and business continuity.

[0003] Generally speaking, disaster recovery can be categorized into different modes, such as cold standby and hot standby, or active-active and active-active. The following describes active-active and active-active modes. Active-active refers to the situation where only the primary node handles all traffic at any given time, with the standby node taking over traffic only if the primary node fails. Active-active refers to the situation where both the primary and standby nodes handle traffic at the same time. If a node fails, the other node automatically takes over its traffic.

[0004] Research has found that how to quickly perceive faults and quickly perform disaster recovery switching in load balancing scenarios, thereby improving the high availability of the system, is an urgent problem that technicians in this field need to solve. In the load balancing architecture of existing products, there are several main steps for disaster recovery switching: perception of faults, mainly achieved through active detection by the control plane or mutual detection between the data planes of nodes. Setting conditions for triggering disaster recovery, such as determining whether the load balancing virtual machine has failed, determining whether the cluster in which it is located has failed, etc. After the fault switching conditions are met, the global control plane and the local control plane are combined to take over the business of the faulty node.

[0005] Further analysis reveals that current technologies often suffer from the following shortcomings: First, real-time performance is limited: neither the control plane nor the data plane detection modes can detect failures promptly. Second, fault detection accuracy is low: For example, a cluster failure may not represent a service failure, potentially leading to unnecessary failover. These two shortcomings are particularly significant in load balancing scenarios, as they often carry critical traffic and place extremely high demands on stability and availability. Summary of the Invention

[0006] How to quickly perceive failures and quickly perform disaster recovery switching in a load balancing scenario, thereby improving the high availability of the system, is the problem solved by the present invention.

[0007] The present invention provides a multi-dimensional predictable load balancing fault switching method, comprising the following steps:

[0008] Implementing the current system status collection step: Based on the attribute characteristic information of the load balancing system, collecting multi-dimensional fault indicators and the impact factors of different granularity faults corresponding to the fault indicators to form current system status data, and summarizing the current system status data to form a data set;

[0009] Normalization and historical data analysis steps: normalize the collected current system status data; and also include establishing a mapping relationship table based on the data set formed from the aggregated current system status data, wherein the vertical items in the mapping relationship table are fault indicators, and are labeled F1, F2, ... Fn from top to bottom; and the horizontal items in the mapping relationship table are the impact factors of faults of different granularities corresponding to the fault indicators, and the granularities are labeled L1, L2, L3, L4 from left to right;

[0010] According to the preset formula, the failure probability corresponding to different granularities is calculated: failure probability of L1, failure probability of L2, failure probability of L3 and failure probability of L4;

[0011] The failure probability corresponding to each current fault granularity is calculated according to the above preset formula and finally saved in the database. As time goes by, the failure probability corresponding to a set of time series is calculated in the database to obtain time series data of historical failure probabilities. A machine learning model is constructed based on the time series data of historical failure probabilities, and the machine learning model is used to predict the failure probability of each fault granularity within a preset period of time in the future.

[0012] When the predicted failure probability exceeds the corresponding standard threshold, the preheating mechanism for disaster recovery switching is triggered.

[0013] Preferably, as an implementable method, the load balancing failover method supports the active-standby mode at the LBGroup granularity and the active-active mode at the LB virtual machine granularity.

[0014] Preferably, as an implementable embodiment, the attribute characteristic information of the load balancing system includes network connectivity information, switching frequency information, network status information and virtual machine information.

[0015] Preferably, as an implementable embodiment; the multi-dimensional types of fault indicators include network connectivity between LB virtual machines in the LB virtual machine group, network connectivity between the LB global controller and the LB virtual machine group, the number or frequency of virtual services that undergo HA switching at the LB virtual machine group level, the number or frequency of virtual services that undergo HA switching at the VM level, the number or frequency of virtual services that undergo HA switching at the network card level, the number or frequency of virtual services that undergo HA switching at the virtual service level, the packet loss rate or retransmission rate of business-related network cards, the packet loss rate or retransmission rate of all network cards in the VM, the packet loss rate or retransmission rate of all network cards in the LB virtual machine group, a significant increase or instability in business network latency, a sudden increase or decrease in network card throughput, the health status between virtual machines, virtual machine monitoring indicator data, virtual machine internal system log data, the health status between virtual services and back-end servers, the packet loss rate or retransmission rate between virtual services and back-end servers, and the number of new connections or changes in the total number of connections of virtual services.

[0016] Preferably, as an implementable method, in the step of normalizing the collected current system status data, the normalization process uses a preset formula that normalizes the data of the influencing factors of different granularity faults to the range of [0,1]; the preset formula is .

[0017] Preferably, as an implementable embodiment, the machine learning model is selected from one of an LSTM model or a Transformer model.

[0018] Preferably, as an implementable method, the preheating mechanism includes starting hot standby in advance, synchronizing the virtual service status to the standby cluster, and taking over part of the virtual service traffic in the standby cluster in advance.

[0019] Preferably, as an implementable method, the multi-dimensional types perform fault switching in sequence according to the priority relationship of LBGroup granularity, LB virtual machine granularity, virtual service group granularity and virtual service granularity.

[0020] The present invention provides a multi-dimensional predictable load balancing fault switching system, including an acquisition module, a normalization processing module, a historical data analysis module, and a model processing module:

[0021] The acquisition module is configured to collect multi-dimensional fault indicators and influencing factors of faults of different granularities corresponding to the fault indicators based on the attribute characteristic information of the load balancing system, form current system status data, and aggregate the current system status data to form a data set;

[0022] The normalization processing module is configured to normalize the collected current system status data; establish a mapping relationship table based on a data set formed from the aggregated current system status data, wherein the vertical items in the mapping relationship table are fault indicators and are labeled F1, F2, ..., Fn from top to bottom; the horizontal items in the mapping relationship table are influencing factors of faults of different granularities corresponding to the fault indicators, and the granularities are labeled L1, L2, L3, and L4 from left to right; and calculate the fault probabilities corresponding to the different granularities according to a preset formula: i.e., the fault probability of L1, the fault probability of L2, the fault probability of L3, and the fault probability of L4;

[0023] The historical data analysis module is used to calculate the failure probability corresponding to each current failure granularity according to the above preset formula and finally save it in the database; as time goes by, the failure probability corresponding to a set of time series is calculated in the database to obtain the time series data of historical failure probabilities;

[0024] The model processing module is used to build a machine learning model based on the time series data of the historical failure probability, and use the machine learning model to predict the failure probability of each failure granularity within a preset period of time in the future; when the predicted failure probability exceeds the corresponding standard threshold, the preheating mechanism of disaster recovery switching is triggered.

[0025] Compared with the prior art, the embodiments of the present invention have at least the following technical effects:

[0026] In summary, the multi-dimensionally predictable load balancing fault switching solution provided by the above technical solution of the present invention includes: a current system status collection step: collecting multi-dimensional fault indicators and influencing factors of faults of different granularities corresponding to the fault indicators based on the attribute characteristic information of the load balancing system to form current system status data, and summarizing the current system status data to form a data set; a normalization processing and historical data analysis step: normalizing the collected current system status data; and also including establishing a mapping relationship table based on the data set formed by summarizing the current system status data, wherein the vertical items of the mapping relationship table are fault indicators, and are marked as F1, F2...Fn from top to bottom; the horizontal items of the mapping relationship table are influencing factors of faults of different granularities corresponding to the fault indicators, and the granularities are marked as L1, L2, L3, L4 from left to right;

[0027] According to a preset formula, the failure probabilities corresponding to different granularities are calculated: namely, the failure probability of L1, the failure probability of L2, the failure probability of L3, and the failure probability of L4. The failure probability corresponding to each current fault granularity is calculated according to the preset formula and finally saved in the database. As time goes by, the failure probabilities corresponding to a set of time series are calculated in the database to obtain time series data of historical failure probabilities. A machine learning model is constructed based on this time series data of historical failure probabilities, and the machine learning model is used to predict the failure probability of each fault granularity within a preset period of time in the future.

[0028] When the predicted failure probability exceeds the corresponding standard threshold, the disaster recovery switch preheating mechanism is triggered, including hot standby startup, status synchronization, and backup cluster traffic taking over.

[0029] The present invention provides a multi-dimensional predictable load balancing fault switching method, which achieves significant technical effects through the following technical means:

[0030] By collecting and analyzing load balancing metrics across multiple dimensions (such as network connectivity, HA switchover frequency, packet loss rate, retransmission rate, and CPU utilization), the system comprehensively and meticulously monitors the operational status of the load balancing system, effectively covering potential failure points at different levels and granularities. Leveraging historical data analysis and advanced machine learning models (such as LSTM and Transformer), the system accurately predicts the probability of failure at various granularities within a given timeframe. This predictive capability enables the system to proactively identify potential failures and mitigate the impact of sudden outages on services.

[0031] Based on the prediction results of different fault granularities (such as LBGroup granularity, LB virtual machine granularity, virtual service group granularity and virtual service granularity), the corresponding level of disaster recovery switching strategy (active-standby mode or active-active mode) is dynamically selected to ensure efficient response in various fault scenarios and guarantee business continuity.

[0032] Simultaneously, disaster recovery switchover warm-up preparations are performed: When a potential failure is predicted, the disaster recovery switchover warm-up mechanism is initiated in advance, including hot standby activation, state synchronization, and traffic transfer to the backup cluster. This warm-up process significantly improves the response speed and success rate of disaster recovery switchovers, reducing service interruption in the event of an actual failure.

[0033] The technical solution adopted in the embodiment of the present invention uses the above-mentioned multi-dimensional prediction and flexible switching mechanism. The present invention can perceive and respond to various faults in the load balancing system more promptly and accurately, significantly improve the high availability and reliability of the load balancing system, ensure the stable operation of the business and the continuity of user experience, and has obvious technical advantages and practical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0035] Figure 1 This is a flow chart of a multi-dimensional predictable load balancing failover method provided by an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram of the structure of a multi-dimensional predictable load balancing fault switching system provided by an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of the mechanism architecture principle of a multi-dimensional predictable load balancing failover system;

[0038] Figure 4 It is a flowchart of a multi-dimensional predictable load balancing failover method;

[0039] Figure 5 It is a schematic diagram of a set of time-series related failure probabilities that a multi-dimensional predictable load balancing failover system will obtain in the database;

[0040] Figure 6 This is a schematic diagram of the effect of the warm-up mechanism for triggering disaster recovery switching in a multi-dimensional predictable load balancing fault switching system.

[0041] Label: acquisition module 10; normalization processing module 20; historical data analysis module 30; model processing module 40.

[0042] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

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

[0044] In order to solve the problems in the prior art, the following embodiments of the present invention provide a multi-dimensional predictable load balancing fault switching solution, which aims to solve the problem of being able to quickly perceive faults and quickly perform disaster recovery switching in the above-mentioned load balancing scenario, thereby improving the high availability of the system.

[0045] Example 1

[0046] To achieve the above purpose, see Figure 1 , Figure 1 A schematic diagram of a multi-dimensional predictable load balancing fault switching method provided by an embodiment of the present invention. Figure 1 As shown, a multi-dimensional predictable load balancing fault switching method provided by the first embodiment of the present invention includes the following steps:

[0047] S110: Implementing a current system status collection step: Based on the attribute characteristic information of the load balancing system, collecting multi-dimensional fault indicators and the impact factors of faults of different granularities corresponding to the fault indicators to form current system status data, and summarizing the current system status data to form a data set;

[0048] S120, normalization processing and historical data analysis step: normalizing the collected current system status data; also including establishing a mapping relationship table based on the data set formed from the aggregated current system status data, wherein the vertical items in the mapping relationship table are fault indicators, and are labeled F1, F2 ... Fn from top to bottom; and the horizontal items in the mapping relationship table are influencing factors of faults of different granularities corresponding to the fault indicators, and the granularities are labeled L1, L2, L3, L4 from left to right;

[0049] S130. Calculate the failure probabilities corresponding to different granularities according to a preset formula: failure probability of L1, failure probability of L2, failure probability of L3, and failure probability of L4;

[0050] S140. Calculate the current failure probability corresponding to each fault granularity according to the above-mentioned preset formula and save it in a database. As time goes by, calculate the failure probability corresponding to a set of time series in the database to obtain time series data of historical failure probabilities. Build a machine learning model based on the time series data of historical failure probabilities, and use the machine learning model to predict the failure probability of each fault granularity within a preset period of time in the future.

[0051] S150: When the predicted failure probability exceeds the corresponding standard threshold, the preheating mechanism for disaster recovery switching is triggered, including hot standby start-up, state synchronization, and backup cluster traffic taking over.

[0052] Preferably, as an implementable method, the load balancing failover method supports the active-standby mode at the LBGroup granularity and the active-active mode at the LB virtual machine granularity.

[0053] Preferably, as an implementable embodiment, the attribute characteristic information of the load balancing system includes network connectivity information, switching frequency information, network status information and virtual machine information.

[0054] Preferably, as an implementable method; in the system status collection step, the multi-dimensional types of fault indicators collected include network connectivity between LB VMs (i.e., LB virtual machines) in the LB virtual machine group (i.e., LBGroup), network connectivity between the LB global controller (i.e., Controller) and the LB virtual machine group, the number or frequency of virtual services that undergo HA switching at the LB virtual machine group level, the number or frequency of virtual services that undergo HA switching at the VM level, the number or frequency of virtual services that undergo HA switching at the network card level, the number or frequency of virtual services that undergo HA switching at the virtual service level, the packet loss rate or retransmission rate of business-related network cards, the packet loss rate or retransmission rate of all network cards in the VM, the packet loss rate or retransmission rate of all network cards in the LB virtual machine group, a significant increase or instability in business network latency, a sudden increase or decrease in network card throughput, the health status between virtual machines, virtual machine monitoring indicator data, virtual machine internal system log data, the health status between virtual services and back-end servers, the packet loss rate or retransmission rate between virtual services and back-end servers, and the number of new connections or changes in the total number of connections of virtual services.

[0055] Preferably, as an implementation method, in the step of normalizing the collected current system status data, the normalization process uses a preset formula to normalize the data of the influencing factors of faults of different granularities to the range of [0, 1] (i.e., according to the preset formula, the fault probabilities corresponding to different granularities are calculated); the preset formula is .

[0056] Preferably, as an implementable embodiment; in the future failure probability prediction step, the machine learning model is selected from one of an LSTM model or a Transformer model.

[0057] Preferably, as an implementable method, in the disaster recovery switching preheating preparation step, the preheating mechanism includes starting hot standby in advance, synchronizing the virtual service status to the standby cluster, and taking over part of the virtual service traffic in the standby cluster in advance.

[0058] Preferably, as an implementable method, the multiple dimensions perform fault switching in sequence according to the priority relationship of LBGroup granularity, LB virtual machine granularity, virtual service group granularity and virtual service granularity.

[0059] Leveraging historical failure probability time series data, appropriate machine learning models (such as LSTM and Transformer) are employed to predict the failure probability at various fault granularities over a period of time. Based on predefined thresholds (e.g., 80% for LBGroup granularity, 70% for VM granularity, and 50% for virtual service group and virtual service granularity), a corresponding disaster recovery switchover is triggered when the predicted probability exceeds the threshold.

[0060] After predicting a potential failure, the system preheats for disaster recovery switching, including:

[0061] Hot standby is enabled: The status of all virtual services on the active cluster is synchronized to the standby cluster to ensure that the standby cluster is capable of taking over.

[0062] Traffic transfer: The standby cluster begins to transfer some virtual service traffic to ensure a quick response when a switch occurs, minimizing service interruption.

[0063] The technical solution implemented in this embodiment of the present invention achieves highly accurate and timely detection of load balancing system failures through real-time collection of multi-dimensional data and historical analysis and prediction. It triggers disaster recovery switchover based on the granularity of the failure, significantly improving the high availability and business continuity of the load balancing system. It is applicable to load balancing systems in various complex network environments.

[0064] Example 2

[0065] In addition, based on the same concept of the above method embodiment, the embodiment of the present invention also provides a multi-dimensional predictable load balancing fault switching system for implementing the above method of the present invention. Since the principle and method of solving the problem in the embodiment of the system are similar, it has at least all the beneficial effects brought by the technical solutions of the above embodiment, which will not be described in detail here. Figure 2 The multi-dimensional predictable load balancing failover system shown is as follows:

[0066] See also Figure 2 A multi-dimensional predictable load balancing fault switching system provided by the second embodiment of the present invention includes a collection module 10, a normalization processing module 20, a historical data analysis module 30, and a model processing module 40:

[0067] The collection module 10 is used to collect multi-dimensional fault indicators and the impact factors of faults of different granularities corresponding to the fault indicators based on the attribute characteristic information of the load balancing system to form current system status data, and to summarize the current system status data to form a data set;

[0068] Normalization processing module 20 is configured to normalize the collected current system status data; establish a mapping relationship table based on a data set formed from the aggregated current system status data, wherein the vertical items in the mapping relationship table are fault indicators, labeled F1, F2, ..., Fn from top to bottom; and the horizontal items in the mapping relationship table are the impact factors of faults of different granularities corresponding to the fault indicators, labeled L1, L2, L3, L4 from left to right; and calculate the fault probabilities corresponding to the different granularities according to a preset formula: i.e., the fault probability of L1, the fault probability of L2, the fault probability of L3, and the fault probability of L4.

[0069] The historical data analysis module 30 is used to calculate the current failure probability corresponding to each fault granularity according to the above preset formula and finally save it in the database; as time goes by, the failure probability corresponding to a set of time series is calculated in the database to obtain the time series data of historical failure probability;

[0070] The model processing module 40 is used to build a machine learning model based on the time series data of the historical failure probability, and use the machine learning model to predict the failure probability of each failure granularity within a preset period of time in the future; when the predicted failure probability exceeds the corresponding standard threshold, the preheating mechanism of disaster recovery switching is triggered, including the operations of hot standby startup, status synchronization and backup cluster traffic taking over.

[0071] The following describes the system architecture based on which the invention mechanism is based, where lbgroup represents a set of load balancing virtual machines. Figure 3 The following describes two disaster recovery modes: Mode 1, which uses active-standby mode at the LB Group level, and Mode 2, which uses active-active mode at the LB VM level. Both modes are triggered by the fault detection shown in the figure.

[0072] superior Figure 3 In the example, A represents an active virtual service, and S represents an inactive virtual service. A' represents an active virtual service deployed on another LBGroup. Similarly, S' represents an inactive virtual service deployed on another LBGroup. When a cluster-level or disaster recovery switch occurs, lbgroup-2 takes over the services of lbgroup-1. In this case, A' corresponds to A, and S' corresponds to S. When a VM-level switch occurs, services are switched between VMs in the same lbgroup. In this case, A corresponds to S, and A' corresponds to S'.

[0073] Fault detection, based on the load balancing system's control plane, collects real-time data from various dimensions within the load balancing system. By analyzing this multi-dimensional data, it determines the probability of a fault occurring now or within a certain period of time, triggering the system's internal disaster recovery switchover logic. This allows for preemptive disaster recovery switchover before the system actually fails or services become completely unavailable.

[0074] The second embodiment of the present invention provides a multi-dimensional predictable load balancing fault switching method, which mainly implements the processing steps of current system status collection, historical data analysis, future failure probability prediction, disaster recovery switching preheating preparation, etc. Figure 4 .

[0075] When collecting and processing the current system status, multi-dimensional fault indicators are collected based on the characteristics of the load balancer and the various levels of disaster recovery it supports to form the current status set. First, the present invention supports failover at the LBGroup, LB VM, virtual service group, and virtual service granularities. The priority order is: LBGroup > LB VM > virtual service group > virtual service. Second, corresponding indicator data is collected for each failover mode at different granularities.

[0076] Below, we list all possible indicators that may reflect faults and their impact factors on faults of different granularities. The impact factors are divided into three levels from high to low: 1, 0.5, and 0:

[0077] LBGroup granularity Virtual machine granularity Virtual service group granularity Virtual service granularity Network connectivity between LB VMs in the LB VM group 1 1 1 1 Network connectivity between the LB global controller and the LB virtual machine group (LBGroup) 0.5 0.5 0.5 0.5 The number and frequency of virtual services that experience HA switchover at the LB VM group level 1 1 1 1 Number and frequency of virtual services that experience HA switchover at the VM level 0.5 1 1 1 The number and frequency of virtual services that experience HA switching at the network card level 0.5 0.5 1 1 The number and frequency of virtual services that experience HA switchover at the virtual service level 0.5 0.5 0.5 1 Packet loss rate and retransmission rate of business-related network cards 0.5 0.5 1 1 Packet loss and retransmission rates for all network cards in the VM 0.5 1 1 1 Packet loss rate and retransmission rate of all network adapters in the LB virtual machine group 1 1 1 1 Business network latency increases significantly or becomes unstable 0 0 0.5 0.5 Network card throughput suddenly increases or decreases 0 0 0.5 0.5 Health status checks between virtual machines, such as VRRP based on keepalived 0 1 1 1 Virtual machine monitoring metrics, such as CPU utilization 1 1 1 1 Internal system logs of virtual machines to detect VM anomalies 1 1 1 1 The health status between the virtual service and the backend server 0 0 0.5 1 Packet loss rate and retransmission rate between the virtual service and the backend server 0 0 0.5 1 Number of new connections to the virtual service and changes in the total number of connections 0 0 0 1

[0078] Historical data analysis and processing: Based on the data obtained by the acquisition module 10, the historical data analysis module will first normalize the data and normalize the collected data to the range of [0,1]. The formula used is: ;

[0079] Then calculate the current failure probability based on the indicators and the corresponding influencing factors.

[0080] The various indicators in the above table are marked as F1, F2...Fn from top to bottom, and the granularity is marked as L1, L2, L3, L4 from left to right.

[0081] Then the current failure probability of L1 is F1*1+F2*0.5+F3*1+F4*0.5+....+Fn*0;

[0082] The failure probability of L2 is F1*1+F2*0.5+F3*1+F4*1+....+Fn*0;

[0083] The failure probability of L3 is F1*1+F2*0.5+F3*1+F4*1+....+Fn*0;

[0084] The failure probability of L4 is F1*1+F2*0.5+F3*1+F4*1+....+Fn*1;

[0085] Then, the fault probability corresponding to each fault granularity is calculated according to the above formula and finally saved in the database. As time goes by, a set of time series related fault probabilities will be obtained in the database, as follows Figure 5 shown.

[0086] Predict future failure probabilities. The historical data analysis module displays the corresponding failure rates for each disaster recovery granularity at each previous moment. Triggering disaster recovery thresholds are based on empirical values ​​or can be user-defined. When the failure rate reaches a certain threshold, disaster recovery at the corresponding granularity is triggered. For example, the failure threshold for the LBGroup granularity is 80, the failure threshold for the VM granularity is 70, and the failure thresholds for both the virtual service group granularity and the virtual service granularity are 50. Using time series data, you can view all the moments in historical data where the thresholds were reached and disaster recovery failover was triggered. This allows you to predict the probability of failure within a certain period of time in the future based on historical curves. Basic machine learning methods can be used, as well as models such as LSTM and transformers.

[0087] Finally, disaster recovery switchover warm-up preparation: Once a possible failure is predicted, the system immediately triggers a warm-up mechanism for disaster recovery switchover. This means disaster recovery preparation begins before a failure actually occurs. Key highlights include: 1. Hot standby is enabled in advance, synchronizing the status of all virtual services on the primary cluster to the backup cluster, improving timeliness when a switchover occurs. 2. The backup cluster begins accepting traffic for some virtual services, meaning newly created virtual services take precedence on the backup cluster.

[0088] Display effects, such as Figure 6 As shown, Figure 6 Medium gray indicates the faulty area, and white indicates the normal area. This describes the following: When a disaster recovery is predicted at the LBGroup or VM granularity, the active LB VM group synchronizes the status of all virtual services on it with the standby LB VM group, and the active LB VM synchronizes the status of all virtual services on it with the standby LB VM. Simultaneously, new virtual services are deployed and applied to the standby LB VM and standby LB VM group in a certain proportion. Similarly, the two disaster recovery switchover preparations described above are also implemented at the virtual service group or virtual service granularity.

[0089] In summary, the present invention provides a multi-dimensional and predictable load balancing failover method, which achieves significant technical effects through the following technical means:

[0090] By collecting and analyzing load balancing metrics across multiple dimensions (such as network connectivity, HA switchover frequency, packet loss rate, retransmission rate, and CPU utilization), the system comprehensively and meticulously monitors the operational status of the load balancing system, effectively covering potential failure points at different levels and granularities. Leveraging historical data analysis and advanced machine learning models (such as LSTM and Transformer), the system accurately predicts the probability of failure at various granularities within a given timeframe. This predictive capability enables the system to proactively identify potential failures and mitigate the impact of sudden outages on services.

[0091] Based on the prediction results of different fault granularities (such as LBGroup granularity, LB virtual machine granularity, virtual service group granularity and virtual service granularity), the corresponding level of disaster recovery switching strategy (active-standby mode or active-active mode) is dynamically selected to ensure efficient response in various fault scenarios and guarantee business continuity.

[0092] Simultaneously, disaster recovery switchover warm-up preparations are performed: When a potential failure is predicted, the disaster recovery switchover warm-up mechanism is initiated in advance, including hot standby activation, state synchronization, and traffic transfer to the backup cluster. This warm-up process significantly improves the response speed and success rate of disaster recovery switchovers, reducing service interruption in the event of an actual failure.

[0093] The technical solution adopted in the embodiment of the present invention uses the above-mentioned multi-dimensional prediction and flexible switching mechanism. The present invention can perceive and respond to various faults in the load balancing system more promptly and accurately, significantly improve the high availability and reliability of the load balancing system, ensure the stable operation of the business and the continuity of user experience, and has obvious technical advantages and practical application value.

[0094] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, and optical storage) containing computer-usable program code.

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

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

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

[0098] It should be noted that, in the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several distinct components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second and third etc. does not indicate any order. These words may be interpreted as names.

[0099] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0100] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A multi-dimensional predictable load balancing failover method, characterized in that: The following steps are involved: Based on the attribute characteristic information of the load balancing system, multi-dimensional fault indicators and the impact factors of the fault indicators on faults of different fault granularities are collected to form current system status data, and the current system status data is aggregated to form a data set; Normalizing the current system state data; and establishing a mapping relationship table based on a data set formed from the normalized current system state data, wherein the vertical items in the mapping relationship table are fault indicators and are labeled F1, F2, ..., Fn from top to bottom; the horizontal items in the mapping relationship table are fault granularities and are labeled L1, L2, L3, L4 from left to right; and the data items in the mapping relationship table are the impact factors of the fault indicator corresponding to the row of the data item on the fault granularity corresponding to the column of the data item; Based on the fault indicators and corresponding influencing factors, the failure probability corresponding to each current fault granularity is calculated: namely, the failure probability of L1, L2, L3, and L4, and finally saved in the database. Over time, the failure probabilities corresponding to a set of time series are summarized in the database to obtain time series data of historical failure probabilities. A machine learning model is constructed based on this time series data of historical failure probabilities, and the machine learning model is used to predict the failure probability of each fault granularity within a preset period of time in the future. When the predicted failure probability exceeds the corresponding standard threshold, the preheating mechanism of disaster recovery switching of the corresponding fault granularity is triggered, wherein each fault granularity is set with a corresponding standard threshold.

2. The method according to claim 1, characterized in that The load balancing failover method supports the active-standby mode at the LBGroup granularity and the active-active mode at the LB virtual machine granularity.

3. The method according to claim 1, characterized in that The attribute characteristic information of the load balancing system includes network connectivity information, switching frequency information, network status information and virtual machine information.

4. The method according to claim 1, wherein The machine learning model is selected from an LSTM model or a Transformer model.

5. The method according to claim 1, wherein The preheating mechanism includes enabling hot standby in advance, synchronizing virtual service status to the standby cluster, and taking over part of the virtual service traffic in the standby cluster in advance.

6. A multi-dimensional predictable load balancing failover system, characterized in that: Including acquisition module, normalization processing module, historical data analysis module and model processing module: The acquisition module is configured to collect multi-dimensional fault indicators and the impact factors of the fault indicators on faults of different fault granularities based on the attribute characteristic information of the load balancing system, form current system status data, and aggregate the current system status data to form a data set; The normalization processing module is used to perform normalization processing on the current system state data; A mapping relationship table is established based on a data set formed from the normalized current system state data. The vertical items in the mapping relationship table are fault indicators, and are labeled F1, F2, ..., Fn from top to bottom; the horizontal items in the mapping relationship table are fault granularities, and the fault granularities are labeled L1, L2, L3, L4 from left to right; and the data items in the mapping relationship table are the impact factors of the fault indicator corresponding to the row where the data item is located on the fault granularity corresponding to the column where the data item is located; The historical data analysis module is used to calculate the failure probability corresponding to each current fault granularity based on the fault indicator and the corresponding influencing factor: that is, the failure probability of L1, the failure probability of L2, the failure probability of L3, and the failure probability of L4, and finally save it to the database. As time goes by, the failure probabilities corresponding to a set of time series are summarized in the database to obtain time series data of historical failure probabilities; The model processing module is used to build a machine learning model based on the time series data of the historical failure probability, and use the machine learning model to predict the failure probability of each fault granularity within a preset period of time in the future; when the predicted failure probability exceeds the corresponding standard threshold, the preheating mechanism of disaster recovery switching of the corresponding fault granularity is triggered, wherein each fault granularity is set with a corresponding standard threshold.