CN114035965A - Excess load estimation method, device, equipment and storage medium under load balance - Google Patents

Excess load estimation method, device, equipment and storage medium under load balance Download PDF

Info

Publication number
CN114035965A
CN114035965A CN202111400646.5A CN202111400646A CN114035965A CN 114035965 A CN114035965 A CN 114035965A CN 202111400646 A CN202111400646 A CN 202111400646A CN 114035965 A CN114035965 A CN 114035965A
Authority
CN
China
Prior art keywords
load
determining
excess
probability
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111400646.5A
Other languages
Chinese (zh)
Inventor
徐莉莎
陈远猷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Para Software Co ltd
Original Assignee
Shanghai Para Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Para Software Co ltd filed Critical Shanghai Para Software Co ltd
Priority to CN202111400646.5A priority Critical patent/CN114035965A/en
Publication of CN114035965A publication Critical patent/CN114035965A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Algebra (AREA)
  • Operations Research (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses an excess load estimation method, a device, equipment and a storage medium under load balance, wherein the method comprises the following steps: acquiring a balance state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data; determining a shape parameter according to each balance state for each load balancer; determining an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model. The problem that the condition of excess load of the system cannot be accurately estimated is solved. A load estimation model is constructed in advance to estimate the excess load probability, shape parameters are determined through the balance state of a load balancer in the distributed system, the excess load probability is further determined according to the load estimation model, and the excess load in the system is accurately estimated. And the balance state of each load balancer is considered when the excess load probability estimation is carried out, so that the accuracy of the excess load probability estimation is improved.

Description

Excess load estimation method, device, equipment and storage medium under load balance
Technical Field
The embodiment of the invention relates to the field of distributed technology, in particular to an excess load estimation method, device, equipment and storage medium under load balancing.
Background
The distributed system of micro-services is a common architecture when modern computers face large-scale application development, each micro-service in the distributed system is called a node, each node can process different services, and one or more nodes may exist in the same micro-service as a medium for its service. Each node can process various requests in the system, the resource of each node is limited, so the capacity of processing the requests is limited, if the instantaneous requests of a certain node are excessive, an overload situation can occur, the situation can lead the response time of a certain service to become long, the user experience is influenced, even the system safety is influenced, and economic loss is caused. Therefore, accurate prediction of excess load becomes very important.
Disclosure of Invention
The invention provides an excess load estimation method, device, equipment and storage medium under load balance, so as to realize accurate estimation of excess load in a distributed system.
In a first aspect, an embodiment of the present invention provides a method for estimating excess load under load balancing, where the method for estimating excess load under load balancing includes:
acquiring a balance state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data;
determining, for each load balancer, a shape parameter from each of the balancing states;
determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model.
Further, the determining a shape parameter according to each of the equalization states includes:
when at least one balancing state exists for load balancing, determining the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer;
determining the reciprocal of the total number of service nodes as a shape parameter;
when all the balance states are not subjected to load balance, acquiring the total number of the equalizers of the load equalizer in the distributed system;
determining an inverse of the total number of equalizers as a state parameter.
Further, the determining an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model comprises:
determining a density distribution parameter according to the shape parameter, the inverse scale parameter and a calculation formula of a load estimation model;
and determining the excess load probability according to the density distribution parameters, the total number of the equalizers of the load equalizer in the distributed system and a probability calculation formula of a load estimation model.
Further, the determining a density distribution parameter according to the calculation formula of the shape parameter, the inverse scale parameter and the load estimation model includes:
determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter;
and determining the density distribution parameters according to the target distribution parameters and a calculation formula of the load estimation model.
Further, the method further comprises:
carrying out exponential distribution modeling on the nodes according to the unit time excess load probability of the nodes in the distributed system, and determining exponential model parameters;
carrying out gamma distribution modeling of node excess load according to the index model parameters, the system node load relation and the node total number;
and carrying out Poisson distribution modeling of the distributed system according to the total number of the equalizers of the load equalizer and a modeling result of the gamma distribution modeling to obtain a load estimation model.
Further, the method further comprises:
comparing the excess load probability to a corresponding probability threshold, wherein the probability threshold is associated with the equilibrium state;
and if the excess load probability is greater than the corresponding probability threshold, carrying out excess load alarm.
In a second aspect, an embodiment of the present invention further provides a load balancing underrun load estimation apparatus, where the load balancing underrun load estimation apparatus includes:
the system comprises a state acquisition module, a load balancer and a state acquisition module, wherein the state acquisition module is used for acquiring a balance state and inverse scale parameters of the load balancer in the distributed system, and the inverse scale parameters are determined according to the frequency of excess load in system operation historical data;
the shape parameter determining module is used for determining shape parameters according to the balance states of each load balancer;
a probability determination module for determining an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model.
Further, a shape parameter determination module, comprising:
a node total number determining unit, configured to determine, when at least one of the balancing states is load balancing, a total number of service nodes corresponding to the load balancer according to a service type carried by the load balancer;
a first parameter determining unit, configured to determine a reciprocal of the total number of service nodes as a shape parameter;
the equalizer total number determining unit is used for acquiring the equalizer total number of the load equalizer in the distributed system when each equalizing state does not carry out load equalization;
a second parameter determining unit for determining a reciprocal of the total number of equalizers as a state parameter.
Further, the probability determination module includes:
the parameter determining unit is used for determining density distribution parameters according to the shape parameters, the inverse scale parameters and a calculation formula of the load estimation model;
and the probability determination unit is used for determining the excess load probability according to the density distribution parameters, the total number of the equalizers of the load equalizer in the distributed system and a probability calculation formula of the load estimation model.
Further, the parameter determining unit is specifically configured to: determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter; and determining the density distribution parameters according to the target distribution parameters and a calculation formula of the load estimation model.
Further, the apparatus further comprises:
the index modeling module is used for carrying out index distribution modeling on the nodes according to the unit time excess load probability of the nodes in the distributed system and determining index model parameters;
the gamma modeling module is used for carrying out gamma distribution modeling of node excess load according to the index model parameters, the system node load relation and the node total number;
and the Poisson modeling module is used for carrying out Poisson distribution modeling on the distributed system according to the total number of the equalizers of the load equalizer and the modeling result of the gamma distribution modeling to obtain a load estimation model.
Further, the apparatus further comprises:
a comparison module for comparing the excess load probability with a corresponding probability threshold, wherein the probability threshold is associated with the equilibrium state;
and the alarm module is used for carrying out excess load alarm if the excess load probability is greater than the corresponding probability threshold.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
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 a method for estimating excess load under load balancing according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for estimating excess load under load balancing according to any one of the embodiments of the present invention.
The embodiment of the invention provides an excess load estimation method, device, equipment and storage medium under load balance, which comprises the steps of obtaining a balance state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data; determining, for each load balancer, a shape parameter from each of the balancing states; determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model. The problem that the condition of excess load of the system cannot be accurately estimated is solved. The method comprises the steps of constructing a load estimation model in advance, estimating the load excess probability of the distributed system through the load estimation model, determining shape parameters through the balance state of a load balancer in the distributed system, determining the excess load probability according to the shape parameters and inverse scale parameters and the load estimation model, and accurately estimating the excess load in the system. And the balance state of each load balancer is considered when the excess load probability estimation is carried out, so that the accuracy of the excess load probability estimation is improved.
Drawings
Fig. 1 is a flowchart of a method for estimating excess load under load balancing according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for estimating excess load under load balancing according to a second embodiment of the present invention;
fig. 3 is a diagram illustrating an implementation example of a method for estimating excess load under load balancing according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an excess load estimation apparatus under load balancing according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Example one
Fig. 1 is a schematic flow chart of a method for estimating excess load under load balancing according to an embodiment of the present application, where the method is suitable for estimating excess load under a condition of load balancing of a distributed system. The method can be performed by a computer device, which can be formed by two or more physical entities or by one physical entity. Generally, the computer device may be a notebook, a desktop computer, a smart tablet, and the like.
As shown in fig. 1, the method for estimating excess load under load balancing provided in this embodiment specifically includes the following steps:
s110, obtaining a balance state and inverse scale parameters of a load balancer in the distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data.
It should be noted that the excess load estimation method under load balancing provided in the embodiment of the present application may estimate excess load in real time under the condition of load balancing of a distributed system, for example, set an acquisition interval, perform timing acquisition of data according to the acquisition interval, and acquire a balanced state once every time a data acquisition time is reached, thereby implementing one-time excess load estimation. The method for estimating the excess load at any time is the same as that adopted in the estimation, namely, the excess load estimation is carried out through S120-S130.
In this embodiment, the load balancer is a hardware device that distributes network requests to available servers in a server cluster, and is used to balance the requests processed by each node in the distributed system by managing incoming Web data traffic and increasing effective network bandwidth. The balancing state may be specifically understood as an operating state of the load balancer, i.e. whether load balancing is performed or not. The inverse scale parameter may be understood in particular as a parameter at which an excess load is estimated, related to the probability of the occurrence of the excess load. The system operation historical data can be specifically understood as historical data generated in the operation process of the distributed system, such as whether excess load occurs or not, the time when the excess load occurs, the expiration time and the like.
Specifically, the balancing state of the load balancer includes performing load balancing and not performing load balancing. The balance state of each load balancer in the distributed system can be preset in a manual setting mode, and the balance state of the load balancers can also be set according to the working condition of the distributed system; or setting a trigger condition of the load balancer according to the working condition of the distributed system, and when the trigger condition is met, starting the load balancer to carry out load balancing. And directly acquiring the balance state of each load balancer in the distributed system when carrying out excess load estimation.
The inverse scale parameter may be determined in the following manner: the method comprises the steps of obtaining system operation historical data, counting the time of occurrence of excess load in unit time of each node, obtaining a time value by calculating a time mean value, a median, a maximum value, a minimum value, a weighted average and the like, taking the reciprocal of the time value as the frequency of the excess load, and taking the frequency as an inverse scale parameter.
It should be appreciated that the inverse scale parameters may be determined at intervals, for example, once a day, and the excess load may be determined multiple times during the day, so that the inverse scale parameters used each time the excess load is determined during the day are the same. Or determining the inverse scale parameter once when determining the excess load every time, and determining the inverse scale parameter according to the frequency of the excess load in the system operation historical data before the current time.
And S120, determining the shape parameters according to the balance states of each load balancer.
In this embodiment, the shape parameter may be specifically understood as a parameter required for estimating an excess load of the distributed system, and the shape parameter is a parameter in the load estimation model.
In particular, the balance states of the load balancers in the distributed system may affect each other to predict excess load. For each load balancer, the shape parameters are calculated according to the balance state of all the load balancers and the service type of the load balancer or the total number of balancers in the distributed system.
And S130, determining the excess load probability by combining a predetermined load estimation model based on the shape parameters and the inverse scale parameters.
In this embodiment, the load estimation model may be specifically understood as a mathematical statistical model for performing excess load estimation; the overload probability is understood to be the probability of overload when a node in the system processes a request. The load estimation model in the embodiment of the application is formed by Bayesian statistical modeling.
Specifically, the shape parameters and the inverse scale parameters are used as parameters of a load estimation model, and calculation and prediction are performed by combining a calculation formula of the load estimation model and the total number of equalizers of a load equalizer in a distributed system to obtain the excess load probability.
The embodiment of the invention provides an excess load estimation method under load balancing, which comprises the steps of obtaining a balancing state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data; determining, for each load balancer, a shape parameter from each of the balancing states; determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model. The problem that the condition of excess load of the system cannot be accurately estimated is solved. The method comprises the steps of constructing a load estimation model in advance, estimating the load excess probability of the distributed system through the load estimation model, determining shape parameters through the balance state of a load balancer in the distributed system, determining the excess load probability according to the shape parameters and inverse scale parameters and the load estimation model, and accurately estimating the excess load in the system. And the balance state of each load balancer is considered when the excess load probability estimation is carried out, so that the accuracy of the excess load probability estimation is improved.
Example two
Fig. 2 is a flowchart of a method for estimating excess load under load balancing according to a second embodiment of the present invention. The technical scheme of the embodiment is further refined on the basis of the technical scheme, and specifically mainly comprises the following steps:
s201, performing exponential distribution modeling on the nodes according to the unit time excess load probability of the nodes in the distributed system, and determining exponential model parameters.
In this embodiment, the unit time excess load probability may be specifically understood as the probability of the excess load condition occurring in each node in the unit time.
Specifically, the system usually includes a plurality of nodes, XiIndicating the condition that the inode has excess load; tau isiThe probability of the occurrence of the excess load condition of the i-node in unit time, namely the unit excess load probability. XiOne parameter may be τiBy exponential distribution of (i.e. X)ii~Exp(τi) Density function of
Figure BDA0003371414040000101
Figure BDA0003371414040000102
Parameter tauiAre exponential model parameters.
S202, carrying out gamma distribution modeling of node excess load according to the index model parameters, the system node load relation and the node total number.
In this embodiment, the total number of nodes refers to the total number of service nodes processing the request in the distributed system. The system node load relationship is the condition of excess load in the system, namely the condition of excess load of any node in the system, and is defined by
Figure BDA0003371414040000103
Indicating that n is the total number of nodes. The case that the n nodes are overloaded is taken as an example, and the n nodes are independent from each other.
Due to Xii~Exp(τi) Assuming that all nodes independently appear to be overloaded, i.e., τiFrom the knowledge of the statistical distribution, equation 1 and equation 2 can be combined to obtain a prior distribution model, i.e. the result of gamma distribution modeling: y | τ to Gamma (n, τ), n being the total number of nodes, τ can be estimated from empirical or historical data, so in the system model, τ is a known number.
S203, carrying out Poisson distribution modeling of the distributed system according to the total number of the equalizers of the load equalizer and the modeling result of the gamma distribution modeling, and obtaining a load estimation model.
In this embodiment, the total number of equalizers refers to the total number of all equalizers in the distributed system.
Specifically, when a load estimation model is constructed, the total number of equalizers in a distributed system is counted, and in the embodiment of the present application, the total number of equalizers in the system is equal to k as an example.
Y is the condition of excess load in the system; lambda is the expected number of times of the system with excess load in unit time; y is modeled by a Poisson distribution with a parameter of λ, i.e., Y | λ -Poisson (λ);
a density function of
Figure BDA0003371414040000111
Since Y | λ — (λ) to Poisson (λ), λ | Y is assumed to obey the conjugate distribution of Poisson distribution, i.e., λ | Y —. Gamma (α, β), where α can randomly choose any real number greater than 0, β can use τ as an estimate since it relates to frequency, i.e., β ═ τ; the likelihood function can be obtained by equation 3: λ | Y ∈ Gamma (α, τ); and obtaining a final load estimation model Y | lambda ∈ Poisson (2 tau lambda) according to Posson (2 tau lambda) · Gamma (n, tau) · Gamma (alpha, tau).
It should be noted that after the load estimation model is constructed through S201 to S203, when the subsequent excess load probability estimation is performed, since the excess load probability is repeatedly performed, only the constructed load estimation model needs to be used at this time, and the S201 to S203 do not need to be repeatedly executed to construct the load estimation model.
S204, obtaining the balance state and inverse scale parameters of the load balancer in the distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in the system operation historical data.
S205, aiming at each load balancer, when at least one balancing state exists for carrying out load balancing, determining the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer.
In this embodiment, the service type may be specifically understood as a type of a request processed by the distributed system, for example, a transaction service, an authentication service, and the like. The total number of service nodes may be understood in particular as the total number of nodes handling one service type.
Illustratively, there are n nodes in the distributed system, and the n nodes are independent of each other when the n nodes are overloaded. The system has k service types, and the total number of service nodes corresponding to each service type is nkIt is obvious that
Figure BDA0003371414040000121
Considering the use of load balancing components (e.g. Nginx), load balancing is only performed for each node of the same class of service, i.e. there are k load balancers, one for each nkAnd carrying out load balancing on the nodes.
Specifically, for each load balancer j, the balance state of all the load balancers in the distributed system is judged, if yes, the balance state is judgedAt least one balance state exists for load balance, the service type carried by the load balancer j is judged, and the total number n of service nodes is determined according to the service typejTotal number of service nodes njAnd determining the total number of the service nodes corresponding to the load balancer.
And S206, determining the reciprocal of the total number of the service nodes as the shape parameter.
The reciprocal of the total number of service nodes is calculated as the shape parameter. In the shape parameter calculated in the above case, when the subsequent excess load probability is performed, the obtained excess load probability is the excess load probability of the service type. The excess load probability corresponding to different service types can be calculated through the total number of the service nodes of different service types, and the principle is the same.
And S207, when the load balancing is not performed in all the balancing states, acquiring the total number of the balancers of the load balancers in the distributed system.
And S208, determining the reciprocal of the total number of the equalizers as a state parameter.
If all the balance states in the distributed system are not subjected to load balancing, all the load balancers in the distributed system are not operated at the moment, and the reciprocal of the total number of the balancers is directly determined as a state parameter. In the shape parameter calculated under the condition, when the subsequent excess load probability is carried out, the obtained excess load probability is the excess load probability of the system.
It should be noted that steps S205-S206 and S207-S208 are parallel steps, and there is no order in execution.
And S209, determining density distribution parameters according to the shape parameters, the inverse scale parameters and the calculation formula of the load estimation model.
In this embodiment, the density distribution parameter may specifically be understood as the number of occurrences of an excess load condition in the system, and the density distribution parameter in this embodiment is used for performing probability calculation as the parameter λ in the poisson distribution. And substituting the mathematical meaning represented by the shape parameter into a calculation formula of the load estimation model to calculate to obtain the density distribution parameter.
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 as:
and A1, determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter.
In this embodiment, the target distribution parameter may be specifically understood as a parameter used in model calculation when the excess load estimation is performed by the model. The inverse scale parameter may be understood in particular as a parameter at which an excess load is estimated, related to the probability of the occurrence of the excess load. And calculating the mean value alpha tau of the model likelihood function Gamma (alpha, tau), taking the shape parameter as alpha, taking the inverse scale parameter as tau, and carrying out product operation to obtain a product as a target distribution parameter.
And A2, determining density distribution parameters according to the target distribution parameters and a calculation formula of the load estimation model.
The calculation formula of the load estimation model in the embodiment of the application is 2 tau lambda in Poisson (2 tau lambda), namely, the density distribution parameter is obtained by multiplying the inverse scale parameter by the target distribution parameter and multiplying by the multiple 2.
S210, determining the excess load probability according to the density distribution parameters, the total number of the balancers of the load balancers in the distributed system and the probability calculation formula of the load estimation model.
The probability calculation formula of the load estimation model in the embodiment of the present application is formula 3,
Figure BDA0003371414040000131
Figure BDA0003371414040000132
and k is the total number of the equalizers, and the density distribution parameters are taken as lambda in a formula 3 and are brought into the formula 3 for calculation to obtain the excess load probability.
S211, comparing the excess load probability with a corresponding probability threshold value, wherein the probability threshold value is related to the balance state.
In this embodiment, the probability threshold may be specifically understood as a preset boundary value for determining whether the excess load probability meets the requirement, where the probability threshold is the maximum probability of the occurrence of the excess load that can be tolerated by the system. The probability threshold value can also be adjusted in real time according to the actual running condition of the system. The probability threshold is related to each balance state, that is, when the balance states of the load balancer are not load balanced and at least one balance state is load balanced, the corresponding probability thresholds are different.
Specifically, the probability threshold is set in advance according to the influence of specific traffic tolerance and actual excess, and may be set to 80% for example. And after determining the excess load probability according to each balance state, comparing the excess load probability with a corresponding probability threshold.
S212, if the excess load probability is larger than the corresponding probability threshold value, carrying out excess load alarm.
And if the excess load probability is greater than the corresponding probability threshold value, the system is indicated to have excess load at the moment, and an excess load alarm is sent to the staff. The excess load alarm may be a voice prompt (e.g., continuously playing an alarm sound, playing an alarm sound for a set time, playing a voice for "system load excess"), a mail prompt, or a light flashing prompt. And if the excess load probability is smaller than the probability threshold, waiting for the next moment when the excess load probability is determined, and continuously monitoring the excess load probability of the system.
Fig. 3 is a diagram illustrating an implementation example of a method for estimating an excess load under load balancing according to an embodiment of the present invention.
S301, obtaining system operation history data.
S302, determining a reverse scale parameter tau according to the probability of excess load in the system operation historical data.
And S303, monitoring all the load balancers in the distributed system in real time, and acquiring the balance states of the load balancers.
S304, judging whether all the balance states are not subjected to load balance, if so, executing S305; otherwise, S306 is executed.
S305, the reciprocal of the total number k of equalizers is determined as a state parameter α.
S306, counting the total number n of the service nodesjIs determined asShape parameter alpha, njAnd the total number of the service nodes corresponding to the jth load balancer.
It should be noted that, the steps S1-S2 and S3-S6 are parallel, there is no sequence in execution, and the inverse scale parameter τ may be determined in real time or may be kept unchanged for a period of time after being determined, and then used directly. Fig. 3 provided in the embodiments of the present application does not change to an example.
S307, according to a pre-constructed load estimation model, determining statistical distribution Gamma (alpha, tau) by combining an inverse scale parameter tau and a shape parameter alpha.
And S308, estimating and obtaining a target distribution parameter alpha tau by using the mean value of Gamma (alpha, tau).
S309, constructing distribution Poisson (2 tau (. alpha. tau)).
S310, an excess load probability p, which is a probability that Y is 1, is calculated from the density function.
I.e. 2 τ α τ is introduced as λ
Figure BDA0003371414040000151
Calculating p.
S311, judging whether p is larger than q (probability threshold) correspondingly, if so, executing S312; otherwise, return to S303.
And S312, carrying out excess load alarm.
The implementation process of the method for estimating excess load under load balancing provided in fig. 3 takes the excess load of the timing check system as an example, and determines the probability p of excess load of the system when the timing check time is reached. If p is larger than q, alarming; if p is less than q, the overload probability p of the system is continuously checked. If the alarm is executed, if the system is monitored to be recovered to normal (staff repair or system self-repair) after the alarm is executed, returning to execute S303; or after a certain time of warning, whether the system is normal or not, the process returns to execute S303.
The embodiment of the invention provides an excess load estimation method under load balancing, which comprises the steps of obtaining a balancing state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data; determining, for each load balancer, a shape parameter from each of the balancing states; determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model. The problem that the condition of excess load of the system cannot be accurately estimated is solved. And constructing a load estimation model in advance according to the unit excess load probability, the total number of the equalizers and the total number of the nodes, and estimating the load excess probability of the distributed system through the load estimation model. Determining a shape parameter through a balance state of a load balancer in a distributed system, and determining the excess load probability of the system or one service type according to the shape parameter and the inverse scale parameter in combination with a load estimation model to accurately estimate the excess load in the system. By considering the balance state of each load balancer, the excess load probability under different conditions is determined, and the accuracy of the excess load probability estimation is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of an excess load estimation apparatus under load balancing according to a third embodiment of the present invention, where the apparatus includes: a state acquisition module 41, a shape parameter determination module 42 and a probability determination module 43.
The state obtaining module 41 is configured to obtain a balance state and an inverse scale parameter of a load balancer in the distributed system, where the inverse scale parameter is determined according to a frequency of an excess load in system operation history data;
a shape parameter determining module 42, configured to determine, for each load balancer, a shape parameter according to each of the balancing states;
a probability determination module 43 for determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model.
The embodiment of the invention provides an excess load estimation device under load balancing, which is characterized in that a balancing state and inverse scale parameters of a load balancer in a distributed system are obtained, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data; determining, for each load balancer, a shape parameter from each of the balancing states; determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model. The problem that the condition of excess load of the system cannot be accurately estimated is solved. The method comprises the steps of constructing a load estimation model in advance, estimating the load excess probability of the distributed system through the load estimation model, determining shape parameters through the balance state of a load balancer in the distributed system, determining the excess load probability according to the shape parameters and the load estimation model, and accurately estimating the excess load in the system. And the balance state of each load balancer is considered when the excess load probability estimation is carried out, so that the accuracy of the excess load probability estimation is improved.
Further, the shape parameter determination module 42 includes:
a node total number determining unit, configured to determine, when at least one of the balancing states is load balancing, a total number of service nodes corresponding to the load balancer according to a service type carried by the load balancer;
a first parameter determining unit, configured to determine a reciprocal of the total number of service nodes as a shape parameter;
the equalizer total number determining unit is used for acquiring the equalizer total number of the load equalizer in the distributed system when each equalizing state does not carry out load equalization;
a second parameter determining unit for determining a reciprocal of the total number of equalizers as a state parameter.
Further, the probability determination module 43 includes:
the parameter determining unit is used for determining density distribution parameters according to the shape parameters, the inverse scale parameters and a calculation formula of the load estimation model;
and the probability determination unit is used for determining the excess load probability according to the density distribution parameters, the total number of the equalizers of the load equalizer in the distributed system and a probability calculation formula of the load estimation model.
Further, the parameter determining unit is specifically configured to: determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter; and determining the density distribution parameters according to the target distribution parameters and a calculation formula of the load estimation model.
Further, the apparatus further comprises:
the index modeling module is used for carrying out index distribution modeling on the nodes according to the unit time excess load probability of the nodes in the distributed system and determining index model parameters;
carrying out gamma distribution modeling of node excess load according to the index model parameters, the system node load relation and the node total number;
and the Poisson modeling module is used for carrying out Poisson distribution modeling on the distributed system according to the total number of the equalizers of the load equalizer and the modeling result of the gamma distribution modeling to obtain a load estimation model.
Further, the apparatus further comprises:
a comparison module for comparing the excess load probability with a corresponding probability threshold, wherein the probability threshold is associated with the equilibrium state;
and the alarm module is used for carrying out excess load alarm if the excess load probability is greater than the corresponding probability threshold.
The load balancing underexcess load estimation device provided by the embodiment of the invention can execute the load balancing underexcess load estimation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 5 is a schematic structural diagram of a computer apparatus according to a fourth embodiment of the present invention, as shown in fig. 5, the apparatus includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of processors 50 in the device may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the apparatus may be connected by a bus or other means, which is exemplified in fig. 5.
The memory 51 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the load balancing underexcess load estimation method in the embodiment of the present invention (for example, the state acquisition module 41, the shape parameter determination module 42, and the probability determination module 43 in the load balancing underexcess load estimation apparatus). The processor 50 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory 51, that is, implements the excess load estimation method under load balancing as described above.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 53 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a method for estimating excess load under load balancing, where the method includes:
acquiring a balance state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data;
determining, for each load balancer, a shape parameter from each of the balancing states;
determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the excess load estimation under load balancing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the load balancing underload estimation apparatus, the units and modules included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for estimating excess load under load balancing is characterized by comprising the following steps:
acquiring a balance state and inverse scale parameters of a load balancer in a distributed system, wherein the inverse scale parameters are determined according to the frequency of excess load in system operation historical data;
determining, for each load balancer, a shape parameter from each of the balancing states;
determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model.
2. The method of claim 1, wherein determining a shape parameter from each of the equalization states comprises:
when at least one balancing state exists for load balancing, determining the total number of service nodes corresponding to the load balancer according to the service type carried by the load balancer;
determining the reciprocal of the total number of service nodes as a shape parameter;
when all the balance states are not subjected to load balance, acquiring the total number of the equalizers of the load equalizer in the distributed system;
determining an inverse of the total number of equalizers as a state parameter.
3. The method of claim 1, wherein determining an excess load probability based on the shape parameters and inverse scale parameters in combination with a predetermined load estimation model comprises:
determining a density distribution parameter according to the shape parameter, the inverse scale parameter and a calculation formula of a load estimation model;
and determining the excess load probability according to the density distribution parameters, the total number of the equalizers of the load equalizer in the distributed system and a probability calculation formula of a load estimation model.
4. The method of claim 3, wherein determining a density distribution parameter from the shape parameter, an inverse scale parameter, and a computational formula of a load estimation model comprises:
determining a target distribution parameter according to the product of the shape parameter and the inverse scale parameter;
and determining the density distribution parameters according to the target distribution parameters and a calculation formula of the load estimation model.
5. The method of claim 1, further comprising:
carrying out exponential distribution modeling on the nodes according to the unit time excess load probability of the nodes in the distributed system, and determining exponential model parameters;
carrying out gamma distribution modeling of node excess load according to the index model parameters, the system node load relation and the node total number;
and carrying out Poisson distribution modeling of the distributed system according to the total number of the equalizers of the load equalizer and a modeling result of the gamma distribution modeling to obtain a load estimation model.
6. The method of any one of claims 1-5, further comprising:
comparing the excess load probability to a corresponding probability threshold, wherein the probability threshold is associated with the equilibrium state;
and if the excess load probability is greater than the corresponding probability threshold, carrying out excess load alarm.
7. An overload estimating apparatus under load balancing, comprising:
the system comprises a state acquisition module, a load balancer and a state acquisition module, wherein the state acquisition module is used for acquiring a balance state and inverse scale parameters of the load balancer in the distributed system, and the inverse scale parameters are determined according to the frequency of excess load in system operation historical data;
the shape parameter determining module is used for determining shape parameters according to the balance states of each load balancer;
a probability determination module for determining an excess load probability based on the shape parameter and the inverse scale parameter in combination with a predetermined load estimation model.
8. The apparatus of claim 7, further comprising:
the index modeling module is used for carrying out index distribution modeling on the nodes according to the unit time excess load probability of the nodes in the distributed system and determining index model parameters;
the gamma modeling module is used for carrying out gamma distribution modeling of node excess load according to the index model parameters, the system node load relation and the node total number;
and the Poisson modeling module is used for carrying out Poisson distribution modeling on the distributed system according to the total number of the equalizers of the load equalizer and the modeling result of the gamma distribution modeling to obtain a load estimation model.
9. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of load balancing underrun load estimation as recited in any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for load balancing underrun load estimation according to any one of claims 1-6.
CN202111400646.5A 2021-11-24 2021-11-24 Excess load estimation method, device, equipment and storage medium under load balance Pending CN114035965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111400646.5A CN114035965A (en) 2021-11-24 2021-11-24 Excess load estimation method, device, equipment and storage medium under load balance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111400646.5A CN114035965A (en) 2021-11-24 2021-11-24 Excess load estimation method, device, equipment and storage medium under load balance

Publications (1)

Publication Number Publication Date
CN114035965A true CN114035965A (en) 2022-02-11

Family

ID=80145361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111400646.5A Pending CN114035965A (en) 2021-11-24 2021-11-24 Excess load estimation method, device, equipment and storage medium under load balance

Country Status (1)

Country Link
CN (1) CN114035965A (en)

Similar Documents

Publication Publication Date Title
CN106933650B (en) Load management method and system of cloud application system
US7778715B2 (en) Methods and systems for a prediction model
CN109815019B (en) Task scheduling method and device, electronic equipment and readable storage medium
CN106492459B (en) Data processing system, data processing method and data processing device
JP2019501547A (en) Method, apparatus, server, and storage medium for detecting DoS / DDoS attack
CN112506643A (en) Load balancing method and device of distributed system and electronic equipment
CN109597800B (en) Log distribution method and device
JP2018207241A (en) Management device, management method, and management program
KR20190055613A (en) Apparatus for controlling resource in cloud computing system and method for the same
CN116049146B (en) Database fault processing method, device, equipment and storage medium
CN110309154B (en) Entity feature selection method, device and equipment based on map and storage medium
CN111092849B (en) Traffic-based detection method and device for distributed denial of service
CN114564313A (en) Load adjustment method and device, electronic equipment and storage medium
CN114090037A (en) Service degradation method, device, computer equipment and storage medium
CN111258854B (en) Model training method, alarm method based on prediction model and related device
CN114035965A (en) Excess load estimation method, device, equipment and storage medium under load balance
US9560027B1 (en) User authentication
CN112615795A (en) Flow control method and device, electronic equipment, storage medium and product
CN114760190B (en) Service-oriented converged network performance anomaly detection method
CN116560794A (en) Exception handling method and device for virtual machine, medium and computer equipment
CN115774602A (en) Container resource allocation method, device, equipment and storage medium
CN114116213A (en) Method, device, equipment and storage medium for estimating excess load in distributed system
CN112685390B (en) Database instance management method and device and computing equipment
KR102464688B1 (en) Method and apparatus for detrmining event level of monitoring result
CN114328078A (en) Threshold dynamic calculation method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination