CN109769031A - A kind of dynamic self-adapting load-balancing method and system - Google Patents

A kind of dynamic self-adapting load-balancing method and system Download PDF

Info

Publication number
CN109769031A
CN109769031A CN201910119364.4A CN201910119364A CN109769031A CN 109769031 A CN109769031 A CN 109769031A CN 201910119364 A CN201910119364 A CN 201910119364A CN 109769031 A CN109769031 A CN 109769031A
Authority
CN
China
Prior art keywords
request
server
real
time factor
total
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
CN201910119364.4A
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.)
Zhuhai Tiantian Delivery Technology Co Ltd
Original Assignee
Zhuhai Tiantian Delivery Technology 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 Zhuhai Tiantian Delivery Technology Co Ltd filed Critical Zhuhai Tiantian Delivery Technology Co Ltd
Priority to CN201910119364.4A priority Critical patent/CN109769031A/en
Publication of CN109769031A publication Critical patent/CN109769031A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The present invention relates to a kind of dynamic self-adapting load-balancing method and systems, belong to server scheduling technical field, its method is the following steps are included: analyze received web request, different by request content realize classification, to every a kind of request binding Dynamic Weights to quantify to request, the Dynamic Weights request the occupancy and request service time length to server resource for real-time representation;Collect and calculate the request total amount and real-time factor of wait-for-response in each server;Total request amount of Servers-all is calculated, and judges whether total request amount is more than preset request threshold value;Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and forwarded according to the real-time factor of each server to request.Present invention reduces network loads, reduce the complexity that load calculates, improve the accuracy of load information and combine dynamical feedback and admission control mechanism, have low-response delay, high scalability and high-throughput performance.

Description

A kind of dynamic self-adapting load-balancing method and system
Technical field
The present invention relates to a kind of dynamic self-adapting load-balancing method and systems, belong to server scheduling technical field.
Background technique
Nowadays with the continuous extension that the Web such as e-commerce, Web bank, online game, shopping online are applied, so that clothes Business website must cope with more dynamic requests, and server resource expense increases severely.Increasingly increase when single server can no longer cope with It when the service request added, can be replaced with the better server generation of the more expensive performance of price, but from scalability, high availability From the aspect of cost performance, Clustering is to solve the preferred option of this problem.Problem of load balancing is the core of group system The heart, existing load balancing are broadly divided into static and dynamic, and static load balancing shows in the case of request amount is larger It is bad;And dynamic load balancing is mostly the hidden dynamic dispatching of content, using the dynamic dispatching algorithm scheduler that content is hidden Expense is smaller, and dispatching efficiency is high.But the Web server fluctuation of load is big, and the load information that previous moment is collected is in subsequent time Perhaps it is no longer able to accurately reflect server load state, so that the dynamic dispatching based on server end load state information be made to calculate Method failure.Furthermore the bottleneck problem of scheduler will seriously affect the throughput and scalability of whole system.On the other hand, it asks Classification is asked to need artificial pre-processing, and this work is done again from the beginning again when service change, flexibility is poor.
Summary of the invention
The present invention provides a kind of dynamic self-adapting load-balancing method and system, settlement server load imbalance are asked Topic.
Technical solution of the present invention first aspect is a kind of dynamic self-adapting load-balancing method, and the method includes following Step:
Received web request is analyzed, different by request content realize classification, to every a kind of request binding dynamic For weight to quantify to request, the Dynamic Weights request the occupancy and request service time to server resource for real-time representation Length;
Collect and calculate the request total amount and real-time factor of wait-for-response in each server;
Total request amount of Servers-all is calculated, and judges whether total request amount is more than preset request threshold value;
Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and according to the real-time of each server Performance indicator forwarding request.
Further, the real-time factor include CPU usage, cpu busy percentage, disk available space, memory and I/O utilization rate, network broadband occupation rate.
Further, by installing probe program in each server, to obtain the real-time factor of respective server.
Further, the probe program issues performance indicator acquisition instructions according to setpoint frequency, grabs and feeds back corresponding Real-time factor.
Technical solution of the present invention second aspect be a kind of dynamic self-adapting SiteServer LBS, including scheduler and and its The server cluster of connection, the scheduler include:
Weight classification binding module is divided for analyzing received web request by different realize of request content Class, to every a kind of request binding Dynamic Weights to quantify to request, the Dynamic Weights request to provide server for real-time representation The occupancy and request service time length in source;
Server state acquisition module, for collecting and calculating the request total amount and real-time of wait-for-response in each server It can index;
Access forwarding module for calculating total request amount of Servers-all, and judges whether total request amount is more than default Request threshold value;Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and according to each server Real-time factor forwarding request.
Further, the server state acquisition module includes:
Server request amount acquisition module, for collecting and acquiring the request total amount of wait-for-response in each server;
Real-time factor acquisition module, for acquiring the real-time factor of each server;The real-time factor Including CPU usage, cpu busy percentage, disk available space, memory and I/O utilization rate, network broadband occupation rate.
Further, the real-time factor acquisition module includes:
Probe monitoring modular is installed on the real-time factor that respective server is obtained in each server;
Receiving module is installed on the real-time factor that server feedback is received in scheduler.
Further, the probe monitoring modular includes: timing trigger module, for making probe program according under setpoint frequency The instruction of volatility index collection, grabs and feeds back corresponding real-time factor.
The technical solution of the present invention third aspect is a kind of computer installation, including memory, processor and being stored in is deposited On reservoir and the computer program that can run on a processor, the processor realize such as above-mentioned first when executing described program The method of aspect.
Technical solution of the present invention fourth aspect is a kind of computer readable storage medium, stores computer journey thereon Sequence realizes the method such as above-mentioned first aspect when the computer program is executed by processor.
The invention has the benefit that dynamic self-adapting load-balancing method of the invention and system, pass through back-end services Device is to requirement analysis, according to request content by requests classification;The calculating of server load is using hardware performance and request total amount phase In conjunction with real-time factor, reduce network load, reduce load calculate complexity, improve the accurate of load information Dynamical feedback and admission control mechanism are spent and combined, there is preferable low-response delay, high scalability and high-throughput Performance.
Detailed description of the invention
Fig. 1 show basic flow chart according to the method for the present invention;
Fig. 2 show apparatus according to the invention schematic diagram.
Specific embodiment
It is carried out below with reference to technical effect of the embodiment and attached drawing to design of the invention, specific structure and generation clear Chu, complete description, to be completely understood by the purpose of the present invention, scheme and effect.
It should be noted that unless otherwise specified, when a certain feature referred to as " fixation ", " connection " are in another feature, It can directly fix, be connected to another feature, and can also fix, be connected to another feature indirectly.In addition, this The descriptions such as the upper and lower, left and right used in open are only the mutual alignment pass relative to each component part of the disclosure in attached drawing For system.The "an" of used singular, " described " and "the" are also intended to including most forms in the disclosure, are removed Non- context clearly expresses other meaning.In addition, unless otherwise defined, all technical and scientific terms used herein It is identical as the normally understood meaning of those skilled in the art.Term used in the description is intended merely to describe herein Specific embodiment is not intended to be limiting of the invention.Term as used herein "and/or" includes one or more relevant The arbitrary combination of listed item.Provided in this article any and all example or exemplary language (" such as ", " such as ") Use be intended merely to that the embodiment of the present invention is better described, and unless the context requires otherwise, otherwise will not be to the scope of the present invention Apply limitation.
With reference to Fig. 1, a kind of dynamic self-adapting load-balancing method be the described method comprises the following steps:
Received web request is analyzed, different by request content realize classification, to every a kind of request binding dynamic For weight to quantify to request, the Dynamic Weights request the occupancy and request service time to server resource for real-time representation Length;
Collect and calculate the request total amount and real-time factor of wait-for-response in each server;
Total request amount of Servers-all is calculated, and judges whether total request amount is more than preset request threshold value;
Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and according to the real-time of each server Performance indicator forwarding request.
Further, the real-time factor include CPU usage, cpu busy percentage, disk available space, memory and I/O utilization rate, network broadband occupation rate.
Further, by installing probe program in each server, to obtain the real-time factor of respective server.
Further, the probe program issues performance indicator acquisition instructions according to setpoint frequency, grabs and feeds back corresponding Real-time factor.
With reference to Fig. 2, a kind of dynamic self-adapting SiteServer LBS, including scheduler and server cluster connected to it, The scheduler includes:
Weight classification binding module is divided for analyzing received web request by different realize of request content Class, to every a kind of request binding Dynamic Weights to quantify to request, the Dynamic Weights request to provide server for real-time representation The occupancy and request service time length in source;
Server state acquisition module, for collecting and calculating the request total amount and real-time of wait-for-response in each server It can index;
Access forwarding module for calculating total request amount of Servers-all, and judges whether total request amount is more than default Request threshold value;Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and according to each server Real-time factor forwarding request.
Further, the server state acquisition module includes:
Server request amount acquisition module, for collecting and acquiring the request total amount of wait-for-response in each server;
Real-time factor acquisition module, for acquiring the real-time factor of each server;The real-time factor Including CPU usage, cpu busy percentage, disk available space, memory and I/O utilization rate, network broadband occupation rate.
Further, the real-time factor acquisition module includes:
Probe monitoring modular is installed on the real-time factor that respective server is obtained in each server;
Receiving module is installed on the real-time factor that server feedback is received in scheduler.
Further, the probe monitoring modular includes: timing trigger module, for making probe program according under setpoint frequency The instruction of volatility index collection, grabs and feeds back corresponding real-time factor.
Specifically,
1) request of arrival is analyzed, is classified as m class, every a kind of corresponding weight by the difference of request content Wi, and quantify to request with this, size indicate its to server resource occupy number and request service time length, value It can isolated operation testing setup.
2) it collects and the wait-for-response in calculation server requests total amount and real-time factor information.If Nij indicates clothes The quantity of jth class wait-for-response request in business device Si, SUMi indicate that the wait-for-response of server S i requests total amount, and n indicates to service The quantity of device enables:
If Ni indicates the quantity of server S i wait-for-response request, Ri indicates the total amount of server S i wait-for-response request; Ci indicates that the request of server S i wait-for-response accounts for the percentage of the total wait-for-response request of system, enables:
Ci=Ri/SUM
If Pi indicates server S i hardware performance weight, size can be according to server runtime server Performance measurement software (such as Loadrunner) setting, CLi indicate server S i real-time factor, enable:
SUM and CLi are periodically submitted to the access forwarding module of scheduler respectively, and SUMi is notified into each service Device.
3) according to the request total amount value SUM in current system, refuse request when it reaches scheduled request threshold value, otherwise Receive to request and carries out load balance process;It requests threshold value that can be measured according to practical application and then be arranged again.
4) scheduler periodically collects real-time factor data CLi in each server, is used as each service accordingly The connection weight of device.CLi is set as server hardware performance weight when system is initial, and CLi is that 0 expression server no longer receives to ask It asks or has shut down, feeding back its value until next information is not 0;System is using the forwarding request of WRR algorithms selection server.
It should be appreciated that the embodiment of the present invention can be by computer hardware, the combination of hardware and software or by depositing The computer instruction in non-transitory computer-readable memory is stored up to be effected or carried out.Standard volume can be used in the method Journey technology-includes that the non-transitory computer-readable storage media configured with computer program is realized in computer program, In configured in this way storage medium computer is operated in a manner of specific and is predefined --- according in a particular embodiment The method and attached drawing of description.Each program can with the programming language of level process or object-oriented come realize with department of computer science System communication.However, if desired, the program can be realized with compilation or machine language.Under any circumstance, which can be volume The language translated or explained.In addition, the program can be run on the specific integrated circuit of programming for this purpose.
In addition, the operation of process described herein can be performed in any suitable order, unless herein in addition instruction or Otherwise significantly with contradicted by context.Process described herein (or modification and/or combination thereof) can be held being configured with It executes, and is can be used as jointly on the one or more processors under the control of one or more computer systems of row instruction The code (for example, executable instruction, one or more computer program or one or more application) of execution, by hardware or its group It closes to realize.The computer program includes the multiple instruction that can be performed by one or more processors.
Further, the method can be realized in being operably coupled to suitable any kind of computing platform, wrap Include but be not limited to PC, mini-computer, main frame, work station, network or distributed computing environment, individual or integrated Computer platform or communicated with charged particle tool or other imaging devices etc..Each aspect of the present invention can be to deposit The machine readable code on non-transitory storage medium or equipment is stored up to realize no matter be moveable or be integrated to calculating Platform, such as hard disk, optical reading and/or write-in storage medium, RAM, ROM, so that it can be read by programmable calculator, when Storage medium or equipment can be used for configuration and operation computer to execute process described herein when being read by computer.This Outside, machine readable code, or part thereof can be transmitted by wired or wireless network.When such media include combining microprocessor Or other data processors realize steps described above instruction or program when, invention as described herein including these and other not The non-transitory computer-readable storage media of same type.When dynamic self-adapting load-balancing method according to the present invention and When technology programs, the invention also includes computers itself.
Computer program can be applied to input data to execute function as described herein, to convert input data with life At storing to the output data of nonvolatile memory.Output information can also be applied to one or more output equipments as shown Device.In the preferred embodiment of the invention, the data of conversion indicate physics and tangible object, including the object generated on display Reason and the particular visual of physical objects are described.
The above, only presently preferred embodiments of the present invention, the invention is not limited to above embodiment, as long as It reaches technical effect of the invention with identical means, all within the spirits and principles of the present invention, any modification for being made, Equivalent replacement, improvement etc., should be included within the scope of the present invention.Its technical solution within the scope of the present invention And/or embodiment can have a variety of different modifications and variations.

Claims (10)

1. a kind of dynamic self-adapting load-balancing method, which is characterized in that the described method comprises the following steps:
Received web request is analyzed, different by request content realize classification, to every a kind of request binding Dynamic Weights To quantify request, the Dynamic Weights are requested long to the occupancy of server resource and request service time for real-time representation It is short;
Collect and calculate the request total amount and real-time factor of wait-for-response in each server;
Total request amount of Servers-all is calculated, and judges whether total request amount is more than preset request threshold value;
Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and according to the real-time performance of each server Index forwarding request.
2. dynamic self-adapting load-balancing method according to claim 1, it is characterised in that: the real-time factor packet Include CPU usage, cpu busy percentage, disk available space, memory and I/O utilization rate, network broadband occupation rate.
3. dynamic self-adapting load-balancing method according to claim 1, it is characterised in that: by each server Probe program is installed, to obtain the real-time factor of respective server.
4. dynamic self-adapting load-balancing method according to claim 3, it is characterised in that: the probe program is according to setting Determine frequency and issue performance indicator acquisition instructions, grab and feeds back corresponding real-time factor.
5. a kind of dynamic self-adapting SiteServer LBS, including scheduler and server cluster connected to it, which is characterized in that The scheduler includes:
Weight classification binding module is classified for analyzing received web request by different realize of request content, right To quantify to request, the Dynamic Weights account for server resource for real-time representation request every a kind of request binding Dynamic Weights With rate and request service time length;
Server state acquisition module, request total amount and real-time performance for collecting and calculating wait-for-response in each server refer to Mark;
Access forwarding module for calculating total request amount of Servers-all, and judges whether total request amount is more than preset ask Seek threshold value;Refuse to receive request if total request amount is more than request threshold value, otherwise receives request and according to the real-time of each server Performance indicator forwarding request.
6. dynamic self-adapting SiteServer LBS according to claim 5, which is characterized in that the server state acquisition Module includes:
Server request amount acquisition module, for collecting and acquiring the request total amount of wait-for-response in each server;
Real-time factor acquisition module, for acquiring the real-time factor of each server;The real-time factor includes CPU usage, cpu busy percentage, disk available space, memory and I/O utilization rate, network broadband occupation rate.
7. dynamic self-adapting SiteServer LBS according to claim 5, which is characterized in that the real-time factor is adopted Collecting module includes:
Probe monitoring modular is installed on the real-time factor that respective server is obtained in each server;
Receiving module is installed on the real-time factor that server feedback is received in scheduler.
8. dynamic self-adapting SiteServer LBS according to claim 5, which is characterized in that the probe monitoring modular packet It includes:
Timing trigger module, for making probe program issue performance indicator acquisition instructions according to setpoint frequency, grabbing and feeding back phase The real-time factor answered.
9. a kind of computer installation, can run on a memory and on a processor including memory, processor and storage Computer program, it is characterised in that: the processor realizes side according to any one of claims 1-4 when executing described program Method.
10. a kind of computer readable storage medium, stores computer program thereon, it is characterised in that: the computer program Method according to any of claims 1-4 is realized when being executed by processor.
CN201910119364.4A 2019-02-18 2019-02-18 A kind of dynamic self-adapting load-balancing method and system Pending CN109769031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910119364.4A CN109769031A (en) 2019-02-18 2019-02-18 A kind of dynamic self-adapting load-balancing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910119364.4A CN109769031A (en) 2019-02-18 2019-02-18 A kind of dynamic self-adapting load-balancing method and system

Publications (1)

Publication Number Publication Date
CN109769031A true CN109769031A (en) 2019-05-17

Family

ID=66456852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910119364.4A Pending CN109769031A (en) 2019-02-18 2019-02-18 A kind of dynamic self-adapting load-balancing method and system

Country Status (1)

Country Link
CN (1) CN109769031A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417888A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 Flow control methods, volume control device and electronic equipment
CN112988160A (en) * 2021-03-15 2021-06-18 深圳市慧为智能科技股份有限公司 Server compiling method, device, equipment and computer readable storage medium
CN113765964A (en) * 2020-08-10 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for distributing services of distributed system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244809A (en) * 2011-06-22 2011-11-16 中兴通讯股份有限公司 Method and device for processing service requests of set top box (Set Top Box)
CN102420867A (en) * 2011-12-01 2012-04-18 浪潮电子信息产业股份有限公司 Cluster storage entry resolution method based on real-time load balancing mechanism
CN103338228A (en) * 2013-05-30 2013-10-02 江苏大学 Cloud calculating load balancing scheduling algorithm based on double-weighted least-connection algorithm
CN103713956A (en) * 2014-01-06 2014-04-09 山东大学 Method for intelligent weighing load balance in cloud computing virtualized management environment
CN106572170A (en) * 2016-10-28 2017-04-19 中国电子科技集团公司第五十四研究所 Controller and dynamic load balancing method under SDN hierarchical multiple controllers
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing
CN109032801A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of request scheduling method, system and electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244809A (en) * 2011-06-22 2011-11-16 中兴通讯股份有限公司 Method and device for processing service requests of set top box (Set Top Box)
CN102420867A (en) * 2011-12-01 2012-04-18 浪潮电子信息产业股份有限公司 Cluster storage entry resolution method based on real-time load balancing mechanism
CN103338228A (en) * 2013-05-30 2013-10-02 江苏大学 Cloud calculating load balancing scheduling algorithm based on double-weighted least-connection algorithm
CN103713956A (en) * 2014-01-06 2014-04-09 山东大学 Method for intelligent weighing load balance in cloud computing virtualized management environment
CN106572170A (en) * 2016-10-28 2017-04-19 中国电子科技集团公司第五十四研究所 Controller and dynamic load balancing method under SDN hierarchical multiple controllers
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing
CN109032801A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of request scheduling method, system and electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417888A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 Flow control methods, volume control device and electronic equipment
CN113765964A (en) * 2020-08-10 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for distributing services of distributed system
CN112988160A (en) * 2021-03-15 2021-06-18 深圳市慧为智能科技股份有限公司 Server compiling method, device, equipment and computer readable storage medium
CN112988160B (en) * 2021-03-15 2022-04-19 深圳市慧为智能科技股份有限公司 Server compiling method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN108764863B (en) Data transfer method, device, server and storage medium
CN112162865B (en) Scheduling method and device of server and server
Huang et al. Resource prediction based on double exponential smoothing in cloud computing
Salot A survey of various scheduling algorithm in cloud computing environment
Bi et al. Dynamic provisioning modeling for virtualized multi-tier applications in cloud data center
JP3959516B2 (en) Network system, CPU resource provider, client device, processing service providing method, and program
US20160224392A1 (en) Load balancing using improved component capacity estimation
CN109769031A (en) A kind of dynamic self-adapting load-balancing method and system
CN106156115B (en) A kind of resource regulating method and device
CN109144724A (en) A kind of micro services resource scheduling system and method
CN103927229A (en) Scheduling Mapreduce Jobs In A Cluster Of Dynamically Available Servers
CN109819047B (en) Mobile edge computing resource allocation method based on incentive mechanism
CN103995735A (en) Device and method for scheduling working flow
CN109543890A (en) Power grid based on load estimation equilibrium takes control Optimization Scheduling, apparatus and system
CN109075988A (en) Task schedule and resource delivery system and method
CN110264039A (en) A kind of generation method and equipment of working report
CN109478973A (en) For task schedule, the SDN controller of resource granting and service offer, system and method
CN102868573A (en) Method and device for Web service load cloud test
Tuli et al. GOSH: Task scheduling using deep surrogate models in fog computing environments
Wang et al. Lube: Mitigating bottlenecks in wide area data analytics
Tang et al. Data-aware resource scheduling for multicloud workflows: A fine-grained simulation approach
CN115269108A (en) Data processing method, device and equipment
CN113051060A (en) GPU dynamic scheduling method and device based on real-time load and electronic equipment
CN105260245B (en) A kind of resource regulating method and device
CN106844175B (en) A kind of cloud platform method for planning capacity based on machine learning

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190517

RJ01 Rejection of invention patent application after publication