CN112199199A - Server load balancing distribution method - Google Patents

Server load balancing distribution method Download PDF

Info

Publication number
CN112199199A
CN112199199A CN202011284645.4A CN202011284645A CN112199199A CN 112199199 A CN112199199 A CN 112199199A CN 202011284645 A CN202011284645 A CN 202011284645A CN 112199199 A CN112199199 A CN 112199199A
Authority
CN
China
Prior art keywords
server
rate
residual rate
memory
percentage weight
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
CN202011284645.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.)
GUANGZHOU ZHUJIANG DIGITAL MEDIA GROUP CO Ltd
Original Assignee
GUANGZHOU ZHUJIANG DIGITAL MEDIA GROUP 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 GUANGZHOU ZHUJIANG DIGITAL MEDIA GROUP CO Ltd filed Critical GUANGZHOU ZHUJIANG DIGITAL MEDIA GROUP CO Ltd
Priority to CN202011284645.4A priority Critical patent/CN112199199A/en
Publication of CN112199199A publication Critical patent/CN112199199A/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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a server load balancing distribution method, which comprises the steps of reading the utilization rate of a server CPU, the utilization rate of a memory and the utilization rate of bandwidth through an entrance of a network management protocol, and calculating the residual rate of the server CPU, the residual rate of the memory and the residual rate of the bandwidth; respectively defining the percentage weight of the CPU residual rate, the percentage weight of the memory residual rate and the percentage weight of the bandwidth residual rate of the server by the total user port according to the running state of the current server; calculating the weight value of each current server by adding the percentage weight value of the CPU residual rate of the current server, the percentage weight value of the memory residual rate and the percentage weight value of the bandwidth residual rate; and dividing the task distribution weighted value of each current server by the sum of all the task distribution weighted values of the current servers to obtain the load distribution task value of each current server, and distributing the load tasks to the servers according to the load distribution task value.

Description

Server load balancing distribution method
Technical Field
The invention relates to the technical field of server load balancing distribution, in particular to a server load balancing distribution method.
Background
Traditional server load algorithms are mainly classified into static load balancing algorithms and dynamic load balancing algorithms. The static load balancing algorithm distributes tasks with fixed probability, does not consider the state information of the server, such as a round robin algorithm, a weighted round robin algorithm, a random method and the like, and has the defects that the rationality of distributing the tasks cannot be guaranteed and the tasks cannot be distributed according to the bearing capacity of the server. The dynamic load balancing algorithm determines the distribution of tasks according to the real-time load state information of the server, such as a minimum connection method, a weighted minimum connection method and the like. When the minimum connection method is suitable for the condition that the processing performances of all nodes are similar, the task distribution unit can smoothly distribute the tasks to the servers. The weighted minimum connection algorithm is a load balancing algorithm which describes the service capacities of different servers by using weights and distributes different connection numbers to the servers with different service capacities on the basis of the minimum connection algorithm. Each server represents its processing performance with a corresponding weight value. The system administrator can dynamically set the weights of the servers. Weighted minimum connection scheduling makes the number of established connections of the server as proportional to its weight as possible when scheduling new connections. The dynamic load balancing algorithm has a disadvantage that when the performance gap of the servers is large, the expected effect cannot be achieved. Because the number of connections cannot accurately indicate the processing capacity at this time, a server with a small number of connections and poor performance may not be as good as a server with a large number of connections and excellent performance. This may result in tasks not being accurately assigned to the remaining processing-intensive machines.
Therefore, the traditional server load algorithm does not consider the performance difference of the servers and the bearing capacity of the servers to the tasks, especially in a real enterprise business environment, the number of the servers generally flexibly increases along with the development of the business, the performance difference of the newly added servers is large, and if a minimum connection method and other dynamic algorithms are adopted, the tasks can not be reasonably distributed due to the performance problem of the servers.
Disclosure of Invention
The invention aims to provide a server load balancing distribution method for reasonably distributing load tasks by a server.
The invention relates to a server load balancing distribution method, which comprises the following steps:
reading the utilization rate of a server CPU, the utilization rate of a memory and the utilization rate of bandwidth through an entrance of a network management protocol;
obtaining the residual rate of the server CPU according to the utilization rate of the server CPU; obtaining the residual rate of the memory according to the utilization rate of the memory of the server; obtaining the residual rate of the bandwidth according to the utilization rate of the server bandwidth;
respectively defining the percentage weight of the CPU residual rate, the percentage weight of the memory residual rate and the percentage weight of the bandwidth residual rate of the server by the total user port according to the running state of the current server;
calculating the task distribution weight value of each current server by adding the product of the CPU residual rate and the percentage weight value of the current server, the product of the memory residual rate and the percentage weight value of the memory residual rate and the product of the bandwidth residual rate and the percentage weight value of the memory residual rate;
dividing the task distribution weighted value of each current server by the sum of all the task distribution weighted values of the current servers to obtain the load distribution task value of each current server;
and distributing the load task to each server according to the load distribution task value.
The method comprises reading the utilization rate of server CPU, the utilization rate of memory and the utilization rate of bandwidth at the entrance of network management protocol to calculate the residual rate of server CPU, the residual rate of memory and the residual rate of bandwidth, respectively defining the percentage weight of the residual rate of server CPU, the percentage weight of the residual rate of memory and the percentage weight of the residual rate of bandwidth by the total user port according to the current operation state of server, adding the percentage weight of the residual rate of current server CPU, the percentage weight of memory and the percentage weight of bandwidth residual rate to calculate the weight of each current server, dividing the weight of each current server by the sum of the weight of each current server to calculate the reasonable load distribution task value of each current server, so as to obtain the reasonable load distribution task value of each current server according to the performance difference of servers and the bearing capacity of each current server to the task, and performing effective load distribution tasks.
Drawings
Fig. 1 is a flowchart of a server load balancing distribution method according to the present invention.
Detailed Description
As shown in fig. 1, a server load balancing distribution method includes the following steps:
reading the utilization rate of a server CPU, the utilization rate of a memory and the utilization rate of bandwidth through an entrance of a network management protocol;
obtaining the residual rate of the server CPU according to the utilization rate of the server CPU; obtaining the residual rate of the memory according to the utilization rate of the memory of the server; obtaining the residual rate of the bandwidth according to the utilization rate of the server bandwidth;
respectively defining the percentage weight of the CPU residual rate, the percentage weight of the memory residual rate and the percentage weight of the bandwidth residual rate of the server by the total user port according to the running state of the current server;
calculating the task distribution weight value of each current server by adding the product of the CPU residual rate and the percentage weight value of the current server, the product of the memory residual rate and the percentage weight value of the memory residual rate and the product of the bandwidth residual rate and the percentage weight value of the memory residual rate;
dividing the task distribution weighted value of each current server by the sum of all the task distribution weighted values of the current servers to obtain the load distribution task value of each current server;
and distributing the load task to each server according to the load distribution task value.
The percentage weight of the remaining rate of the CPU of the server, the percentage weight of the remaining rate of the memory, and the percentage weight of the remaining rate of the bandwidth are respectively defined as the remaining rate of the CPU of the server of fifty percent, the remaining rate of the memory of thirty percent, and the remaining rate of the bandwidth of twenty percent.
The method comprises the steps of reading the utilization rate of a server CPU, the utilization rate of a memory and the utilization rate of a bandwidth at an entrance of a network management protocol, calculating the residual rate of the server CPU, the residual rate of the memory and the residual rate of the bandwidth, respectively defining the percentage weight of the residual rate of the server CPU, the percentage weight of the residual rate of the memory and the percentage weight of the residual rate of the bandwidth by a total user port according to the running state of a current server, adding the percentage weight of the residual rate of the current server CPU, the percentage weight of the residual rate of the memory and the percentage weight of the residual rate of the bandwidth to calculate the current weight of each server, dividing the current weight of each server by the sum of the current weight of each server to calculate the current reasonable load distribution task value of each server, so that the reasonable load distribution task value of each server can be calculated according to the, and performing effective load distribution tasks.
Specific case descriptions are given below:
the client considers that the CPU has the largest influence on the service performance according to the service condition of the system, then the memory is used, and finally the bandwidth is used, wherein the percentage weight of the CPU residual rate of the server, the percentage weight of the memory residual rate and the percentage weight of the bandwidth residual rate are respectively defined as fifty percent of the CPU residual rate of the server, thirty percent of the memory residual rate and twenty percent of the bandwidth residual rate.
The weight value calculation formula of the server is Wn =50% (1-An) +30% (1-Bn) +20% (1-Cn), wherein Wn represents the weight value of the current server, 50% (1-An) represents the percentage weight of the CPU remaining rate of the previous server, (1-An) represents the CPU remaining rate of the previous server, and An represents the CPU usage rate of the previous server; 30% (1-Bn) represents the percentage weight of the memory residual rate of the front server, (1-Bn) represents the memory residual rate of the front server, and Bn represents the memory utilization rate of the front server; 20% (1-Cn) represents a percentage weight of the previous server bandwidth remaining rate, (1-Cn) represents the previous server bandwidth remaining rate, Cn represents the previous server bandwidth usage rate.
If N servers with different performances are in load balance, the current weighted value of each server is divided by the sum of the current weighted values of each server to calculate a reasonable load distribution task value of each current server, and a calculation result is obtained
Figure DEST_PATH_IMAGE002
The server is assigned a task value.
The method comprises the following steps: some internet service is served by 6 servers, and the service conditions of the servers are obtained through the entrance of the network management protocol as follows:
according to the weight value of the server: wn =50% (1-An) +30% (1-Bn) +20% (1-Cn), server assigned task value:
Figure 936306DEST_PATH_IMAGE002
the calculation results are in the following table:
server CPU utilization Memory usage rate Rate of bandwidth usage Weighted value Server allocation task value
Server1 30% 40% 30% 0.67 24.50%
Server2 40% 50% 35% 0.58 21.20%
Server3 50% 60% 40% 0.49 17.90%
Server4 60% 70% 45% 0.4 14.70%
Server5 70% 80% 35% 0.34 12.50%
Server6 80% 90% 40% 0.25 9.20%
If 1000 client data requests exist at a certain time, according to the task value distributed by the servers in the table above, 245, 212, 179, 147, 125, 92 client request data are distributed by each server of 6 servers respectively, so that the load task can be effectively distributed according to the performance difference of the servers and the bearing capacity of the servers to the task.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (2)

1. A server load balancing distribution method is characterized by comprising the following steps:
reading the utilization rate of a server CPU, the utilization rate of a memory and the utilization rate of bandwidth through an entrance of a network management protocol;
obtaining the residual rate of the server CPU according to the utilization rate of the server CPU; obtaining the residual rate of the memory according to the utilization rate of the memory of the server; obtaining the residual rate of the bandwidth according to the utilization rate of the server bandwidth;
respectively defining the percentage weight of the CPU residual rate, the percentage weight of the memory residual rate and the percentage weight of the bandwidth residual rate of the server by the total user port according to the running state of the current server;
calculating the task distribution weight value of each current server by adding the product of the CPU residual rate and the percentage weight value of the current server, the product of the memory residual rate and the percentage weight value of the memory residual rate and the product of the bandwidth residual rate and the percentage weight value of the memory residual rate;
dividing the task distribution weighted value of each current server by the sum of all the task distribution weighted values of the current servers to obtain the load distribution task value of each current server;
and distributing the load task to each server according to the load distribution task value.
2. The server load balancing distribution method according to claim 1, wherein the percentage weight of the CPU remaining rate, the percentage weight of the memory remaining rate, and the percentage weight of the bandwidth remaining rate of the server are defined as fifty percent of the CPU remaining rate, thirty percent of the memory remaining rate, and twenty percent of the bandwidth remaining rate, respectively.
CN202011284645.4A 2020-11-17 2020-11-17 Server load balancing distribution method Pending CN112199199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011284645.4A CN112199199A (en) 2020-11-17 2020-11-17 Server load balancing distribution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011284645.4A CN112199199A (en) 2020-11-17 2020-11-17 Server load balancing distribution method

Publications (1)

Publication Number Publication Date
CN112199199A true CN112199199A (en) 2021-01-08

Family

ID=74034332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011284645.4A Pending CN112199199A (en) 2020-11-17 2020-11-17 Server load balancing distribution method

Country Status (1)

Country Link
CN (1) CN112199199A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709054A (en) * 2021-07-16 2021-11-26 济南浪潮数据技术有限公司 Keepallved-based LVS (Low Voltage differential Signaling) system deployment adjusting method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181834A1 (en) * 2012-12-20 2014-06-26 Research & Business Foundation, Sungkyunkwan University Load balancing method for multicore mobile terminal
CN105335250A (en) * 2014-07-28 2016-02-17 浙江大华技术股份有限公司 Distributed file system-based data recovery method and device
CN111258762A (en) * 2020-01-15 2020-06-09 北京工业大学 Dynamic periodic media server load balancing algorithm
CN111381971A (en) * 2020-03-17 2020-07-07 重庆邮电大学 Nginx-based dynamic weight load balancing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181834A1 (en) * 2012-12-20 2014-06-26 Research & Business Foundation, Sungkyunkwan University Load balancing method for multicore mobile terminal
CN105335250A (en) * 2014-07-28 2016-02-17 浙江大华技术股份有限公司 Distributed file system-based data recovery method and device
CN111258762A (en) * 2020-01-15 2020-06-09 北京工业大学 Dynamic periodic media server load balancing algorithm
CN111381971A (en) * 2020-03-17 2020-07-07 重庆邮电大学 Nginx-based dynamic weight load balancing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
段淮川等: ""基于剩余负载率的动态负载均衡研究"", 《微电子学与计算机》, pages 142 *
王春娟;: "Web集群负载均衡算法的分析与研究", 电脑知识与技术, no. 26 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709054A (en) * 2021-07-16 2021-11-26 济南浪潮数据技术有限公司 Keepallved-based LVS (Low Voltage differential Signaling) system deployment adjusting method, device and system

Similar Documents

Publication Publication Date Title
US9015227B2 (en) Distributed data processing system
CN110365765B (en) Bandwidth scheduling method and device of cache server
US20200042364A1 (en) Movement of services across clusters
CN106899680A (en) The burst treating method and apparatus of multi-tiling chain
US11272029B2 (en) Access log processing method and device
CN108667748A (en) A kind of method, apparatus and equipment of control bandwidth
KR20170029263A (en) Apparatus and method for load balancing
US8356098B2 (en) Dynamic management of workloads in clusters
CN107111520A (en) Method and system for the real time resources consumption control in DCE
CN109032800A (en) A kind of load equilibration scheduling method, load balancer, server and system
CN102932271A (en) Method and device for realizing load balancing
Vashistha et al. Comparative study of load balancing algorithms
CN115714817A (en) Dynamic feedback weighted cloud storage resource scheduling method, device and equipment
JP6116102B2 (en) Cluster system and load balancing method
CN105872082B (en) Fine granularity resource response system based on container cluster load-balancing algorithm
CN112199199A (en) Server load balancing distribution method
CN104901999A (en) Method for reliability perceptive cross-domain mapping of virtual data center
KR20070032441A (en) Load balancing system based on fuzzy grouping and the load balancing method
CN113315825A (en) Distributed request processing method, device, equipment and storage medium
CN113765969A (en) Flow control method and device
Xue et al. Mining association rules for admission control and service differentiation in e‐commerce applications
CN108200185B (en) Method and device for realizing load balance
Ziafat et al. Optimal selection of VMs for resource task scheduling in geographically distributed clouds using fuzzy c‐mean and MOLP
CN112685167A (en) Resource using method, electronic device and computer program product
CN115842828A (en) Gateway load balancing control method, device, equipment and 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