CN106850822A - Load-balancing method, equipment and distributed system - Google Patents

Load-balancing method, equipment and distributed system Download PDF

Info

Publication number
CN106850822A
CN106850822A CN201710093745.0A CN201710093745A CN106850822A CN 106850822 A CN106850822 A CN 106850822A CN 201710093745 A CN201710093745 A CN 201710093745A CN 106850822 A CN106850822 A CN 106850822A
Authority
CN
China
Prior art keywords
server
request
load
normalization
distributed system
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.)
Granted
Application number
CN201710093745.0A
Other languages
Chinese (zh)
Other versions
CN106850822B (en
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.)
Poly Polytron Technologies Inc
Juhaokan Technology Co Ltd
Original Assignee
Poly Polytron Technologies Inc
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 Poly Polytron Technologies Inc filed Critical Poly Polytron Technologies Inc
Priority to CN201710093745.0A priority Critical patent/CN106850822B/en
Publication of CN106850822A publication Critical patent/CN106850822A/en
Application granted granted Critical
Publication of CN106850822B publication Critical patent/CN106850822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload

Abstract

The embodiment of the present invention provides a kind of load-balancing method, equipment and distributed system, and the method includes:Receive the first request that client sends;The process capability index of type and each server according to the first request, determines the normalization demand load factor of the first request;The attribute information of the type, the attribute information of each server and distributed system of the second request being presently processing according to each server, determines the normalization remaining load rate of each server;Normalization remaining load rate according to each server, determines destination server;If the normalization remaining load rate of destination server is more than or equal to the normalization demand load factor of the first request, sending first to destination server asks, so that destination server treatment first is asked.Accuracy for improving load balancing.

Description

Load-balancing method, equipment and distributed system
Technical field
The present embodiments relate to field of computer technology, more particularly to a kind of load-balancing method, equipment and distribution System.
Background technology
Multiple servers are generally included in a distributed system, and the plurality of server can provide service to client, In order that obtain each server resource being reasonably utilized, load-balancing device is generally set in a distributed system, by bearing Carry the load balancing that balancing equipment is realized between each server.
In the prior art, the number of the request being presently processing generally according to server, weighs the load of server, The request number that server is presently processing is more, it is determined that the load of server is higher.In actual application, by bearing The request number that balancing equipment is real-time or each server of periodic statistics is presently processing is carried, and it is current just according to each server In the request number for the treatment of, load sequence is carried out to each server, the request of client transmission is received in load-balancing device Afterwards, load-balancing device sends the requests to count obtaining, minimum server is loaded, by loading minimum server pair The request that client sends is processed.
However, because the disposal ability of each server may be different, therefore, according to the request that server is presently processing Number, it is impossible to accurately determine the actual loading of server, further, the loading demands of the different requests that client sends Amount may be also different, cause the accuracy of load balancing of the prior art poor.
The content of the invention
The embodiment of the present invention provides a kind of load-balancing method, equipment and distributed system, improves the essence of load balancing True property.
In a first aspect, the embodiment of the present invention provides a kind of load-balancing method, the load being applied in distributed system is equal Weighing apparatus equipment, the distributed system includes the load-balancing device and multiple servers, and methods described includes:
Receive the first request that client sends;
The process capability index of type and each server according to the described first request, determines first request Normalization demand load factor;
According to each server be presently processing second request type, the attribute information of each server, And the attribute information of the distributed system, determine the normalization remaining load rate of each server;
Normalization remaining load rate according to each server, determines destination server;
If the normalization remaining load rate of the destination server is more than or equal to the normalization demand of the described first request Load factor, then send first request to the destination server, so that destination server treatment first request.
In a kind of possible implementation method, the treatment energy of type and each server according to the described first request Power index, determines the normalization demand load factor of first request, including:
According to the type of the described first request, the corresponding load consumption amount of first request is determined;
In the process capability index of each server, minimum treat Capability index is obtained;
According to the described first request corresponding load consumption amount and minimum treat Capability index, described the is determined The normalization demand load factor of one request.
In alternatively possible implementation method, according to the described first corresponding load consumption amount of request and it is described most Small process capability index, determines the normalization demand load factor of first request, including:
The normalization demand load factor L of first request is determined according to equation below one:
Wherein, the C is the corresponding load consumption amount of the described first request, the PminFor the minimum treat ability refers to Number.
In alternatively possible implementation method, for any one server in each server, the basis The type of the request that each server is presently processing, the attribute information of each server and the distributed system Attribute information, determine the normalization remaining load rate of each server, including:
The type of the second request being presently processing according to the server, determines that each second request is corresponding negative Carry consumption;
The handling capacity of the server, the handling capacity of the distributed system, the disposal ability of the server is obtained to refer to Number;
Corresponding load consumption amount, the handling capacity of the server, the distributed system are asked according to each described second Handling capacity and the server process capability index, determine the normalization remaining load rate of the server.
In alternatively possible implementation method, corresponding load consumption amount, the service are asked according to each described second The process capability index of the handling capacity of device, the handling capacity of the distributed system and the server, determines the server Normalization remaining load rate, including:
According to equation below two, the normalization remaining load rate M of the server is determined:
Wherein, the i is be presently processing i-th second requests of the server, the k be the server just In the number of the second request for the treatment of, the CiIt is the corresponding load consumption amount of i-th second requests, the P is the service The process capability index of device, the N is the handling capacity of the server, and the G is the handling capacity of the distributed system.
Second aspect, the embodiment of the present invention provides a kind of load-balancing device, and the load-balancing device is arranged on distribution In formula system, the distributed system also includes multiple servers, and the load-balancing device includes that receiver module, first determine Module, the second determining module, the 3rd determining module and sending module, wherein,
The receiver module is used for, and receives the first request that client sends;
First determining module is used for, the disposal ability of type and each server according to the described first request Index, determines the normalization demand load factor of first request;
Second determining module is used for, the type of the second request being presently processing according to each server, each The attribute information of the attribute information of the server and the distributed system, determines that the normalization of each server is remaining Load factor;
3rd determining module is used for, the normalization remaining load rate according to each server, determines destination service Device;
The sending module is used for, and described first is more than or equal in the normalization remaining load rate of the destination server During the normalization demand load factor of request, first request is sent to the destination server, so that the destination server Process first request.
In a kind of possible implementation method, first determining module specifically for:
According to the type of the described first request, the corresponding load consumption amount of first request is determined;
In the process capability index of each server, minimum treat Capability index is obtained;
According to the described first request corresponding load consumption amount and minimum treat Capability index, described the is determined The normalization demand load factor of one request.
In alternatively possible implementation method, according to the described first corresponding load consumption amount of request and it is described most Small process capability index, determines the normalization demand load factor of first request, including:
The normalization demand load factor L of first request is determined according to equation below one:
Wherein, the C is the corresponding load consumption amount of the described first request, the PminFor the minimum treat ability refers to Number.
In alternatively possible implementation method, second determining module include the first determining unit, acquiring unit and Second determining unit, wherein,
First determining unit is used for, the type of the second request being presently processing according to the server, it is determined that Each described second asks corresponding load consumption amount;
The acquiring unit is used for, and obtains handling capacity, the handling capacity of the distributed system, the clothes of the server The process capability index of business device;
Second determining unit is used for, according to each second request corresponding load consumption amount, the server The process capability index of handling capacity, the handling capacity of the distributed system and the server, determines the normalizing of the server Change remaining load rate.
In alternatively possible implementation method, second determining unit specifically for:
According to equation below two, the normalization remaining load rate M of the server is determined:
Wherein, the i is be presently processing i-th second requests of the server, the k be the server just In the number of the second request for the treatment of, the CiIt is the corresponding load consumption amount of i-th second requests, the P is the service The process capability index of device, the N is the handling capacity of the server, and the G is the handling capacity of the distributed system.
The third aspect, the embodiment of the present invention provides a kind of distributed system, including the load described in any one of second aspect Balancing equipment.
Load-balancing method provided in an embodiment of the present invention, equipment and distributed system, receive in load-balancing device After the first request that client sends, load-balancing device is according to the type of the first request and the disposal ability of each server Index, determines the normalization demand load factor of the first request, the type of the second request being presently processing according to each server, The attribute information of each server and the attribute information of distributed system, determine the normalization remaining load rate of each server, and root According to the normalization remaining load rate of each server, destination server is determined, it is determined that the normalization remaining load of destination server During the normalization demand load factor that rate is asked more than or equal to first, send first to destination server and ask, so that target takes Business device treatment first is asked.In above process, the normalization remaining load rate of server and server are presently processing The attribute information of the second request, the attribute information of server and distributed system is related, therefore, the normalization of server is remaining Load factor can accurately embody server performance and rest processing capacity in a distributed system so that according to normalizing Change remaining load rate and determine that the destination server for obtaining is the service of the current most capable request for the treatment of first in distributed system Device, and then improve the accuracy of load balancing in distributed system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the application scenarios schematic diagram of the load-balancing method that the embodiment of the present invention is supplied;
Fig. 2 is the schematic flow sheet of load-balancing method provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the normalization remaining load rate method of determination server provided in an embodiment of the present invention;
Fig. 4 is the structural representation one of load-balancing device provided in an embodiment of the present invention;
Fig. 5 is the structural representation two of load-balancing device provided in an embodiment of the present invention.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the application scenarios schematic diagram of the load-balancing method that the embodiment of the present invention is supplied.Refer to Fig. 1, including multiple Client (being designated as 101-1 to 101-M respectively) and distributed system 102.Include load-balancing device in distributed system 102 1021 and multiple servers (being designated as 1022-1 to 1022-N respectively).Load-balancing device 1021 is used to receive client transmission Request, and by the corresponding server that requests assignment to of client, load-balancing device 1021 is additionally operable to the reception server transmission Result, and result is fed back into client.
In this application, load-balancing device can be obtained according to the attribute information of each server in distributed system The actual treatment ability of each server is taken, and according to the actual treatment ability of each server, obtains returning for each server One changes remaining load rate, and the normalization remaining load rate can accurately embody the rest processing capacity of server, so that load Balancing equipment can realize accurately load balancing to each server, and then improve the accuracy of load balancing.
Below, by specific embodiment, the technical scheme shown in the application is described in detail.It should be noted that Several embodiments can be combined with each other below, for same or analogous content, no longer be repeated in various embodiments.
Fig. 2 is the schematic flow sheet of load-balancing method provided in an embodiment of the present invention.Refer to Fig. 2, the method can be with Including:
S201, the first request for receiving client transmission.
The executive agent of the method can be the load-balancing device in distributed system.It should be noted that in load When balancing equipment receives the request of client transmission each time, the method shown in Fig. 2 embodiments can be performed, the present invention is real Example is applied by taking the first request that load-balancing device receives client transmission as an example, the technical scheme shown in the application is carried out in detail Describe in detail bright.
The process capability index of S202, the type according to the first request and each server, determines the normalization of the first request Demand load factor.
In embodiments of the present invention, the process capability index of server is related to multiple attributes of server, for example, service The frequency of the disposal ability of device and the central processing unit (Central Processing Unit, CPU) of server, memory size, The correlations such as hard disk size.For example, the process capability index P of server can be determined by equation below three:
Wherein, n is the attribute number related to the process capability index of server, αiIt is the weighted value of ith attribute, mi It is the index of i-th each attribute.
The type of the first request can ask corresponding business related to first, when the corresponding business of the first request is different When, the type of the first request is also different.If for example, first asks for request server processing business 1, the class of the first request Type can be the first kind, if first asks for requested service 2 and business 3, the type of the first request can be Equations of The Second Kind Type.
Optionally, the normalization demand load factor of the first request can be determined by following feasible implementation:According to The type of the first request, determines the corresponding load consumption amount of the first request, in the process capability index of each server, obtains most Small process capability index, and according to the corresponding load consumption amount of the first request and minimum treat Capability index, determine that first please The normalization demand load factor asked.Optionally, the normalization demand load factor of the first request can be determined according to equation below one L:
Wherein, C is the corresponding load consumption amount of the first request, PminIt is minimum treat Capability index.
When the type of the first request is different, the corresponding load consumption amount of the first request is different.First request is corresponding negative Carry consumption refer to server process first ask when, it is necessary to consumption load capacity, first request load consumption amount can lead to Cpu resource, memory source, hard disk resources that the first request is needed to use etc. are crossed to represent.
In actual application, because server is identical to the processing procedure of same type of request, therefore, a species The corresponding load consumption amount of request of type is usually fixed.The request that therefore, it can pre-set each type disappears with load The corresponding relation of consumption, accordingly, when load-balancing device needs to obtain the first corresponding load consumption amount of request, can be with root According to the type and the corresponding relation of the first request, the corresponding load consumption amount of the first request is obtained.For example, all types of requests is right The load consumption amount answered can be as shown in table 1:
Table 1
The type of request Load consumption amount
Class1 Load consumption 1
Type 2 Load consumption 2
Type 3 Load consumption 3
…… ……
S203, according to each server be presently processing second request type, the attribute information of each server and point The attribute information of cloth system, determines the normalization remaining load rate of each server.
Each server currently may process multiple second and ask, and the treatment to each the second request is required to consumption The load of server, accordingly, according to server be presently processing second request type, it may be determined that server by The load of consumption.Attribute information (such as cpu performance, memory size etc.) according to server can determine the total negative of server Carry.Accordingly, the attribute information of the load, the total load of server and distributed system that have been consumed according to server, can be with Determine the normalization remaining load rate of server.
In actual application, load-balancing device can be after the first request be received, it is determined that each server Normalization remaining load rate.Certainly, load-balancing device can also in real time or periodically safeguard the normalization of each server Remaining load rate list, so, after load-balancing device receives the first request, it is thus necessary to determine that the corresponding mesh of the first request During mark server, the normalization that load-balancing device can directly obtain each server in remaining load list is normalized is remaining Load factor, and then improve the efficiency that load-balancing device determines destination server.Optionally, load-balancing device can be in service Device treatment complete request and to the new request of server-assignment after, to normalization remaining load list be updated.
S204, the normalization remaining load rate according to each server, determine destination server.
Optionally, the maximum server of remaining load rate can will be normalized in each server and is defined as destination server.
S205, the normalization need whether remaining load rate asks more than or equal to first that normalize for judging destination server Seek load factor.
If so, then performing S206.
If it is not, then performing S207.
S206, to destination server send first ask so that destination server treatment first ask.
If whether the normalization remaining load rate of destination server loads more than or equal to the normalization demand of the first request Rate, then illustrate that destination server has the ability to process the first request, then load-balancing device sends first and asks to destination server, So that destination server is processed the first request.
S207, to client send error prompting.
If whether the normalization remaining load rate of destination server loads more than or equal to the normalization demand of the first request Rate, then illustrate that destination server has no ability to treatment first and asks, then load-balancing device sends error prompting to client, with Inform that client-server cannot be currently processed the first request.
Load-balancing method provided in an embodiment of the present invention, receive client transmission in load-balancing device first please After asking, load-balancing device determines the first request according to the type of the first request and the process capability index of each server Normalization demand load factor, according to each server be presently processing second request type, the attribute information of each server, And the attribute information of distributed system, determine the normalization remaining load rate of each server, and according to the normalization of each server Remaining load rate, determines destination server, it is determined that the normalization remaining load rate of destination server please more than or equal to first During the normalization demand load factor asked, send first to destination server and ask, so that destination server treatment first is asked. In said process, second that normalization remaining load rate and the server of server are presently processing is asked, the category of server Property information and distributed system attribute information it is related, therefore, the normalization remaining load rate of server can accurately embody Go out server performance and rest processing capacity in a distributed system so that determine to obtain according to normalization remaining load rate Destination server be the server of the current most capable request for the treatment of first in distributed system, and then improve distributed system The accuracy of load balancing in system.
On the basis of embodiment illustrated in fig. 2, load-balancing device determines the normalization remaining load of each server The process of rate is identical, below, the process of the load factor of any one server in distributed system is determined with load-balancing device As a example by, by the embodiment shown in Fig. 3, the process (embodiment illustrated in fig. 2 of the normalization remaining load rate of pair each server of determination In S203) be described in detail.
Fig. 3 is the schematic flow sheet of the normalization remaining load rate method of determination server provided in an embodiment of the present invention. Fig. 3 is referred to, the method can include:
S301, the type of the second request being presently processing according to server, determine the corresponding load of each second request Consumption.
Optionally, load-balancing device can first determine that the multiple second that server is presently processing is asked and each The type of the second request, and the corresponding relation according to the type and table 1 of each the second request, obtain each second request right The load consumption amount answered.
S302, the handling capacity, the handling capacity of distributed system, the process capability index of server that obtain server.
The handling capacity of server refers to the data volume that server can be transmitted in unit time, the handling capacity of distributed system It refer to the data volume that can be transmitted in unit time of Servers-all in distributed system.
The disposal ability of the server in the embodiment of the present invention may be referred to the disposal ability of the server described in S202, No longer repeated herein.
S303, handled up according to each second corresponding load consumption amount of request, the handling capacity of server, distributed system The process capability index of amount and server, determines the normalization remaining load rate of server.
Optionally, the normalization remaining load rate M of server can according to equation below two, be determined:
Wherein, i-th second requests that i is presently processing for server, k is the second request that server is being processed Number, CiIt is the corresponding load consumption amount of i-th second requests, P is the process capability index of server, and N is server Handling capacity, G is the handling capacity of distributed system.
In above-mentioned formula one,The load capacity being consumed in server is represented,Represent the surplus of server Remaining load factor,The shared proportion in the overall performance of distributed system of the performance of server can be represented.By above-mentioned formula The normalization remaining load rate of the server that one determination is obtained and the currently practical remaining load capacity of server and the property of server Proportion shared by overall performance that can be in a distributed system is related, therefore, can accurately determine to obtain by above-mentioned formula one The normalization remaining load rate of server.
Below, by specific example, the technical scheme shown in above method embodiment is described in detail.
Exemplary, it is assumed that load-balancing device and 4 servers are provided with distributed system, 4 servers point Server 1- servers 4 are not designated as.
After the request 1 that load-balancing device receives the transmission of client 1, load-balancing device obtains the class of request 1 The process capability index of the corresponding load consumption amount of type and server 1- servers 4, and it is corresponding negative according to the type of request 1 The process capability index of consumption and server 1- servers 4 is carried, it is determined that the normalization demand load factor of request 1, it is assumed that it is determined that The normalization demand load factor of the request 1 for obtaining is 0.3.
Load-balancing device determines the normalization remaining load rate of server 1- servers 4 always according to formula two, it is assumed that clothes The normalization remaining load rate of business device 1- servers 4 is as shown in table 2:
Table 2
The mark of server Normalization remaining load rate
Server 1 0.2
Server 2 0.4
Server 3 0.25
Server 4 0.15
As shown in Table 2, the normalization remaining load rate highest of server 3, then load-balancing device determine server 3 be mesh Mark server, then load-balancing device sends request 1 to server 3, and is processed by 3 pairs of requests 1 of server.
Fig. 4 is the structural representation one of load-balancing device provided in an embodiment of the present invention.The load-balancing device sets Put in a distributed system, the distributed system also includes multiple servers.Refer to Fig. 4, the load-balancing device bag Receiver module 11, the first determining module 12, the second determining module 13, the 3rd determining module 14 and sending module 15 are included, wherein,
The receiver module 11 is used for, and receives the first request that client sends;
First determining module 12 is used for, the treatment energy of type and each server according to the described first request Power index, determines the normalization demand load factor of first request;
Second determining module 13 is used for, the type of the second request being presently processing according to each server, The attribute information of each server and the attribute information of the distributed system, determine that the normalization of each server is remained Remaining load factor;
3rd determining module 14 is used for, the normalization remaining load rate according to each server, determines that target takes Business device;
The sending module 15 is used for, the destination server normalization remaining load rate more than or equal to described the During the normalization demand load factor of one request, first request is sent to the destination server, so that the destination service Device treatment first request.
Load-balancing device provided in an embodiment of the present invention can perform the technical scheme shown in above method embodiment, its Realization principle and beneficial effect are similar, are no longer repeated herein.
In a kind of possible implementation method, first determining module 12 specifically for:
According to the type of the described first request, the corresponding load consumption amount of first request is determined;
In the process capability index of each server, minimum treat Capability index is obtained;
According to the described first request corresponding load consumption amount and minimum treat Capability index, described the is determined The normalization demand load factor of one request.
Optionally, first determining module 12 specifically can be used for:
The normalization demand load factor L of first request is determined according to equation below one:
Wherein, the C is the corresponding load consumption amount of the described first request, the PminFor the minimum treat ability refers to Number.
Fig. 5 is the structural representation two of load-balancing device provided in an embodiment of the present invention.In the base of embodiment illustrated in fig. 4 On plinth, Fig. 5 is referred to, it is single that second determining module 13 includes that the first determining unit 131, acquiring unit 132 and second determine Unit 133, wherein,
First determining unit 131 is used for, the type of the second request being presently processing according to the server, really Fixed each described second asks corresponding load consumption amount;
The acquiring unit 132 is used for, and obtains handling capacity, the handling capacity of the distributed system, the institute of the server State the process capability index of server;
Second determining unit 133 is used for, and corresponding load consumption amount, the server are asked according to each described second Handling capacity, the handling capacity of the distributed system and the server process capability index, determine returning for the server One changes remaining load rate.
In alternatively possible implementation method, second determining unit 133 specifically for:
According to equation below two, the normalization remaining load rate M of the server is determined:
Wherein, the i is be presently processing i-th second requests of the server, the k be the server just In the number of the second request for the treatment of, the CiIt is the corresponding load consumption amount of i-th second requests, the P is the service The process capability index of device, the N is the handling capacity of the server, and the G is the handling capacity of the distributed system.
Load-balancing device provided in an embodiment of the present invention can perform the technical scheme shown in above method embodiment, its Realization principle and beneficial effect are similar, are no longer repeated herein.
The embodiment of the present invention also provides a kind of distributed system, including the load balancing described in Fig. 4 or Fig. 5 any embodiments Equipment.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey Sequence upon execution, performs the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is only used to illustrate the technical scheme of the embodiment of the present invention, rather than to it Limitation;Although being described in detail to the embodiment of the present invention with reference to foregoing embodiments, one of ordinary skill in the art It should be understood that:It can still modify to the technical scheme described in foregoing embodiments, or to which part or All technical characteristic carries out equivalent;And these modifications or replacement, the essence of appropriate technical solution is departed from this hair The scope of bright embodiment scheme.

Claims (10)

1. a kind of load-balancing method, it is characterised in that be applied to the load-balancing device in distributed system, the distribution System includes the load-balancing device and multiple servers, and methods described includes:
Receive the first request that client sends;
The process capability index of type and each server according to the described first request, determines returning for first request One changes demand load factor;
According to the second type asked, the attribute information of each server and institute that each server is presently processing The attribute information of distributed system is stated, the normalization remaining load rate of each server is determined;
Normalization remaining load rate according to each server, determines destination server;
If the normalization remaining load rate of the destination server is more than or equal to the normalization demand load of the described first request Rate, then send first request to the destination server, so that destination server treatment first request.
2. method according to claim 1, it is characterised in that type and each service according to the described first request The process capability index of device, determines the normalization demand load factor of first request, including:
According to the type of the described first request, the corresponding load consumption amount of first request is determined;
In the process capability index of each server, minimum treat Capability index is obtained;
According to the described first request corresponding load consumption amount and minimum treat Capability index, determine that described first please The normalization demand load factor asked.
3. method according to claim 2, it is characterised in that according to the corresponding load consumption amount of the described first request, with And the minimum treat Capability index, determine the normalization demand load factor of first request, including:
The normalization demand load factor L of first request is determined according to equation below one:
Wherein, the C is the corresponding load consumption amount of the described first request, the PminIt is the minimum treat Capability index.
4. the method according to claim any one of 1-3, it is characterised in that for any one in each server Server, the type of the request being presently processing according to each server, the attribute information of each server and The attribute information of the distributed system, determines the normalization remaining load rate of each server, including:
The type of the second request being presently processing according to the server, determines that the corresponding load of each second request disappears Consumption;
Obtain handling capacity, the handling capacity of the distributed system, the process capability index of the server of the server;
Gulped down according to each second request corresponding load consumption amount, the handling capacity of the server, the distributed system The process capability index of the amount of telling and the server, determines the normalization remaining load rate of the server.
5. method according to claim 4, it is characterised in that according to the corresponding load consumption amount of each second request, The process capability index of the handling capacity of the server, the handling capacity of the distributed system and the server, it is determined that described The normalization remaining load rate of server, including:
According to equation below two, the normalization remaining load rate M of the server is determined:
Wherein, the i is i-th second requests that the server is presently processing, and the k locates for the server The number of the second request of reason, the CiIt is the corresponding load consumption amount of i-th second requests, the P is the server Process capability index, the N is the handling capacity of the server, and the G is the handling capacity of the distributed system.
6. a kind of load-balancing device, it is characterised in that the load-balancing device is set in a distributed system, the distribution Formula system also includes multiple servers, and the load-balancing device includes that receiver module, the first determining module, second determine mould Block, the 3rd determining module and sending module, wherein,
The receiver module is used for, and receives the first request that client sends;
First determining module is used for, the process capability index of type and each server according to the described first request, Determine the normalization demand load factor of first request;
Second determining module is used for, according to each server be presently processing second request type, it is each described in The attribute information of the attribute information of server and the distributed system, determines the normalization remaining load of each server Rate;
3rd determining module is used for, the normalization remaining load rate according to each server, determines destination server;
The sending module is used for, and is asked more than or equal to described first in the normalization remaining load rate of the destination server Normalization demand load factor when, to the destination server send it is described first request so that the destination server process First request.
7. equipment according to claim 6, it is characterised in that first determining module specifically for:
According to the type of the described first request, the corresponding load consumption amount of first request is determined;
In the process capability index of each server, minimum treat Capability index is obtained;
According to the described first request corresponding load consumption amount and minimum treat Capability index, determine that described first please The normalization demand load factor asked.
8. the equipment according to claim 6 or 7, it is characterised in that second determining module include the first determining unit, Acquiring unit and the second determining unit, wherein,
First determining unit is used for, the type of the second request being presently processing according to the server, determines each institute State the corresponding load consumption amount of the second request;
The acquiring unit is used for, and obtains handling capacity, the handling capacity of the distributed system, the server of the server Process capability index;
Second determining unit is used for, and is handled up according to each second request corresponding load consumption amount, the server The process capability index of amount, the handling capacity of the distributed system and the server, determines that the normalization of the server is remained Remaining load factor.
9. equipment according to claim 8, it is characterised in that second determining unit specifically for:
According to equation below two, the normalization remaining load rate M of the server is determined:
Wherein, the i is i-th second requests that the server is presently processing, and the k locates for the server The number of the second request of reason, the CiIt is the corresponding load consumption amount of i-th second requests, the P is the server Process capability index, the N is the handling capacity of the server, and the G is the handling capacity of the distributed system.
10. a kind of distributed system, it is characterised in that including the load-balancing device described in claim any one of 6-9.
CN201710093745.0A 2017-02-21 2017-02-21 Load balancing method, equipment and distributed system Active CN106850822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710093745.0A CN106850822B (en) 2017-02-21 2017-02-21 Load balancing method, equipment and distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710093745.0A CN106850822B (en) 2017-02-21 2017-02-21 Load balancing method, equipment and distributed system

Publications (2)

Publication Number Publication Date
CN106850822A true CN106850822A (en) 2017-06-13
CN106850822B CN106850822B (en) 2020-06-30

Family

ID=59133762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710093745.0A Active CN106850822B (en) 2017-02-21 2017-02-21 Load balancing method, equipment and distributed system

Country Status (1)

Country Link
CN (1) CN106850822B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911438A (en) * 2017-11-06 2018-04-13 出门问问信息科技有限公司 The method, apparatus and system of data processing
CN110278226A (en) * 2018-03-15 2019-09-24 阿里巴巴集团控股有限公司 Load balance process method, apparatus and electronic equipment
CN112202755A (en) * 2020-09-25 2021-01-08 浙江华创视讯科技有限公司 Server distribution method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1835453A (en) * 2005-03-16 2006-09-20 华为技术有限公司 Method of realizing load sharing in distributing system
CN101662506A (en) * 2009-10-14 2010-03-03 中兴通讯股份有限公司 Load balancing method based on CPU kernel sharing and device thereof
EP2547144A4 (en) * 2010-03-09 2013-01-16 Huawei Tech Co Ltd Load sharing method, system and access server
CN103546542A (en) * 2013-09-29 2014-01-29 北京航空航天大学 Server load balancing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1835453A (en) * 2005-03-16 2006-09-20 华为技术有限公司 Method of realizing load sharing in distributing system
CN101662506A (en) * 2009-10-14 2010-03-03 中兴通讯股份有限公司 Load balancing method based on CPU kernel sharing and device thereof
EP2547144A4 (en) * 2010-03-09 2013-01-16 Huawei Tech Co Ltd Load sharing method, system and access server
CN103546542A (en) * 2013-09-29 2014-01-29 北京航空航天大学 Server load balancing method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911438A (en) * 2017-11-06 2018-04-13 出门问问信息科技有限公司 The method, apparatus and system of data processing
CN110278226A (en) * 2018-03-15 2019-09-24 阿里巴巴集团控股有限公司 Load balance process method, apparatus and electronic equipment
CN112202755A (en) * 2020-09-25 2021-01-08 浙江华创视讯科技有限公司 Server distribution method, device, equipment and medium
CN112202755B (en) * 2020-09-25 2022-08-23 浙江华创视讯科技有限公司 Server distribution method, device, equipment and medium

Also Published As

Publication number Publication date
CN106850822B (en) 2020-06-30

Similar Documents

Publication Publication Date Title
US10079879B2 (en) Weighted rendezvous hashing
CN107124472A (en) Load-balancing method and device, computer-readable recording medium
CN104243405B (en) A kind of request processing method, apparatus and system
US11876856B2 (en) Method for computational-power sharing and related device
CN106101232A (en) Load-balancing method and device
CN106325998A (en) Method and device for deploying application based on cloud computing
CN106850822A (en) Load-balancing method, equipment and distributed system
US20170279719A1 (en) Tournament scheduling
CN106952085B (en) Method and device for data storage and service processing
CN106713388A (en) Emergent business processing method and device
CN106998340A (en) A kind of load-balancing method and device of board resource
CN110245014B (en) Data processing method and device
CN104184685B (en) Data center resource distribution method, apparatus and system
CN105517176B (en) The method of dynamic dispatching virtualization base station resource
CN106961490A (en) A kind of resource monitoring method and system, a kind of home server
CN113795032B (en) Method and device for judging invisible faults of indoor division, storage medium and equipment
CN114140033B (en) Service personnel allocation method and device, electronic equipment and storage medium
CN108920278A (en) Resource allocation methods and device
CN109981696A (en) A kind of load-balancing method, device and equipment
CN111967938B (en) Cloud resource recommendation method and device, computer equipment and readable storage medium
Liu et al. On the placement of edge servers in mobile edge computing
CN111448575A (en) System and method for evaluating model performance
CN113553500B (en) Merchant information recommendation method and device, electronic equipment and storage medium
CN110990441A (en) Technician recommendation method and device
CN112905351B (en) GPU and CPU load scheduling method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant