A kind of improved load balance scheduling system based on platform of soaring
Technical field
The invention belongs to load-balancing technique fields, specifically, being related to a kind of improved load based on platform of soaring
Balance dispatching system.
Background technology
Load-balancing technique is as network is more and more universal, and the visit capacity of various services is increasing, single server
It is difficult to meet a kind of technology being born when the performance requirement of various applications.In application deployment, it will apply while be deployed to
On several servers, as back-end server, a server is disposed, configuration load is balanced, and configuration Virtual Service is as application
Same entrance, load balancing receive user request after, according to the established rule of configuration, forward a request to back-end services
Device processing, returns to user after the completion.The advantages of this deployment be can dynamic the performance of cluster is shunk and is extended with
Requirements for access is adapted to, is ensured cost-effective while service quality.
Load balance scheduling algorithm refers to the rule followed when load balancing forwarding user's request, and rudimentary algorithm is main
Including poll, weighted polling, minimum connection, the minimum connection of weighting, Locality-Based Least Connections Scheduling, tape copy based on part
Property at least link, the scheduling of destination address hash, Source Hashing Scheduling etc..Followed by dynamic dispatching algorithm best suits reality
The algorithm of border demand is dynamical feedback dispatching algorithm.Common dynamical feedback dispatching algorithm is all a certain weighted scheduling algorithm
Extend, according to the currently used situation of real server, calculate suitable weight, the power of real server is then set dynamically
Value, to achieve the purpose that all real server performances of dynamic equilibrium.In simple terms, when the utilization rate of real server is relatively low
When, weights are turned up and turn down weights when the utilization rate of real server is higher.
Dynamical feedback dispatching algorithm, mainly use in the industry there are two types of, the dynamical feedback dispatching algorithm based on weighted polling
And all it is load balancing node periodically from real server with the dynamical feedback dispatching algorithm based on weighting Smallest connection
Performance information is obtained, the weights of every real server are calculated on load balancing node, are then calculated.
In service deployment, application load balancing node generally only one (have sometimes more load balancing with
Multilayered structure is disposed, or is disposed with active-standby mode, but synchronization, and the interface that same application externally shows generally all only has one
It is a), and real server quantity can be with dynamic expansion, load balancing node calculates the realization side of the weights of all nodes
Method can reduce cluster entirety ability.
During service operation, be frequently encountered in very short time flow outburst (integral point of such as shopping website is rushed to purchase,
Or when the website orientations grave news such as news or blog), the true clothes of traditional dynamical feedback dispatching algorithm periodically update
The weights of business device are unable to cope with such case, may encounter flow outburst just at the interval for adjusting weights twice, cause
The task that server is connected to directly exceeds the ability upper limit of the server, and crash is directly resulted in when serious.
Chinese invention patent " a kind of Multimachine hot standby load balance system for computer " (application number CN201110376687.5),
The invention provides a kind of Multimachine hot standby load balance system for computer, and system realizes multiple load balance process using trunking
The aggregation of links of module, multiple load balance process modular units are integrated into the single entrance of rear end by single IP module, adjacent
Load balance process module realizes master control backup, and cyclic annular active and standby ring is integrally formed, is detected at load balancing by heartbeat detection
Module status is managed, when wherein load balance process module have failed, adjacent load balance process module takes over this
Business, and application server load state is monitored in real time, asking from client is distributed automatically according to set scheduling mode
It asks, automatic shield falls the failure of server in server pools, and realization business is not interrupted and High Availabitity, makes full use of system resource,
Maximum plays the performance of blade server.But the invention is not related to weight computing and is transferred to asking for background server
Topic is not involved with the problem of preventing burst flow in advance, is also not involved with platform of soaring.
Chinese invention patent " method, apparatus and system of load balancing " (application number CN201010268922.2), the hair
It is bright to disclose a kind of method, apparatus and system of load balancing, the method includes:Obtain the ARP request that client is sent;Choosing
The load equalizer node for meeting in load equalizer cluster and presetting loading condition is taken, and obtains the satisfaction and presets loading condition
Load equalizer node MAC Address;Arp reply information is sent to the client, the arp reply information includes institute
The MAC Address for meeting the load equalizer node for presetting loading condition is stated, so that the client receives the arp reply letter
Service request is sent on the load equalizer node for meeting default loading condition after breath and carries out equilibrium treatment.The present invention
The ARP request sent by obtaining client, and be that the load that client selects satisfaction to preset loading condition is equal according to ARP request
Weighing apparatus node carries out traffic balancing processing, realizes effective management to load equalizer cluster, improves load equalizer collection
The whole equilibrium treatment effect of group.But the invention is not related to the problem of Dynamic Weights calculate, is not involved in advance
The problem of preventing burst flow, is also not involved with platform of soaring.
Chinese invention patent " a kind of load-balancing method and device " (application number CN201210111056.5), the invention
A kind of load-balancing method of embodiment offer and device, are related to the communications field, can assess the quality of each load balancing,
To which different loads balance policy be adaptive selected to adapt to different scenes, the adaptability of load balancing is enhanced.Its side
Method is:The first load balancing of highest priority is chosen in the policy library including at least two load balancings with reality
Apply load balancing;The equalization efficiency, of first load balancing is obtained after executing first load balancing
Weigh cost;Load balancing plan in the policy library is adjusted according to the equalization efficiency of first load balancing and balanced cost
Priority slightly, so that when implementing load balancing next time according at least two load balancing after adjustment
Priority chooses the balance policy of highest priority.The embodiment of the present invention when executing load balancing for adaptively adjusting load
Balance policy.But the invention is not related to the problem of Dynamic Weights calculate, is not involved with and prevents burst flow in advance
The problem of, also it is not involved with platform of soaring.
Invention content
In view of this, the present invention provides a kind of flat based on soaring to solve defect and deficiency of the existing technology
Weight computing is transferred to real server operation, can reduce load balancing section by the improved load balance scheduling system of platform
The pressure of point, improves the entirety ability of entire cluster.
In order to solve the above-mentioned technical problem, the invention discloses a kind of improved load balance schedulings based on platform of soaring
System, and realized using following technical scheme.
A kind of improved load balance scheduling system based on platform of soaring, including load balancing and several real services
Device, the load balancing are communicated to connect with several real server respectively;The module run in the load balancing includes
Weighed value adjusting module, the first communication module and distribution of services module;The module run on the real server includes performance prison
Control module, weight computing module, the second communication module and Service Processing Module;First communication module respectively with it is several described
Second communication module communicates to connect;The distribution of services module is communicated to connect with several Service Processing Modules respectively;
The performance monitoring module passes to described for obtaining the current status data of the corresponding real server
Weight computing module;The weight computing module calculates the weights that the real server adapts to according to default computation rule,
The weights are passed into the load balancing by communication module;How the weighed value adjusting module decision adjusts weights, and
Execute weighed value adjusting order.
Further, the performance monitoring module is additionally operable to predict subsequent performance number according to prediction algorithm, and according to pre-
It surveys situation and does corresponding processing.
Further, predetermined threshold value in the performance monitoring module;If the performance number of prediction exceeds the threshold
Value, the performance monitoring module temporary quickening monitoring frequency automatically;When performance number is no more than the threshold value, the performance
Monitoring module adjust automatically monitoring frequency is to normal frequency.
Further, the performance monitoring module predicts subsequent performance number using single exponential smoothing predicted method.
Further, the smoothing constant of the single exponential smoothing predicted method selects 0.5.
Further, the load weight computing formula of the weight computing module is LOADi=0.3*Ci+0.1*Di+
0.2*Mi+0.1*Pi+0.3*Ri;The Ci is server current CPU load, and the Di is server when front disk uses feelings
Condition, the Mi are current memory utilization power, and the Pi is current process number, and the Ri is the load balancing to corresponding
The response time of the real server, the LOADi are load weights.
Further, when presently described load weights are not equal to 0.80, dynamic adjusts weights;When the load weights are equal to
When 0.80, weights remain unchanged.
Further, the rule of dynamic adjustment weights is:When the load weights are less than 0.80, new weights are more than original
There are weights;When the load weights are more than 0.80, new weights are less than original weights.
Compared with prior art, the present invention can be obtained including following technique effect:
1) weight computing module is placed in real server by the present invention, is different from current usually calculated at load balancing end and is weighed
The method of value can reduce the performance loss at load balancing end, to improve the UPS upper performance score that entire cluster can provide;
2) present invention uses prediction algorithm at real server end, the performance change trend of real server is predicted, when certain
When the value of performance prediction next time of component is more than preset performance threshold, accelerate the frequency of performance monitoring, to reach most fast sound
Answer the purpose of burst flow.It is automatically lowered to normal frequency after predicted value is normal, clustering performance will not be influenced too much;
3) present invention is applied to production domesticization and soars platform, can expand production domesticization and soar the application range of platform.
Certainly, implementing any of the products of the present invention must be not necessarily required to reach all the above technique effect simultaneously.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and constitutes the part of the present invention, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the deployment schematic diagram of one embodiment of the invention.
Fig. 2 is the system architecture schematic diagram of one embodiment of the invention.
Specific implementation mode
Carry out the embodiment that the present invention will be described in detail below in conjunction with accompanying drawings and embodiments, thereby how the present invention is applied
Technological means solves technical problem and reaches the realization process of technical effect to fully understand and implement.
Fig. 1 show the deployment schematic diagram of the present invention, and client computer is connect by internet with a load balancing, and one negative
Carrying balanced three real server of connection, (namely background server, the present embodiment select three, can also according to actual conditions
It is other quantity).Load balancing is based on platform of soaring, and access interface is externally provided in a manner of Virtual Service.The use of client computer
After family request reaches load balancing by internet, load balancing is selected a real server, will be accessed according to forward rule
Request is transmitted to the real server and result is returned to user by load balancing after real server processing request.
Fig. 2 show the system architecture schematic diagram of the present invention, and weighed value adjusting module, the first communication mould are run in load balancing
Block and distribution of services module;Runnability monitoring module, weight computing module, the second communication module and business on real server
Processing module.First and second communication modules are mainly used to the performance information in conveying flow implementation procedure and weighed value adjusting letter
Breath.Performance monitoring module periodically obtains the current status data of server, passes to weight computing module.Weight computing mould
Root tuber calculates the weights of current server adaptation, weights is passed to load balancing by communication module according to rule.Weights tune
How the decision of mould preparation block adjusts weights, and executes weighed value adjusting order.
Performance monitoring module runs on real server, for obtaining the current performance data of server with certain frequency,
It is supplied to weight computing module to calculate integrated load value.In the present invention, performance monitoring module can be predicted follow-up with prediction algorithm
Performance data value.If threshold value of the predicted performance values beyond setting, performance monitoring module automatically can temporarily accelerate monitoring frequency
Rate prevents burst flow from leading to system in case of system halt.When estimated performance returns normal, meeting adjust automatically monitoring frequency is normal frequency.
In this example, estimated performance value next time, the calculating of the algorithm are calculated using single exponential smoothing predicted method
Formula is as follows:
St+1=a*yt+(1-a)St
Wherein, St+1For the predicted value of next period, ytFor the actual value of the monitoring of current period, StFor the predicted value of current period, a is smooth
Constant.The value of smoothing constant determines the influence degree that the actual value of monitoring at a specified future date predicts the next period.When a is 1, St+1=yt,
Next period predicted value is equal to current period monitoring value;When a is 0, St+1=St, next period predicted value is equal to current period predicted value, and the current period is predicted
Value is that the calculated with actual values based on long term monitoring comes out.Because the variation to performance in this example, is needed to respond faster,
So selecting larger smoothing constant 0.5 herein.
In the present embodiment, the default frequency of performance monitoring is that 5s is primary, is more than default threshold predicting next period predicted value
When value, it is primary that monitoring frequency is revised as 1s, when monitoring value is more than threshold value, load balancing can make a response in 1s,
It, will if predicted value and actual monitored value are all not above predetermined threshold value in two default frequency interval time sections (i.e. 10s)
Frequency drops back to default frequency, when predicting the value more than predetermined threshold value again, can reset this time.
Weight computing module is located at real server, for calculating weights.In the present embodiment, it is primarily upon following property
It can parameter:Server current CPU load Ci, server are as front disk service condition Di, current memory utilization power Mi and currently
The response time Ri of number of processes Pi and load balancing to real server.First, one group of configurable coefficient is set, is represented
The summation of the significance level of each performance components of real server, coefficient is 1, corresponds to above-mentioned performance parameter in the present embodiment, is arranged
For { 0.3,0.1,0.2,0.1,0.3 }.Integrated load is calculated by the following formula to obtain:
LOADi=0.3*Ci+0.1*Di+0.2*Mi+0.1*Pi+0.3*Ri
Weight computing formula is as follows, and A is an adjustable coefficient, and the amplitude of control adjustment weights, 0.80 is default
Anticipation system availability., can be according to present load when present load is not equal to 0.80, dynamic adjusts weights, according to following public affairs
Formula, when LOADi is less than 0.80, new weights can be more than original weights, and when LOADi is more than 0.80, new weights can be less than
Original weights, when LOADi is equal to 0.80, weights remain unchanged, and so that real server is run on desired load always best
State.
Communication module uses simple POST modes transmission data, real server that the value information changed will be needed to transmit
To load balancing, load balancing transmits the parameter that the performance monitoring module of Administrator and the operation of weight computing module need
To real server.
Weighed value adjusting module runs on load balancing end, the real server integrated load for being used for being obtained according to communication module
It is worth, and the anticipation system availability being arranged, determines the weights for increasing or reducing the real server, and run system command, repair
Change weights.
The beneficial effects of the invention are as follows:
1) weight computing module is placed in real server by the present invention, is different from current usually calculated at load balancing end and is weighed
The method of value can reduce the performance loss at load balancing end, to improve the UPS upper performance score that entire cluster can provide;
2) present invention uses prediction algorithm at real server end, the performance change trend of real server is predicted, when certain
When the value of performance prediction next time of component is more than preset performance threshold, accelerate the frequency of performance monitoring, to reach most fast sound
Answer the purpose of burst flow.It is automatically lowered to normal frequency after predicted value is normal, clustering performance will not be influenced too much;
3) present invention is applied to production domesticization and soars platform, can expand production domesticization and soar the application range of platform.
It is provided for the embodiments of the invention a kind of improved load balance scheduling system based on platform of soaring above, into
It has gone and has been discussed in detail.The explanation of above example is only intended to facilitate the understanding of the method and its core concept of the invention;Meanwhile it is right
In those of ordinary skill in the art, according to the thought of the present invention, change is had in specific embodiments and applications
Place, in conclusion the content of the present specification should not be construed as limiting the invention.
Some vocabulary has such as been used to censure specific components or module in specification and claim.Art technology
Personnel are, it is to be appreciated that different institutions may call the same component or module with different nouns.This specification and right are wanted
In a manner of asking the difference not by title to be used as differentiation component, but area is used as with the difference of component or module functionally
The criterion divided.As being open language, therefore should solve in specification in the whole text and claim "comprising", " comprising " mentioned in
It is interpreted into " including but not limited to "." substantially " refer in receivable error range, those skilled in the art can be certain
The technical problem is solved in error range, basically reaches the technique effect.Specification subsequent descriptions are to implement the present invention's
Better embodiment, so description is being not limited to the model of the present invention for the purpose of the rule for illustrating the present invention
It encloses.Protection scope of the present invention is when subject to appended claims institute defender.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that commodity or system including a series of elements include not only those elements, but also include not clear
The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that including the element commodity or system in also
There are other identical elements.
Several preferred embodiments of the present invention have shown and described in above description, but as previously described, it should be understood that the present invention
Be not limited to form disclosed herein, be not to be taken as excluding other embodiments, and can be used for various other combinations,
Modification and environment, and can in innovation and creation contemplated scope described herein, by the technology of above-mentioned introduction or related field or
Knowledge is modified.And changes and modifications made by those skilled in the art do not depart from the spirit and scope of the present invention, then it all should be
In the protection domain of appended claims of the present invention.