Excess load estimation method, device, equipment and storage medium under load balancing

By obtaining the balance state and inverse scale parameters of the load balancer in the distributed system, combined with the shape parameters and load estimation model, the problem of accurate estimation of excess load in the microservice distributed system is solved, and timely alarm of excess load and system stability guarantee are achieved.

CN114035965BActive Publication Date: 2025-09-16SHANGHAI PARAVIEW SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111400646.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-09-16
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

In microservice distributed systems, existing technologies cannot accurately predict overload situations, resulting in prolonged response times, affecting user experience and potentially endangering system security.

Method used

By obtaining the equilibrium state and inverse scale parameters of the load balancer in the distributed system, combining the shape parameters and a predetermined load estimation model, the excess load probability is determined and a load estimation model is constructed for accurate estimation.

Benefits of technology

The accuracy of overload probability estimation is improved, ensuring that the system issues timely warnings before overload occurs, avoiding extended response time and safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035965B_ABST
    Figure CN114035965B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, apparatus, device and storage medium for estimating excess load under load balancing, the method comprising: obtaining the equilibrium state and inverse scale parameter of the load balancer in the distributed system, wherein the inverse scale parameter is determined according to the frequency of excess load in the historical data of system operation; for each load balancer, determining the shape parameter according to each equilibrium state; determining the excess load probability based on the shape parameter and the inverse scale parameter combined with a predetermined load estimation model. The problem of being unable to accurately estimate the excess load situation in the system is solved. A load estimation model is pre-constructed to estimate the load excess probability, the shape parameter is determined by the equilibrium state of the load balancer in the distributed system, and then the excess load probability is determined according to the load estimation model, and the excess load in the system is accurately estimated. The equilibrium state of each load balancer is taken into consideration when estimating the excess load probability, thereby improving the accuracy of the excess load probability estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of distributed technology, and in particular to a method, apparatus, device, and storage medium for estimating excess load under load balancing. Background Art

[0002] Microservice distributed systems are a common architecture used in modern computer systems for large-scale application development. Each microservice in a distributed system is called a node, and each node handles different tasks. The same microservice may be served by one or more nodes. Each node in the system processes various requests, but each node has limited resources, and therefore its request processing capacity. If a node receives too many instantaneous requests, it will be overloaded. This can cause service response times to lengthen, impacting user experience and even system security, resulting in financial losses. Therefore, accurately predicting overload is crucial. Summary of the Invention

[0003] The present invention provides a method, device, equipment and storage medium for estimating excess load under load balancing, so as to achieve accurate estimation of excess load in a distributed system.

[0004] In a first aspect, an embodiment of the present invention provides a method for estimating excess load under load balancing, the method comprising:

[0005] Obtaining a balancing state and an inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined based on a frequency of excess load in historical system operation data;

[0006] For each load balancer, determining a shape parameter according to each of the balancing states;

[0007] An excess load probability is determined based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model.

[0008] Furthermore, determining the shape parameter according to each equilibrium state includes:

[0009] When at least one of the balancing states is load balancing, determining the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer;

[0010] Determine the reciprocal of the total number of service nodes as a shape parameter;

[0011] When all the balancing states are in a state where load balancing is not performed, obtaining a total number of load balancers in the distributed system;

[0012] The inverse of the total number of equalizers is determined as a shape parameter.

[0013] Furthermore, determining the excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model includes:

[0014] Determining a density distribution parameter according to the shape parameter, the inverse scale parameter, and a calculation formula of a load estimation model;

[0015] The excess load probability is determined according to the density distribution parameter, the total number of load balancers in the distributed system, and a probability calculation formula of a load estimation model.

[0016] Furthermore, determining the density distribution parameter according to the shape parameter, the inverse scale parameter and the calculation formula of the load estimation model includes:

[0017] determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter;

[0018] The density distribution parameter is determined according to the target distribution parameter and a calculation formula of the load estimation model.

[0019] Furthermore, the method further comprises:

[0020] Based on the probability of excess load per unit time of nodes in the distributed system, an exponential distribution model of nodes is established to determine the exponential model parameters;

[0021] Modeling the node excess load gamma distribution based on the exponential model parameters, the system node load relationship, and the total number of nodes;

[0022] Poisson distribution modeling of the distributed system is performed according to the total number of balancers of the load balancer and the modeling results of the gamma distribution modeling, and a load estimation model is obtained.

[0023] Furthermore, the method further comprises:

[0024] comparing the excess load probability with a corresponding probability threshold, wherein the probability threshold is related to the equilibrium state;

[0025] If the overload probability is greater than the corresponding probability threshold, an overload alarm is issued.

[0026] In a second aspect, an embodiment of the present invention further provides a device for estimating excess load under load balancing, the device for estimating excess load under load balancing comprising:

[0027] A state acquisition module, configured to acquire a balancing state and an inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined based on the frequency of excess load in historical system operation data;

[0028] a shape parameter determination module, configured to determine a shape parameter for each load balancer according to each of the balancing states;

[0029] A probability determination module is used to determine the excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model.

[0030] Furthermore, the shape parameter determination module includes:

[0031] a node total number determining unit, configured to determine the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer when at least one of the balancing states is load balancing;

[0032] a first parameter determining unit, configured to determine the reciprocal of the total number of service nodes as a shape parameter;

[0033] a balancer total number determining unit, configured to obtain the total number of load balancers in the distributed system when all the balancing states are in a state of not performing load balancing;

[0034] The second parameter determination unit is configured to determine the reciprocal of the total number of equalizers as a shape parameter.

[0035] Furthermore, the probability determination module includes:

[0036] a parameter determination unit, configured to determine a density distribution parameter according to the shape parameter, the inverse scale parameter, and a calculation formula of a load estimation model;

[0037] A probability determination unit is used to determine the excess load probability according to the density distribution parameter, the total number of load balancers in the distributed system and a probability calculation formula of a load estimation model.

[0038] Furthermore, the parameter determination unit is specifically configured to: determine a target distribution parameter according to the product of the shape parameter and the inverse scale parameter; and determine a density distribution parameter according to the target distribution parameter and a calculation formula of a load estimation model.

[0039] Furthermore, the device also includes:

[0040] An exponential modeling module is used to perform exponential distribution modeling of nodes based on the probability of excess load per unit time of nodes in a distributed system and determine exponential model parameters;

[0041] A gamma modeling module, configured to perform gamma distribution modeling of node excess load based on the exponential model parameters, the system node load relationship, and the total number of nodes;

[0042] The Poisson modeling module is used to perform Poisson distribution modeling of the distributed system according to the total number of balancers of the load balancer and the modeling result of the gamma distribution modeling to obtain a load estimation model.

[0043] Furthermore, the device also includes:

[0044] a comparing module, configured to compare the excess load probability with a corresponding probability threshold, wherein the probability threshold is related to the equilibrium state;

[0045] The alarm module is configured to issue an overload alarm if the overload probability is greater than a corresponding probability threshold.

[0046] In a third aspect, an embodiment of the present invention further provides a computer device, the device comprising:

[0047] one or more processors;

[0048] a memory for storing one or more programs,

[0049] When the one or more programs are executed by the one or more processors, the one or more processors implement a method for estimating excess load under load balancing as described in any one of the embodiments of the present invention.

[0050] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for estimating excess load under load balancing as described in any one of the embodiments of the present invention.

[0051] The embodiment of the present invention provides a method, apparatus, device and storage medium for estimating excess load under load balancing, which obtains the equilibrium state and inverse scale parameter of the load balancer in the distributed system, wherein the inverse scale parameter is determined according to the frequency of excess load in the historical data of system operation; for each load balancer, a shape parameter is determined according to each of the equilibrium states; based on the shape parameter and the inverse scale parameter combined with a predetermined load estimation model, the excess load probability is determined. This solves the problem of being unable to accurately estimate the excess load situation in the system. A load estimation model is pre-constructed, and the probability of excess load of the distributed system is estimated by the load estimation model. The shape parameter is determined by the equilibrium state of the load balancer in the distributed system, and the excess load probability is determined based on the shape parameter and the inverse scale parameter combined with the load estimation model, so as to accurately estimate the excess load in the system. When estimating the excess load probability, the equilibrium state of each load balancer is taken into consideration, thereby improving the accuracy of the excess load probability estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a flow chart of a method for estimating excess load under load balancing in embodiment 1 of the present invention;

[0053] Figure 2 This is a flow chart of a method for estimating excess load under load balancing in the second embodiment of the present invention;

[0054] Figure 3 This is an example diagram of an implementation of a method for estimating excess load under load balancing in the second embodiment of the present invention;

[0055] Figure 4 This is a schematic structural diagram of an excess load estimation device under load balancing in Embodiment 3 of the present invention;

[0056] Figure 5 It is a structural diagram of a computer device in embodiment 4 of the present invention. DETAILED DESCRIPTION

[0057] To make the purpose, technical solutions, and advantages of this application more clear, the embodiments of this application will be further described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0058] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0059] In the description of this application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.

[0060] Example 1

[0061] Figure 1A flowchart illustrating a method for estimating excess load under load balancing, provided in Example 1 of the present application, is provided. This method is applicable to situations where excess load estimation is performed under load balancing conditions in a distributed system. The method can be executed by a computer device, which can be composed of two or more physical entities or a single physical entity. Generally speaking, the computer device can be a laptop, desktop computer, smart tablet, etc.

[0062] like Figure 1 As shown, the first embodiment provides a method for estimating excess load under load balancing, which specifically includes the following steps:

[0063] S110 , obtaining a balancing state and an inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined according to a frequency of excess load in historical system operation data.

[0064] It should be noted that the method for estimating excess load under load balancing provided in the embodiments of the present application can estimate excess load in real time while taking into account the load balancing conditions of the distributed system. For example, a collection interval is set, and data is collected periodically according to the collection interval. At each data collection time, the balance state is collected to achieve an excess load estimation. The method used in any excess load estimation is the same, that is, the excess load estimation is performed through S120-S130.

[0065] In this embodiment, a load balancer is a hardware device that distributes network requests to available servers in a server cluster, manages incoming Web data traffic, and increases effective network bandwidth, thereby balancing requests processed by each node in a distributed system. The balancing state can be specifically understood as the operating state of the load balancer, that is, whether load balancing is being performed. The inverse scale parameter can be specifically understood as a parameter used to estimate excess load, which is related to the probability of excess load occurring. System operation history data can be specifically understood as historical data generated during the operation of the distributed system, such as whether excess load occurs, when the excess load occurs, when it ends, etc.

[0066] Specifically, the load balancer's balancing state includes load balancing and non-load balancing. The balancing state of each load balancer in the distributed system can be manually pre-set or configured based on the distributed system's operating conditions. Alternatively, trigger conditions can be set based on the distributed system's operating conditions. When the trigger conditions are met, the load balancer begins load balancing. When performing excess load estimation, the balancing state of each load balancer in the distributed system is directly obtained.

[0067] The inverse scale parameter can be determined by obtaining historical system operation data, counting the time when excess load occurs per unit time at each node, and obtaining the time value by calculating the time mean, median, maximum value, minimum value, weighted average, etc. The reciprocal of this time value is used as the frequency of excess load, and the frequency is used as the inverse scale parameter.

[0068] It is important to note that the inverse scaling parameter can be determined at regular intervals. For example, the inverse scaling parameter may be determined once a day. Excess load may be determined multiple times during the day, so the same inverse scaling parameter is used each time the excess load is determined. Alternatively, the inverse scaling parameter may be determined each time the excess load is determined, based on the frequency of excess load in historical system operation data prior to the current time.

[0069] S120 : For each load balancer, determine a shape parameter according to each balancing state.

[0070] In this embodiment, the shape parameter can be specifically understood as a parameter required for estimating excess load of a distributed system. The shape parameter is a parameter in a load estimation model.

[0071] Specifically, the balancing status of each load balancer in the distributed system will affect the prediction of excess load. For each load balancer, the shape parameter is calculated based on the balancing status of all load balancers combined with the service type of the load balancer or the total number of balancers in the distributed system.

[0072] S130 : Determine an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model.

[0073] In this embodiment, the load estimation model can be specifically understood as a mathematical statistical model for overload estimation; the overload probability can be specifically understood as the probability of overload when a node in the system processes a request. The load estimation model in the embodiment of the present application is formed by Bayesian statistical modeling.

[0074] Specifically, the shape parameter and the inverse scale parameter are used as parameters of the load estimation model, and the calculation formula of the load estimation model is combined with the total number of load balancers in the distributed system to calculate and predict the excess load probability.

[0075] An embodiment of the present invention provides a method for estimating excess load under load balancing, by obtaining the equilibrium state and inverse scale parameter of the load balancer in the distributed system, wherein the inverse scale parameter is determined according to the frequency of excess load in the historical data of system operation; for each load balancer, a shape parameter is determined according to each of the equilibrium states; and the excess load probability is determined based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model. This solves the problem of being unable to accurately estimate the overload situation in the system. A load estimation model is pre-constructed, and the load excess probability of the distributed system is estimated by the load estimation model. The shape parameter is determined by the equilibrium state of the load balancer in the distributed system, and the excess load probability is determined based on the shape parameter and the inverse scale parameter in combination with the load estimation model, so as to accurately estimate the excess load in the system. The equilibrium state of each load balancer is taken into consideration when estimating the excess load probability, thereby improving the accuracy of the excess load probability estimation.

[0076] Example 2

[0077] Figure 2 This is a flow chart of a method for estimating excess load under load balancing provided in the second embodiment of the present invention. The technical solution of this embodiment is further refined on the basis of the above technical solution, and specifically includes the following steps:

[0078] S201 : Perform exponential distribution modeling of nodes according to the unit time excess load probability of nodes in the distributed system, and determine exponential model parameters.

[0079] In this embodiment, the overload probability per unit time may be specifically understood as the probability of an overload condition occurring at each node within a unit time.

[0080] Specifically, the system usually contains multiple nodes, X i Indicates that the i-node is overloaded; τ i is the probability of node i experiencing overload in unit time, i.e., unit overload probability. i We can use a parameter τ i The exponential distribution model of X i |τ i ~Exp(τ i ), the density function is Parameter τ i are the exponential model parameters.

[0081] S202: Gamma distribution modeling of node excess load is performed based on exponential model parameters, system node load relationship, and the total number of nodes.

[0082] In this embodiment, the total number of nodes refers to the total number of service nodes that process requests in the distributed system. The system node load relationship is the situation where there is an overload in the system, that is, when any node in the system is overloaded, Indicates that n is the total number of nodes. For example, consider the case where n nodes are overloaded independently.

[0083] Due to X i |τ i ~Exp(τ i ), assuming that all nodes are overloaded independently, that is, τ i =τ. According to the knowledge of statistical distribution, the prior distribution model can be obtained by combining Formula 1 and Formula 2, that is, the result of gamma distribution modeling: Y|τ~Gamma(n,τ), where n is the total number of nodes and τ can be estimated based on experience or historical data. Therefore, in the system model, τ is a known number.

[0084] S203 : Perform Poisson distribution modeling of the distributed system according to the total number of load balancers and the modeling result of the gamma distribution modeling to obtain a load estimation model.

[0085] In this embodiment, the total number of balancers refers to the total number of all balancers in the distributed system.

[0086] Specifically, when constructing the load estimation model, the total number of balancers in the distributed system is counted. In the embodiment of the present application, the total number of balancers in the system is equal to k as an example.

[0087] Y is the occurrence of overload in the system; λ is the expected number of overload occurrences per unit time; Y is modeled using a Poisson distribution with a parameter λ, i.e., Y|λ~Poisson(λ);

[0088] The density function is

[0089] Since Y|λ~Poisson(λ), assume that λ|Y follows the conjugate distribution of the Poisson distribution, that is, λ|Y∝Gamma(α,β), where α can be randomly selected from any real number greater than 0. Since β involves frequency, τ can be used as an estimate, that is, β=τ. The likelihood function can be obtained from Formula 3: λ|Y∝Gamma(α,τ). According to Posson(2τλ)∝Gamma(n,τ)*gamma(α,τ), the final load estimation model Y|λ∝Poisson(2τλ) is obtained.

[0090] It should be noted that after constructing the load estimation model through S201-S203, when performing subsequent excess load probability estimation, since the excess load probability is repeated, only the constructed load estimation model needs to be used at this time, and there is no need to repeat S201-S203 to construct the load estimation model.

[0091] S204: Obtain a balancing state and an inverse scale parameter of a load balancer in the distributed system, wherein the inverse scale parameter is determined according to the frequency of excess load in historical system operation data.

[0092] S205 : For each load balancer, when there is at least one balancing state of load balancing, determine the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer.

[0093] In this embodiment, the service type can be specifically understood as the type of request processed by the distributed system, for example, transaction service, verification service, etc. The total number of service nodes can be specifically understood as the total number of nodes processing a service type.

[0094] For example, there are n nodes in the distributed system, and the overload situations of the n nodes are independent of each other. There are k types of services in the system, and the total number of service nodes corresponding to each type of service is n. k , obviously Consider the use of load balancing components (such as Nginx), load balancing is only performed on each node of the same type of service, that is, there are k load balancers, each of which is used by n nodes. k Nodes perform load balancing.

[0095] Specifically, for each load balancer j, determine the balance status of all load balancers in the distributed system. If there is at least one balance status that is load balancing, determine the service type carried by this load balancer j, and determine the total number of service nodes n according to the service type. j , the total number of service nodes n j Determine the total number of service nodes corresponding to the load balancer.

[0096] S206: Determine the reciprocal of the total number of service nodes as a shape parameter.

[0097] Calculate the inverse of the total number of service nodes and use it as the shape parameter. This shape parameter, when used to calculate the excess load probability, will be used to calculate the excess load probability for that service type. The principle behind this calculation is the same as calculating the total number of service nodes for each service type.

[0098] S207: When all balancing states are not performing load balancing, obtain the total number of load balancers in the distributed system.

[0099] S208. Determine the reciprocal of the total number of equalizers as a shape parameter.

[0100] If all balancing states in the distributed system are not load balancing, this indicates that all load balancers in the distributed system are not working. The reciprocal of the total number of balancers is directly used as the shape parameter. When the shape parameter is calculated in this case, the excess load probability obtained in the subsequent calculation of the excess load probability becomes the system's excess load probability.

[0101] It should be noted that steps S205 - S206 and S207 - S208 are parallel steps and there is no order in which they are executed.

[0102] S209: Determine density distribution parameters according to the shape parameter, the inverse scale parameter, and the calculation formula of the load estimation model.

[0103] In this embodiment, the density distribution parameter can be specifically understood as the number of occurrences of overload conditions in the system. The density distribution parameter in this embodiment is used as the parameter λ in the Poisson distribution for probability calculation. The mathematical meaning of the shape parameter is incorporated into the calculation formula of the load estimation model to obtain the density distribution parameter.

[0104] As an optional embodiment of this embodiment, this optional embodiment further optimizes the density distribution parameter determined according to the calculation formula of the shape parameter and the load estimation model to:

[0105] A1. Determine the target distribution parameters based on the product of the shape parameter and the inverse scale parameter.

[0106] In this embodiment, the target distribution parameter can be specifically understood as the parameter used in the model calculation when estimating excess load. The inverse scale parameter can be specifically understood as the parameter used when estimating excess load and is related to the probability of excess load. The mean ατ of the model likelihood function Gamma(α, τ) is calculated, and the shape parameter α is multiplied with the inverse scale parameter τ. The resulting product is used as the target distribution parameter.

[0107] A2. Determine the density distribution parameters based on the target distribution parameters and the calculation formula of the load estimation model.

[0108] The calculation formula of the load estimation model in the embodiment of the present application refers to 2τλ in Poisson(2τλ), that is, the inverse scale parameter is multiplied by the target distribution parameter, and then multiplied by a multiple of 2 to obtain the density distribution parameter.

[0109] S210 : Determine an excess load probability according to a density distribution parameter, a total number of load balancers in the distributed system, and a probability calculation formula of a load estimation model.

[0110] The probability calculation formula of the load estimation model in the embodiment of the present application is Formula 3: Where k is the total number of equalizers. Substitute the density distribution parameter as λ in Formula 3 to calculate the excess load probability.

[0111] S211 . Compare the excess load probability with a corresponding probability threshold, where the probability threshold is related to the equilibrium state.

[0112] In this embodiment, the probability threshold can be understood as a pre-set boundary value for determining whether the overload probability meets the requirements. The probability threshold represents the maximum probability of overload that the system can tolerate. The probability threshold can also be adjusted in real time based on the actual system operation. The probability threshold is related to each balancing state. For example, if all balancing states of the load balancer are not load balancing and if at least one balancing state is load balancing, the corresponding probability threshold will be different.

[0113] Specifically, a probability threshold is set in advance based on the specific service tolerance and the actual overload impact, and can be set to 80% for example. After determining the overload probability based on each equilibrium state, the overload probability is compared with the corresponding probability threshold.

[0114] S212: If the overload probability is greater than the corresponding probability threshold, an overload alarm is issued.

[0115] If the overload probability exceeds the corresponding probability threshold, the system is overloaded and an overload alarm is issued to staff. This alarm can be a voice prompt (e.g., a continuous alarm sound, a set alarm sound, or a voice message saying "system overload"), an email notification, or a flashing light. If the overload probability is less than the probability threshold, the system waits for the next overload probability determination time and continues to monitor the system's overload probability.

[0116] For example, Figure 3 This is a diagram illustrating an implementation example of a method for estimating excess load under load balancing provided by an embodiment of the present invention.

[0117] S301. Obtain system operation history data.

[0118] S302: Determine an inverse scale parameter τ according to the probability of excess load in historical system operation data.

[0119] S303: Monitor all load balancers in the distributed system in real time to obtain the load balancer's balancing status.

[0120] S304: Determine whether all balancing states are not performing load balancing. If so, execute S305; otherwise, execute S306.

[0121] S305: Determine the reciprocal of the total number k of equalizers as the shape parameter α.

[0122] S306: The total number of service nodes n j The reciprocal of is determined as the shape parameter α, n j is the total number of service nodes corresponding to the j-th load balancer.

[0123] It should be noted that S1-S2 and S3-S6 are parallel steps and there is no order in execution, and the inverse scale parameter τ can be determined in real time or kept unchanged for a period of time after determination and used directly. Figure 3 Take immutability as an example.

[0124] S307 : Determine the statistical distribution Gamma(α, τ) based on the pre-built load estimation model and in combination with the inverse scale parameter τ and the shape parameter α.

[0125] S308. Utilize the mean value of Gamma (α, τ) to estimate the target distribution parameter ατ.

[0126] S309. Construct the distribution Poisson(2τ(ατ)).

[0127] S310 . Calculate the probability of Y=1 according to the density function, that is, the excess load probability p.

[0128] That is, 2τ*ατ is brought in as λ Calculate p in.

[0129] S311. Determine whether p is greater than the corresponding q (probability threshold). If so, execute S312; otherwise, return to S303.

[0130] S312: Issue an overload alarm.

[0131] Figure 3 The implementation of the provided method for estimating excess load under load balancing uses a periodic check of system excess load as an example. When the scheduled check time arrives, the system's excess load probability p is determined. If p is greater than q, an alarm is issued; if p is less than q, the system's excess load probability p is further checked. If an alarm is issued, and the system is monitored to be back to normal after the alarm (either by staff repairs or by the system itself), the process returns to S303. Alternatively, after a period of alarming, regardless of whether the system has returned to normal, the process returns to S303.

[0132] An embodiment of the present invention provides a method for estimating excess load under load balancing. The method obtains the equilibrium state and inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined based on the frequency of excess load in the system operation history data; determines a shape parameter for each load balancer based on each equilibrium state; and determines the excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model. This method solves the problem of being unable to accurately estimate the excess load situation in the system. A load estimation model is constructed in advance based on the unit excess load probability, the total number of balancers, and the total number of nodes, and the load excess probability of the distributed system is estimated using the load estimation model. The shape parameter is determined based on the equilibrium state of the load balancer in the distributed system, and the excess load probability of the system or a service type is determined based on the shape parameter and the inverse scale parameter in combination with the load estimation model, thereby accurately estimating the excess load in the system. By considering the equilibrium state of each load balancer, the excess load probability under different circumstances is determined, thereby improving the accuracy of the excess load probability estimation.

[0133] Example 3

[0134] Figure 4 This is a structural diagram of an excess load estimation device under load balancing provided by the third embodiment of the present invention. The device includes: a state acquisition module 41, a shape parameter determination module 42 and a probability determination module 43.

[0135] The state acquisition module 41 is used to obtain the balance state and inverse scale parameter of the load balancer in the distributed system, wherein the inverse scale parameter is determined according to the frequency of excess load in the system operation history data;

[0136] a shape parameter determination module 42, configured to determine a shape parameter for each load balancer according to each of the balancing states;

[0137] Probability determination module 43, for determining the excess load probability based on the shape parameter and the inverse scale parameter combined with a predetermined load estimation model.

[0138] An embodiment of the present invention provides an excess load estimation device under load balancing, which obtains the equilibrium state and inverse scale parameter of the load balancer in the distributed system, wherein the inverse scale parameter is determined according to the frequency of excess load in the system operation history data; for each load balancer, a shape parameter is determined according to each of the equilibrium states; and the excess load probability is determined based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model. This solves the problem of being unable to accurately estimate the overload situation in the system. A load estimation model is pre-constructed, and the load excess probability of the distributed system is estimated by the load estimation model. The shape parameter is determined by the equilibrium state of the load balancer in the distributed system, and the excess load probability is determined based on the shape parameter in combination with the load estimation model, so as to accurately estimate the excess load in the system. The equilibrium state of each load balancer is taken into consideration when estimating the excess load probability, thereby improving the accuracy of the excess load probability estimation.

[0139] Furthermore, the shape parameter determination module 42 includes:

[0140] a node total number determining unit, configured to determine the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer when at least one of the balancing states is load balancing;

[0141] a first parameter determining unit, configured to determine the reciprocal of the total number of service nodes as a shape parameter;

[0142] a balancer total number determining unit, configured to obtain the total number of load balancers in the distributed system when all the balancing states are in a state of not performing load balancing;

[0143] The second parameter determination unit is configured to determine the reciprocal of the total number of equalizers as a shape parameter.

[0144] Furthermore, the probability determination module 43 includes:

[0145] a parameter determination unit, configured to determine a density distribution parameter according to the shape parameter, the inverse scale parameter, and a calculation formula of a load estimation model;

[0146] A probability determination unit is used to determine the excess load probability according to the density distribution parameter, the total number of load balancers in the distributed system and a probability calculation formula of a load estimation model.

[0147] Furthermore, the parameter determination unit is specifically configured to: determine a target distribution parameter according to the product of the shape parameter and the inverse scale parameter; and determine a density distribution parameter according to the target distribution parameter and a calculation formula of a load estimation model.

[0148] Furthermore, the device also includes:

[0149] An exponential modeling module is used to perform exponential distribution modeling of nodes based on the probability of excess load per unit time of nodes in a distributed system and determine exponential model parameters;

[0150] Modeling the node excess load gamma distribution based on the exponential model parameters, the system node load relationship, and the total number of nodes;

[0151] The Poisson modeling module is used to perform Poisson distribution modeling of the distributed system according to the total number of balancers of the load balancer and the modeling result of the gamma distribution modeling, so as to obtain a load estimation model.

[0152] Furthermore, the device also includes:

[0153] a comparing module, configured to compare the excess load probability with a corresponding probability threshold, wherein the probability threshold is related to the equilibrium state;

[0154] The alarm module is configured to issue an overload alarm if the overload probability is greater than a corresponding probability threshold.

[0155] The excess load estimation device under load balancing provided by the embodiment of the present invention can execute the excess load estimation method under load balancing provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0156] Example 4

[0157] Figure 5 A schematic diagram of the structure of a computer device provided in the fourth embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes a processor 50, a memory 51, an input device 52 and an output device 53; the number of processors 50 in the device can be one or more. Figure 5 In the embodiment, a processor 50 is used as an example; the processor 50, the memory 51, the input device 52 and the output device 53 in the device can be connected by a bus or other means. Figure 5 The bus connection is taken as an example.

[0158] The memory 51, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for estimating excess load under load balancing in the embodiments of the present invention (e.g., the state acquisition module 41, shape parameter determination module 42, and probability determination module 43 in the apparatus for estimating excess load under load balancing). The processor 50 executes the software programs, instructions, and modules stored in the memory 51 to execute various functional applications and data processing of the device, thereby implementing the above-mentioned method for estimating excess load under load balancing.

[0159] The memory 51 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal, etc. Furthermore, the memory 51 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 51 may further include memory remotely located relative to the processor 50, and these remote memories may be connected to the device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0160] The input device 52 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 53 may include a display device such as a display screen.

[0161] Example 5

[0162] A fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, the computer-executable instructions are used to perform a method for estimating excess load under load balancing. The method includes:

[0163] Obtaining a balancing state and an inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined based on a frequency of excess load in historical system operation data;

[0164] For each load balancer, determining a shape parameter according to each of the balancing states;

[0165] An excess load probability is determined based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model.

[0166] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the excess load estimation method under load balancing provided in any embodiment of the present invention.

[0167] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0168] It is worth noting that in the embodiment of the excess load estimation device under the above-mentioned load balancing, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0169] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for estimating excess load under load balancing, characterized in that: include: Obtaining a balancing state and an inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined based on a frequency of excess load in historical system operation data; For each load balancer, determining a shape parameter according to each of the balancing states; determining an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model; Determining the shape parameter according to each equilibrium state includes: When at least one of the balancing states is load balancing, determining the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer; Determine the reciprocal of the total number of service nodes as a shape parameter; When all the balancing states are in a state where load balancing is not performed, obtaining a total number of load balancers in the distributed system; determining the reciprocal of the total number of equalizers as a shape parameter; The determining of the excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model includes: Determining a density distribution parameter according to the shape parameter, the inverse scale parameter, and a calculation formula of a load estimation model; determining an excess load probability based on the density distribution parameter, a total number of load balancers in the distributed system, and a probability calculation formula of a load estimation model; The step of generating the load estimation model includes: Based on the probability of excess load per unit time of nodes in the distributed system, an exponential distribution model of nodes is established to determine the exponential model parameters; Modeling the node excess load gamma distribution based on the exponential model parameters, the system node load relationship, and the total number of nodes; Poisson distribution modeling of the distributed system is performed according to the total number of balancers of the load balancer and the modeling results of the gamma distribution modeling, and a load estimation model is obtained.

2. The method according to claim 1, characterized in that The determining of the density distribution parameter according to the shape parameter, the inverse scale parameter and the calculation formula of the load estimation model includes: determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter; The density distribution parameter is determined according to the target distribution parameter and a calculation formula of the load estimation model.

3. The method according to any one of claims 1-2, characterized in that Also includes: comparing the excess load probability with a corresponding probability threshold, wherein the probability threshold is related to the equilibrium state; If the overload probability is greater than the corresponding probability threshold, an overload alarm is issued.

4. A device for estimating excess load under load balancing, characterized in that: include: A state acquisition module, configured to acquire a balancing state and an inverse scale parameter of a load balancer in a distributed system, wherein the inverse scale parameter is determined based on the frequency of excess load in historical system operation data; a shape parameter determination module, configured to determine a shape parameter for each load balancer according to each of the balancing states; a probability determination module, configured to determine an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model; The shape parameter determination module includes: a node total number determining unit, configured to determine the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer when at least one of the balancing states is load balancing; a first parameter determining unit, configured to determine the reciprocal of the total number of service nodes as a shape parameter; a balancer total number determining unit, configured to obtain the total number of load balancers in the distributed system when all the balancing states are in a state of not performing load balancing; a second parameter determination unit, configured to determine the reciprocal of the total number of equalizers as a shape parameter; The probability determination module includes: a parameter determination unit, configured to determine a density distribution parameter according to the shape parameter, the inverse scale parameter, and a calculation formula of a load estimation model; a probability determination unit, configured to determine an excess load probability based on the density distribution parameter, a total number of load balancers in the distributed system, and a probability calculation formula of a load estimation model; The device further comprises: An exponential modeling module is used to perform exponential distribution modeling of nodes based on the probability of excess load per unit time of nodes in a distributed system and determine exponential model parameters; A gamma modeling module, configured to perform gamma distribution modeling of node excess load based on the exponential model parameters, the system node load relationship, and the total number of nodes; The Poisson modeling module is used to perform Poisson distribution modeling of the distributed system according to the total number of balancers of the load balancer and the modeling result of the gamma distribution modeling, so as to obtain a load estimation model.

5. A computer device, characterized in that: The device comprises: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the excess load estimation method under load balancing as described in any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for estimating excess load under load balancing as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Method for monitoring, predicting and simulating non-stable web flows

    CN102571432A

  • Load balancing method, load balancing device and readable storage medium

    CN111491027A