CN113766018A - Service-driven Web application load balancing task distribution method - Google Patents
Service-driven Web application load balancing task distribution method Download PDFInfo
- Publication number
- CN113766018A CN113766018A CN202111009510.1A CN202111009510A CN113766018A CN 113766018 A CN113766018 A CN 113766018A CN 202111009510 A CN202111009510 A CN 202111009510A CN 113766018 A CN113766018 A CN 113766018A
- Authority
- CN
- China
- Prior art keywords
- task allocation
- task
- load balancing
- server
- web application
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1025—Dynamic adaptation of the criteria on which the server selection is based
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1006—Server selection for load balancing with static server selection, e.g. the same server being selected for a specific client
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1027—Persistence of sessions during load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a service-driven Web application load balancing task allocation method, which aims at the high-efficiency access control problems of high concurrency access degree and large accumulated data storage capacity faced by water conservancy and power remote users with wide region distribution and large quantity, a load balancing task allocation server adopts an IP _ hash strategy to perform static task allocation, dynamically adjusts task allocation when the time of a corresponding Web server responding to a newly-accessed Web application service request is longer than the maximum tolerance time of a user in a task allocation strategy execution period, adjusts the task allocation weight of each Web server, reaches the maximum task allocation weight of an idle state server at first, allocates the newly-accessed task request to the server which reaches the idle state at first, and reduces the task allocation weights of other servers according to the increase of the residual execution time of the servers, the balance degree among multiple application servers and the overall task success acceptance rate are improved.
Description
Technical Field
The invention relates to a multi-server load balancing quick task allocation method suitable for a water conservancy and power information system, and belongs to the technical field of informatization data access control.
Background
The remote stations related to the hydropower information management system are various in types, including hydropower stations, wind power stations, photovoltaic power stations, hydro-junction projects and the like, different users need to be suitable for relevant data of the station and also need to pay attention to the conditions of other relevant stations, and under the control of certain access authority and priority, the data access delay difference of thousands of power stations is minimum in consideration of the revision and execution conditions of special service data such as a power generation plan. However, thousands of users use the system at the same time, the actual operation data of each station is counted and planned and reported within a specified time range, and in a peak period (for example, 8-9 am every day) of centralized data reporting and planning and coordination, the centralized operation and high concurrent access of large-scale users make the system response extremely slow, and the work efficiency of each level of scheduling management mechanism is seriously affected. For water conservancy and electric power companies in the province level, the delay of real-time data reporting of various power stations can be reduced to the greatest extent, scheduling instructions are sent to the power stations in time, and the problems of efficient control and dynamic optimization of multi-user concurrent access are urgently needed to be solved. Although technologies such as database partitioning, read-write separation, load balancing of an application server and the like are generally adopted in such a situation, how to perform adaptive improvement of various methods under specific service rules and constraint conditions is a core problem of optimizing and upgrading a new system, and performance meeting user requirements is obtained under the condition that the hardware cost of the system is not increased.
Disclosure of Invention
The purpose of the invention is as follows: aiming at more than three Web application servers and common mobile network channels, a service-driven Web application load balancing task allocation method is provided, and response time within a few seconds for thousands of various users to simultaneously access the provincial water conservancy power dispatching center information system is realized.
The technical scheme is as follows: a method for distributing service-driven Web application load balancing tasks comprises the following steps: the load balancing task allocation server adopts an IP-hash strategy to perform static task allocation, and in a task allocation strategy execution period, when the time of a corresponding Web server responding to a newly accessed Web application service request is longer than the maximum tolerance time of a user, the load balancing task allocation server starts to perform dynamic adjustment task allocation;
the dynamically adjusting task allocation comprises: adjusting the task allocation weight of each Web server, wherein the task allocation weight of the server in the idle state is the largest firstly, the newly accessed task request is allocated to the server which firstly reaches the idle state, and the task allocation weights of the rest servers are reduced according to the increase of the rest execution time of the servers; and if the Web application service request time is still larger than the maximum tolerance time of the user when the execution period of the current task allocation strategy is finished, continuously executing dynamic adjustment task allocation when the execution period of the next task allocation strategy is started.
Furthermore, double Nginx load balancing task distribution servers are adopted, and the number of Web servers is more than or equal to three.
Further, in the step of dynamically adjusting task allocation, if the difference between the remaining execution time values of any two Web servers is smaller than the minimum arrival interval of the Web application service requests in the system, weight allocation is performed according to the variance of response time of the corresponding Web server in the last task allocation policy execution period, and a large task allocation weight corresponding to a small variance value is performed.
Further, when a Web application service request exists, the load balancing task allocation server extracts relevant information from the HTTP protocol to generate a triple group representing the task category<ID,S,Tf>Where ID denotes a task unique identifier, S denotes an operational subset of the task, TfIndicating the time required for the task to execute.
Has the advantages that: the invention provides a service-driven Web application load balancing task allocation method, which is suitable for more than three Web application servers and common mobile network channels and realizes response time within several seconds for thousands of various users to simultaneously access provincial water conservancy and power dispatching center information systems, aiming at the problem of efficient access control under the conditions of high concurrency access degree and large accumulated data storage capacity faced by water conservancy and power remote users with wide regional distribution and large quantity. The method is based on a load balancing cluster structure with double Nginx, combines a static IP address mapping algorithm with the fastest task completion time in operation, improves the balance degree among multiple application servers and the successful acceptance rate of the overall task, and has important significance for timely reporting and inquiring service information under limited conditions.
Drawings
Fig. 1 is a schematic diagram of load balancing task allocation according to the present invention.
Detailed Description
The invention is further explained below with reference to the drawings.
As shown in fig. 1, a method for distributing a service-driven load balancing task for a Web application completes the distribution of the load balancing task between Web application servers of a water conservancy power information system. The method is suitable for the load balancing task distribution servers with double Nginx, and at least more than 3 Web servers. The load balancing task allocation server can be used by two Web servers, or can be independently deployed on the two Web servers, Keeployed software under the Nginx technical framework is installed on the load balancing task allocation server, and a client task request is allocated to a proper Web server by running a load balancing task allocation algorithm to execute specific application service operation. Thus, each Web server is provided with the capability to execute all published Web application services.
The method comprises the following specific processes:
step 1: initialization
And installing Keepalived software under the Nginx technical framework on the load balancing task distribution server, and setting a Web application service main task category table supported by the system and a task distribution strategy execution period D, such as 30-60 minutes.
1) Triple for each task category<ID,S,Tf>Representing, wherein ID represents task unique identification; s denotes a subset of operations of a task, such as write, read, browse and others, TfRepresents the time required by the task execution, namely a task time threshold;
2) the actual Task set is recorded as Task ═ Task1,task2,…,taskmWhere m is the total number of Web application service requests. The ith service request is recorded as
3) Set W ═ W in Web server1,W2,…,WnIn the ith server WiIs recorded as the current task state
Where N is the total number of Web servers, NiFor a server WiThe total number of current tasks of the task,for a server WiProcessing the time required by all the tasks at present, namely the residual execution time of the server;
4) when a Web application service request exists, the load balancing task allocation server extracts relevant information from an HTTP (hyper text transport protocol) protocol to generate a task category triple<ID,S,Tf>。
Step 2: static task allocation phase
An IP-Hash strategy is adopted, tasks are distributed to one of a plurality of Web servers according to client IP address groups, the client IP addresses of all signed users are divided into n groups by setting a Hash function, each group has fixed Web application service session parameters such as service numbers, port numbers and the like, and multiple requests of a certain client are sent to the same server under normal conditions. The task assignment weight of each server is equal at this time.
And step 3: dynamically adjusting task allocation phases
In a task allocation strategy execution period, when the time of the corresponding Web server responding to the newly accessed Web application service request is greater than the maximum tolerance time of a userIf a long task of reporting a 96-point power-on plan is executed,for example, 5 seconds, the task allocation weight of each Web server is adjusted, the task allocation weight of the server which firstly reaches the idle state is the maximum, and the newly accessed task request is allocated to the server W which firstly reaches the idle stateiIn, i.e.The task allocation weights of the other servers are based on the remaining execution time of the serversIncreasing and decreasing value, weight QiCan be expressed as
Wherein, when any two TrWhen the value difference is smaller than the minimum arrival interval of the Web application service request in the system, the two Web application service requests are considered to arrive at the idle state at the same time, and when the corresponding task distribution weight is calculated, the corresponding Web server is adopted to adopt the variance V of the response time in the last task distribution strategy execution periodiInstead of TrIs considered to be ViThe execution time of the tasks executed in the period on the smaller Web server is more balanced, so that the task distribution stage of the dynamic adjustment task in the period has a larger task distribution weight, and the weight Q is more balancediCan be expressed as
If the Web application service request time is still longer than the maximum tolerance time of the user when the execution period of the current task allocation strategy is finished, continuously executing dynamic adjustment task allocation when the execution period of the next task allocation strategy is started; otherwise, the static task allocation is restarted to be executed when the next task allocation strategy execution period is started.
The service-driven Web application load balancing task allocation method is based on a double-Nginx load balancing cluster framework, more than three Web application servers can be configured at will, a main Nginx load balancing management server is appointed, double-computer hot standby is realized, once the main management server fails, zero interruption can be carried out to switch to a standby management server, and the condition that a client accesses Web application and is not suspended is guaranteed. By matching with a dynamic and static combined load balancing task allocation algorithm, different system overheads of short tasks and long tasks can be effectively balanced, user-satisfied stable system access response time is realized, the success rate of completing tasks and the load balancing degree are improved, and good expandability and self-adaptive capacity are achieved.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (4)
1. A method for distributing load balancing tasks of Web application driven by services is characterized by comprising the following steps: the load balancing task allocation server adopts an IP-hash strategy to perform static task allocation, and in a task allocation strategy execution period, when the time of a corresponding Web server responding to a newly accessed Web application service request is longer than the maximum tolerance time of a user, the load balancing task allocation server starts to perform dynamic adjustment task allocation;
the dynamically adjusting task allocation comprises: adjusting the task allocation weight of each Web server, wherein the task allocation weight of the server in the idle state is the largest firstly, the newly accessed task request is allocated to the server which firstly reaches the idle state, and the task allocation weights of the rest servers are reduced according to the increase of the rest execution time of the servers; and if the Web application service request time is still larger than the maximum tolerance time of the user when the execution period of the current task allocation strategy is finished, continuously executing dynamic adjustment task allocation when the execution period of the next task allocation strategy is started.
2. The service-driven Web application load balancing task allocation method according to claim 1, characterized in that dual Nginx load balancing task allocation servers are employed, and the number of Web servers is greater than or equal to three.
3. The service-driven Web application load balancing task allocation method according to claim 1, wherein in the dynamic task allocation stage, if the difference between the remaining execution time values of any two Web servers is smaller than the minimum arrival interval of Web application service requests in the system, weight allocation is performed according to the variance of response time of the corresponding Web server in the last task allocation policy execution period, and a large task allocation weight corresponding to the small variance value is performed.
4. The traffic-driven Web application load balancing task allocation method according to claim 1 or 2, wherein when there is a Web application service request, the load balancing task allocation server extracts relevant information from the HTTP protocol to generate a triple indicating task category<ID,S,Tf>Where ID denotes a task unique identifier, S denotes an operational subset of the task, TfIndicating the time required for the task to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111009510.1A CN113766018A (en) | 2021-08-31 | 2021-08-31 | Service-driven Web application load balancing task distribution method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111009510.1A CN113766018A (en) | 2021-08-31 | 2021-08-31 | Service-driven Web application load balancing task distribution method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113766018A true CN113766018A (en) | 2021-12-07 |
Family
ID=78792014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111009510.1A Pending CN113766018A (en) | 2021-08-31 | 2021-08-31 | Service-driven Web application load balancing task distribution method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113766018A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117544686A (en) * | 2024-01-09 | 2024-02-09 | 广州大一互联网络科技有限公司 | Intelligent scheduling method and system for data center server |
-
2021
- 2021-08-31 CN CN202111009510.1A patent/CN113766018A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117544686A (en) * | 2024-01-09 | 2024-02-09 | 广州大一互联网络科技有限公司 | Intelligent scheduling method and system for data center server |
CN117544686B (en) * | 2024-01-09 | 2024-03-29 | 广州大一互联网络科技有限公司 | Intelligent scheduling method and system for data center server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103384272B (en) | A kind of cloud service distributive data center system and load dispatching method thereof | |
Jansen et al. | Energy efficient virtual machine allocation in the cloud | |
CN113110933B (en) | System with Nginx load balancing technology | |
WO2011000199A1 (en) | Method and system for intelligently scheduling cluster servers | |
US20090138883A1 (en) | Method and system of managing resources for on-demand computing | |
CN103986766A (en) | Self-adaptation load balancing job task scheduling method and device | |
CN104052820A (en) | Dynamic energy-saving resource scheduling system and method for distributed cloud computing platform | |
CN109040308A (en) | A kind of document distribution system and document distribution method based on IPFS | |
US20130345887A1 (en) | Infrastructure based computer cluster management | |
CN110086726A (en) | A method of automatically switching Kubernetes host node | |
Singh et al. | Survey on various load balancing techniques in cloud computing | |
CN103457870A (en) | Load-balancing and high-availability sub system used for distribution-type system and method | |
CN113766018A (en) | Service-driven Web application load balancing task distribution method | |
CN102325054A (en) | Self-adaptive adjusting method for hierarchy management of distributed type calculation management platform cluster | |
Zubair et al. | Integration of cloud-fog based platform for load balancing using hybrid genetic algorithm using bin packing technique | |
Fu et al. | An efficient VNF deployment scheme for cloud networks | |
EP2822140B1 (en) | Method for power allocation and resource management system | |
CN1625109A (en) | Method and apparatus for virtualizing network resources | |
CN103176850A (en) | Electric system network cluster task allocation method based on load balancing | |
CN116055499A (en) | Method, equipment and medium for intelligently scheduling cluster tasks based on redis | |
CN109298949A (en) | A kind of resource scheduling system of distributed file system | |
CN112073223B (en) | System and method for managing and controlling operation of cloud computing terminal and cloud server | |
CN112968962B (en) | Cloud platform storage resource scheduling method based on distributed computer cluster architecture | |
CN104298536A (en) | Dynamic frequency modulation and pressure adjustment technology based data center energy-saving dispatching method | |
Fu et al. | Data replica placement policy based on load balance in cloud storage system |
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 |