CN108093009A - The load-balancing method and device of a kind of server - Google Patents
The load-balancing method and device of a kind of server Download PDFInfo
- Publication number
- CN108093009A CN108093009A CN201611039236.1A CN201611039236A CN108093009A CN 108093009 A CN108093009 A CN 108093009A CN 201611039236 A CN201611039236 A CN 201611039236A CN 108093009 A CN108093009 A CN 108093009A
- Authority
- CN
- China
- Prior art keywords
- server
- weighted value
- service server
- service
- cpu
- 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
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
-
- 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/1029—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
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 embodiment of the invention discloses the load-balancing methods and device of a kind of server, are related to application software and network communication technology.This method includes:The weighted value of at least two service servers is obtained respectively, wherein, the weighted value is used for the processing capacity for reflecting service server;According to the weighted value, determine corresponding service server for the processing request that client generates, and the processing request is sent to the service server.The load-balancing method and device of a kind of server provided in an embodiment of the present invention, to realize the calculating intensity for reducing interface server, so that interface server will not become the bottleneck of system.
Description
Technical field
The present embodiments relate to application software and network communication technology more particularly to a kind of load balancing sides of server
Method and device.
Background technology
As shown in Figure 1, existing glutinous rice search system, all clients 1 are sent to an interface service by request is handled
Device 2, interface server 2 are calculated using non-standing algorithm, continuation algorithm, polling algorithm, minimum join algorithm or response quickly
Method etc., multiple service servers 3 that processing request is distributed to backstage are handled.
Currently, with the continuous improvement of portfolio, the visit capacity and data traffic of the interface server 2 of network quickly increase
It is long.Therefore, the requirement for calculating intensity is also accordingly increased so that single interface server 2 can not undertake at all, and then become
The bottleneck of system.In the case, it is desirable to not waste existing hardware resource and be extended, it is necessary to it is equal to improve network load
Weighing apparatus.
The content of the invention
The embodiment of the present invention provides a kind of load-balancing method and device of server, and interface server is reduced to realize
Intensity is calculated, so that interface server will not become the bottleneck of system.
In a first aspect, an embodiment of the present invention provides a kind of load-balancing method of server, applied to client, the party
Method includes:
The weighted value of at least two service servers is obtained respectively, wherein, the weighted value is used to reflect service server
Processing capacity;
According to the weighted value, corresponding service server is determined for the processing request that client generates, and by the place
Reason request is sent to the service server.
Further, obtaining the weighted value of at least two service servers respectively includes:
Obtain the weighted value of at least two service servers respectively from interface server.
Further, it is described according to the weighted value, determine corresponding business service for the processing request that client generates
Device includes:
According to the ratio of the weighted value of each service server, establish between random number and the service server of setting quantity
Correspondence;
A random number is selected at random in the random number of setting quantity;
Random number according to selecting determines corresponding service server.
For the embodiment of the present invention by reflecting the weighted value of the processing capacity of service server, the processing generated for client please
Definite corresponding service server is sought, and the processing request is sent to the service server, so as to fulfill by client
Load balance process is directly carried out, without the scheduling of interface server, and then reduces the calculating intensity of interface server so that connect
Mouth server will not become the bottleneck of system.
Second aspect, the embodiment of the present invention additionally provide a kind of load balancing apparatus of server, are configured at client, should
Device includes:
Weighted value acquisition module, for obtaining the weighted value of at least two service servers respectively, wherein, the weighted value
For reflecting the processing capacity of service server;
Server determining module, for according to the weighted value, corresponding industry to be determined for the processing request that client generates
Business server, and the processing request is sent to the service server.
Further, the weighted value acquisition module includes:
Weighted value acquiring unit, for obtaining the weighted value of at least two service servers respectively from interface server.
Further, the server determining module includes:
Relation establishes unit, for according to the ratio of the weighted value of each service server, establishing the random number for setting quantity
Correspondence between service server;
Random number module of selection, for selecting a random number at random in the random number of setting quantity;
Server determination unit, for determining corresponding service server according to the random number selected.
For the embodiment of the present invention by reflecting the weighted value of the processing capacity of service server, the processing generated for client please
Definite corresponding service server is sought, and the processing request is sent to the service server, so as to fulfill by client
Load balance process is directly carried out, without the scheduling of interface server, and then reduces the calculating intensity of interface server so that connect
Mouth server will not become the bottleneck of system.
The third aspect, the embodiment of the present invention additionally provides a kind of load-balancing method of server, applied to interface service
Device, this method include:
Obtain the processing capacity of at least two service servers;
The weighted value of service server is calculated according to the processing capacity of the service server;
By the weighted value of at least two service servers, client is sent to, to indicate the client according to the power
Weight values determine corresponding service server for the processing request that client generates, and the processing request is sent to the business
Server.
Further, the weighted value of service server is calculated according to the processing capacity of the service server to be included:
The weighted value is calculated according to equation below:
Weight [i]=(last_weight_per [i]+(cpu_idle_per [i]-balance_cpu) * cpu check figures
[i]/fading_factor)*inst_num*queue_length
Wherein, weight [i] is this weighted value of i-th of service server, and last_weight_per [i] is i-th
The last time weighted value of service server, cpu_idle_per [i] are the cpu idle state parameters of i-th of service server,
Balance_cpu is the average value of the cpu idle state parameters for all service servers being connected with the interface server,
Cpu check figures [i] are the cpu while concurrent processing number of i-th of service server, and fading_factor is adjusting step value,
Inst_num is the total quantity for all service servers being connected with the interface server, and queue_length is default queue
Length.
The embodiment of the present invention is sent to client by calculating the weighted value of service server, to indicate the client
End determines corresponding service server according to the weighted value for the processing request of client generation, and the processing request is sent out
Give the service server.Load balance process is directly carried out so as to fulfill by client, without the scheduling of interface server,
And then reduce the calculating intensity of interface server so that interface server will not become the bottleneck of system.
Fourth aspect, the embodiment of the present invention also provide a kind of load balancing apparatus of server, are configured at interface server,
The device includes:
Acquisition module, for obtaining the processing capacity of at least two service servers;
Computing module, for calculating the weighted value of service server according to the processing capacity of the service server;
Sending module, for by the weighted value of at least two service servers, client being sent to, to indicate the client
End determines corresponding service server according to the weighted value for the processing request of client generation, and the processing request is sent out
Give the service server.
Further, the computing module includes:
The weighted value is calculated according to equation below:
Weight [i]=(last_weight_per [i]+(cpu_idle_per [i]-balance_cpu) * cpu check figures
[i]/fading_factor)*inst_num*queue_length
Wherein, weight [i] is this weighted value of i-th of service server, and last_weight_per [i] is i-th
The last time weighted value of service server, cpu_idle_per [i] are the cpu idle state parameters of i-th of service server,
Balance_cpu is the average value of the cpu idle state parameters for all service servers being connected with the interface server,
Cpu check figures [i] are the cpu while concurrent processing number of i-th of service server, and fading_factor is adjusting step value,
Inst_num is the total quantity for all service servers being connected with the interface server, and queue_length is default queue
Length.
The embodiment of the present invention is sent to client by calculating the weighted value of service server, to indicate the client
End determines corresponding service server according to the weighted value for the processing request of client generation, and the processing request is sent out
Give the service server.Load balance process is directly carried out so as to fulfill by client, without the scheduling of interface server,
And then reduce the calculating intensity of interface server so that interface server will not become the bottleneck of system.
Description of the drawings
Fig. 1 is the flow chart of the load-balancing method of server in the prior art;
Fig. 2 is a kind of flow chart of the load-balancing method for server that the embodiment of the present invention one provides;
Fig. 3 is a kind of structure diagram of the load balancing apparatus of server provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of flow chart of the load-balancing method for server that the embodiment of the present invention three provides;
Fig. 5 is the flow chart of the load-balancing method for another server that the embodiment of the present invention three provides;
Fig. 6 is a kind of structure diagram of the load balancing apparatus for server that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limitation of the invention.It also should be noted that in order to just
Part related to the present invention rather than entire infrastructure are illustrated only in description, attached drawing.
Embodiment one
Fig. 2 is a kind of flow chart of the load-balancing method for server that the embodiment of the present invention one provides.The present embodiment can
The corresponding increased situation for calculating intensity requirement can not be undertaken suitable for single interface server, this method can be by a kind of clothes
The load balancing apparatus of business device performs, which can be only fitted to client, and be realized by the mode of software and/or hardware.Ginseng
See Fig. 2, the load-balancing method of the server provided by the embodiment applied to client includes:
S110, the weighted value for obtaining at least two service servers respectively.
Wherein, the weighted value is used for the processing capacity for reflecting service server.It is understood that service server
Processing capacity is stronger, and the weighted value of the service server is bigger.Specifically, at least two can be obtained respectively according to predetermined period
The weighted value of service server can also generate in client and handle the power for obtaining at least two service servers during request respectively
Weight values can also be respectively obtained when the weighted value for detecting service server varies widely comprising the business service
The weighted value of at least two service servers of device.
Optionally, weighted value can be by client by reflecting that the parameter of service server processing capacity directly calculates
It arrives, can also be calculated by interface server, and be supplied to each client.For the calculating of balance clients and interface server
Intensity, obtaining the weighted value of at least two service servers respectively can include:At least two are obtained respectively from interface server
The weighted value of service server.
Specifically, the parameter of above-mentioned reflection service server processing capacity can include:The CPU free time shapes of service server
State parameter, CPU simultaneously concurrent processing number, cpu frequency, memory usage, network bandwidth occupancy, memory size, hard-disk capacity,
At least one of last time weighted value and the total quantity of all service servers that is connected with the interface server.
S120, according to the weighted value, determine corresponding service server for the processing request that client generates, and by institute
It states processing request and is sent to the service server.
Optionally, the definite of service server can produce according to the size of all service server weighted values for client
Raw processing request determines the service server of weighted value maximum, to realize load balancing;Can also according to the ratio of weighted value,
Corresponding service server is determined for the processing request that client generates.
Specifically, according to the ratio of weighted value, determine that corresponding service server can for the processing request that client generates
To include:
According to the ratio of the weighted value of each service server, establish between random number and the service server of setting quantity
Correspondence;
A random number is selected at random in the random number of setting quantity;
Random number according to selecting determines corresponding service server.
Wherein, the setting quantity of random number can appoint according to the ratio-dependent of the weighted value of each service server, random number
Meaning selection.
For example, interface server connection is there are three service server, it is the first service server, the second business service respectively
Device and the 3rd service server.The ratio of the weighted value of three service servers is 1 respectively:1:8.According to the ratio of the weighted value
Example, the setting quantity of random number can be 10, and random number can be 1 to 10.Then, by 1 and first service server of random number
Correspondence is established, 2 and second service server of random number is established into correspondence, random number 3 to 10 and the 3rd business are taken
Business device establishes correspondence.If the random number selected is 1, using the first service server as corresponding service server.If
The random number selected is 2, then using the second service server as corresponding service server.If the random number selected is 3 to 10
In any number, then using the 3rd service server as corresponding service server.
It is understood that by the ratio of the weighted value according to each service server, the random number for setting quantity is established
Correspondence between service server can reach such a effect:The bigger service server of weighted value it is corresponding with
The number of machine number is more, be selected by random number be used as corresponding service server probability it is also bigger, so as to realize
The portfolio effect of load.
The technical solution of the embodiment of the present invention, the weighted value of the processing capacity by reflecting service server are client
The processing request of generation determines corresponding service server, and the processing request is sent to the service server, so as to
It realizes and load balance process is directly carried out by client, without the scheduling of interface server, and then reduce the meter of interface server
Calculate intensity so that interface server will not become the bottleneck of system.
Embodiment two
Fig. 3 is a kind of structure diagram of the load balancing apparatus of server provided by Embodiment 2 of the present invention.This implementation
Example is a kind of load balancing apparatus of the server proposed on the basis of above-described embodiment, which can be configured at client
End.Referring to Fig. 3, the load balancing apparatus 4 of server provided in this embodiment includes:Weighted value acquisition module 10 and server are true
Cover half block 20.
Wherein, weighted value acquisition module 10, for obtaining the weighted value of at least two service servers respectively, wherein, institute
Weighted value is stated for reflecting the processing capacity of service server;Server determining module 20, for being visitor according to the weighted value
The processing request that family end generates determines corresponding service server, and the processing request is sent to the service server.
The technical solution of the embodiment of the present invention, the weighted value of the processing capacity by reflecting service server are client
The processing request of generation determines corresponding service server, and the processing request is sent to the service server, so as to
It realizes and load balance process is directly carried out by client, without the scheduling of interface server, and then reduce the meter of interface server
Calculate intensity so that interface server will not become the bottleneck of system.
Further, the weighted value acquisition module 10 can include:Weighted value acquiring unit.
Wherein, weighted value acquiring unit is used to obtain the weight of at least two service servers respectively from interface server
Value.
Further, the server determining module 20 can include:Relation establishes unit, random number module of selection kimonos
Business device determination unit.
Wherein, relation establishes unit, for according to the ratio of the weighted value of each service server, establish setting quantity with
Correspondence between machine number and service server;Random number module of selection, for being chosen at random in the random number of setting quantity
Select a random number;Server determination unit, for determining corresponding service server according to the random number selected.
Embodiment three
Fig. 4 is a kind of flow chart of the load-balancing method for server that the embodiment of the present invention three provides.The present embodiment is
A kind of load-balancing method applied to interface server proposed on the basis of above-described embodiment.This method can be by one kind
The load balancing apparatus of server performs, which can be only fitted in interface server, and by the mode of software and/or hardware
It realizes.Referring to Fig. 4, the load-balancing method of server provided by the embodiment includes:
S210, the processing capacity for obtaining at least two service servers.
Wherein, the processing capacity of service server is determined by the parameter of reflection service server processing capacity.Optionally, may be used
To obtain the processing capacity of at least two service servers according to predetermined period, the processing of client generation can also received
The processing capacity of at least two service servers is obtained during request, can also be sent out in the processing capacity for detecting service server
During raw large change, the processing capacity of at least two service servers is obtained.
Specifically, the processing energy of server can be obtained by obtaining the parameter of reflection service server processing capacity
Power.Wherein, reflect that the parameter of service server processing capacity can include:The CPU idle states parameter of service server, CPU
Concurrent processing number, cpu frequency, memory usage, network bandwidth occupancy, memory size, hard-disk capacity, last time weighted value simultaneously
And at least one of total quantity of all service servers being connected with the interface server.
S220, the weighted value that service server is calculated according to the processing capacity of the service server.
Optionally, can service server be calculated according to any one of parameter of reflection service server processing capacity
Weighted value.For example, using the CPU idle states parameter of service server as the weighted value of service server.It can also be according to anti-
Reflect arbitrary a variety of weighted values for calculating service server in the parameter of service server processing capacity.For example, by business service
The CPU while concurrent processing number and weighted value of the product of corresponding CPU idle states parameter as service server of device.
To reduce the resource consumption that computes repeatedly, the last time weighted value based on service server and with reference to existing load with
The difference of weighing apparatus load calculates weighted value, and wherein the calculation formula of weighted value can represent as follows:
Weight [i]=(last_weight_per [i]+(cpu_idle_per [i]-balance_cpu) * cpu check figures
[i]/fading_factor)*inst_num*queue_length
Wherein, weight [i] is this weighted value of i-th of service server;Last_weight_per [i] is i-th
The last time weighted value of service server;Cpu_idle_per [i] is the cpu idle state parameters of i-th of service server;
Balance_cpu is the average value of the cpu idle state parameters for all service servers being connected with the interface server;
Cpu check figures [i] for i-th service server cpu concurrent processing numbers simultaneously, can parallel processing simultaneously task quantity;
Fading_factor is adjusting step value, for smoothly restraining, prevents from fluctuating excessive;Inst_num be and the interface service
The total quantity of all service servers of device connection;Queue_length is default queue length.Default queue length can root
The processing number of requests generated according to all clients in historical experience within the unit interval determines, and is set with above-mentioned random number
Fixed number amount is the relation increased in proportion.If default queue length is excessive, then the processing that client generates in the unit interval is asked
Quantity is much smaller than default queue length, so as to which part random number can be caused to be not used, so that load balancing effect becomes
Difference;If default queue length is too small, the processing number of requests that client generates in the unit interval is much larger than default queue length,
So as to because final weighted value is integer the value finally calculated be caused to lose precision, and then load balancing may be influenced
Effect.It can be seen that if default queue length is more close with the processing number of requests that client generates within the unit interval, bear
It is higher to carry balanced effect.S230, the weighted value by least two service servers, are sent to client, to indicate the visitor
Family end determines corresponding service server according to the weighted value for the processing request that client generates, and the processing is asked
It is sent to the service server.
Fig. 5 is the flow chart of the load-balancing method for another server that the embodiment of the present invention three provides.Referring to Fig. 5,
In practical applications, the load information of interface server timing acquisition reflection service server processing capacity and machine resources letter
Breath, and corresponding weighted value is calculated based on above-mentioned load information and machine resources information;Client is periodically from interface server
Middle synchronous service server list and corresponding weighted value, and flow is matched according to corresponding weighted value, it is negative to realize
It carries balanced.
Meanwhile by the load balancing of the load-balancing method of above-mentioned server provided in this embodiment and existing server
Knowable to method is compared:The load-balancing method of existing server is to generate processing request by client, and is sent to and connects
The processing received is requested assignment to each service server according to load balancing, thus may be used by mouth server, interface server
The shortcomings that load-balancing method for seeing existing server is:Increase network consumption, have strong dependence for load balancing service;This
The load-balancing method for the server that embodiment provides extracts interface server among client and service server,
For determining the strategy of processing request distribution, and handling that requesting assignment to the task of each service server gives at client
Reason to reduce the dependence to interface server, and then preferably supports more shifty upgrading.
The technical solution of the embodiment of the present invention by calculating the weighted value of service server, and is sent to client, to refer to
Show that the client determines corresponding service server according to the weighted value for the processing request that client generates, and by described in
Processing request is sent to the service server.Load balance process is directly carried out so as to fulfill by client, is taken without interface
The scheduling of business device, and then reduce the calculating intensity of interface server so that interface server will not become the bottleneck of system.
Example IV
Fig. 6 is a kind of structure diagram of the load balancing apparatus for server that the embodiment of the present invention four provides.This implementation
Example is a kind of load balancing apparatus of the server proposed on the basis of above-described embodiment three, which can be configured at interface
Server.Referring to Fig. 6, the load balancing apparatus 5 of server provided in this embodiment includes:Acquisition module 30, computing module 40
With sending module 50.
Wherein, acquisition module 30, for obtaining the processing capacity of at least two service servers;Computing module 40, is used for
The weighted value of service server is calculated according to the processing capacity of the service server;Sending module 50, for by least two
The weighted value of service server, is sent to client, is generated as client according to the weighted value using to indicate the client
Processing request determines corresponding service server, and the processing request is sent to the service server.
Further, the computing module 40 includes:
The weighted value is calculated according to equation below:
Weight [i]=(last_weight_per [i]+(cpu_idle_per [i]-balance_cpu) * cpu check figures
[i]/fading_factor)*inst_num*queue_length
Wherein, weight [i] is this weighted value of i-th of service server, and last_weight_per [i] is i-th
The last time weighted value of service server, cpu_idle_per [i] are the cpu idle state parameters of i-th of service server,
Balance_cpu is the average value of the cpu idle state parameters for all service servers being connected with the interface server,
Cpu check figures [i] are the cpu while concurrent processing number of i-th of service server, and fading_factor is adjusting step value,
Inst_num is the total quantity for all service servers being connected with the interface server, and queue_length is default queue
Length.
The technical solution of the embodiment of the present invention by calculating the weighted value of service server, and is sent to client, to refer to
Show that the client determines corresponding service server according to the weighted value for the processing request that client generates, and by described in
Processing request is sent to the service server.Load balance process is directly carried out so as to fulfill by client, is taken without interface
The scheduling of business device, and then reduce the calculating intensity of interface server so that interface server will not become the bottleneck of system.
The said goods can perform the method that any embodiment of the present invention is provided, and possess the corresponding function module of execution method
And advantageous effect.
Note that it above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various apparent variations,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
It can include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.
Claims (10)
1. a kind of load-balancing method of server, applied to client, which is characterized in that including:
The weighted value of at least two service servers is obtained respectively, wherein, the weighted value is used for the place for reflecting service server
Reason ability;
According to the weighted value, corresponding service server is determined for the processing request that client generates, and please by the processing
It asks and is sent to the service server.
2. according to the method described in claim 1, it is characterized in that, the weighted value bag of at least two service servers is obtained respectively
It includes:
Obtain the weighted value of at least two service servers respectively from interface server.
3. method according to claim 1 or 2, which is characterized in that it is described according to the weighted value, it is generated for client
Processing request determines that corresponding service server includes:
According to the ratio of the weighted value of each service server, establish corresponding between the random number of setting quantity and service server
Relation;
A random number is selected at random in the random number of setting quantity;
Random number according to selecting determines corresponding service server.
4. a kind of load balancing apparatus of server, is configured at client, which is characterized in that including:
Weighted value acquisition module, for obtaining the weighted value of at least two service servers respectively, wherein, the weighted value is used for
Reflect the processing capacity of service server;
Server determining module, for according to the weighted value, corresponding business clothes to be determined for the processing request that client generates
Business device, and the processing request is sent to the service server.
5. device according to claim 4, which is characterized in that the weighted value acquisition module includes:
Weighted value acquiring unit, for obtaining the weighted value of at least two service servers respectively from interface server.
6. device according to claim 4 or 5, which is characterized in that the server determining module includes:
Relation establishes unit, for according to the ratio of the weighted value of each service server, establishing the random number and industry for setting quantity
Correspondence between business server;
Random number module of selection, for selecting a random number at random in the random number of setting quantity;
Server determination unit, for determining corresponding service server according to the random number selected.
7. a kind of load-balancing method of server, applied to interface server, which is characterized in that including:
Obtain the processing capacity of at least two service servers;
The weighted value of service server is calculated according to the processing capacity of the service server;
By the weighted value of at least two service servers, client is sent to, to indicate the client according to the weighted value
Corresponding service server is determined for the processing request that client generates, and the processing request is sent to the business service
Device.
8. the method according to the description of claim 7 is characterized in that business is calculated according to the processing capacity of the service server
The weighted value of server includes:
The weighted value is calculated according to equation below:
Weight [i]=(last_weight_per [i]+(cpu_idle_per [i]-balance_cpu) * cpu check figures [i]/
fading_factor)*inst_num*queue_length
Wherein, weight [i] is this weighted value of i-th of service server, and last_weight_per [i] is i-th of business
The last time weighted value of server, cpu_idle_per [i] are the cpu idle state parameters of i-th service server, balance_
Cpu is the average value for the cpu idle state parameters of all service servers being connected with the interface server, cpu check figures [i]
For i-th of service server cpu simultaneously concurrent processing number, fading_factor be adjusting step value, inst_num for institute
The total quantity of all service servers of interface server connection is stated, queue_length is default queue length.
9. a kind of load balancing apparatus of server, is configured at interface server, which is characterized in that including:
Acquisition module, for obtaining the processing capacity of at least two service servers;
Computing module, for calculating the weighted value of service server according to the processing capacity of the service server;
Sending module, for by the weighted value of at least two service servers, client being sent to, to indicate the client root
Corresponding service server is determined for the processing request that client generates, and the processing request is sent to according to the weighted value
The service server.
10. device according to claim 9, which is characterized in that the computing module includes:
The weighted value is calculated according to equation below:
Weight [i]=(last_weight_per [i]+(cpu_idle_per [i]-balance_cpu) * cpu check figures [i]/
fading_factor)*inst_num*queue_length
Wherein, weight [i] is this weighted value of i-th of service server, and last_weight_per [i] is i-th of business
The last time weighted value of server, cpu_idle_per [i] are the cpu idle state parameters of i-th service server, balance_
Cpu is the average value for the cpu idle state parameters of all service servers being connected with the interface server, cpu check figures [i]
For i-th of service server cpu simultaneously concurrent processing number, fading_factor be adjusting step value, inst_num for institute
The total quantity of all service servers of interface server connection is stated, queue_length is default queue length.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611039236.1A CN108093009A (en) | 2016-11-21 | 2016-11-21 | The load-balancing method and device of a kind of server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611039236.1A CN108093009A (en) | 2016-11-21 | 2016-11-21 | The load-balancing method and device of a kind of server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108093009A true CN108093009A (en) | 2018-05-29 |
Family
ID=62170778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611039236.1A Pending CN108093009A (en) | 2016-11-21 | 2016-11-21 | The load-balancing method and device of a kind of server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108093009A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108933822A (en) * | 2018-06-28 | 2018-12-04 | 北京百度网讯科技有限公司 | Method and apparatus for handling information |
CN112199043A (en) * | 2020-09-30 | 2021-01-08 | 深圳壹账通智能科技有限公司 | Server selection method and device, electronic equipment and storage medium |
CN112468573A (en) * | 2020-11-24 | 2021-03-09 | 新天科技股份有限公司 | Data pushing method, device, equipment and storage medium |
CN112866496A (en) * | 2021-03-18 | 2021-05-28 | 浙江百应科技有限公司 | Outbound line routing method and device based on concurrency control and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101753444A (en) * | 2009-12-31 | 2010-06-23 | 卓望数码技术(深圳)有限公司 | Method and device for load balancing |
CN101860493A (en) * | 2009-04-08 | 2010-10-13 | 华为软件技术有限公司 | Method, server and system for distributing application server address for clients |
CN102541655A (en) * | 2010-12-31 | 2012-07-04 | 中国银联股份有限公司 | Method and device for implementing dynamic load balancing |
CN103442030A (en) * | 2013-07-31 | 2013-12-11 | 北京京东尚科信息技术有限公司 | Method and system for sending and processing service request messages and client-side device |
EP2930618A2 (en) * | 2014-04-11 | 2015-10-14 | Maxeler Technologies Ltd. | System and method for load balancing compute resources |
-
2016
- 2016-11-21 CN CN201611039236.1A patent/CN108093009A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101860493A (en) * | 2009-04-08 | 2010-10-13 | 华为软件技术有限公司 | Method, server and system for distributing application server address for clients |
CN101753444A (en) * | 2009-12-31 | 2010-06-23 | 卓望数码技术(深圳)有限公司 | Method and device for load balancing |
CN102541655A (en) * | 2010-12-31 | 2012-07-04 | 中国银联股份有限公司 | Method and device for implementing dynamic load balancing |
CN103442030A (en) * | 2013-07-31 | 2013-12-11 | 北京京东尚科信息技术有限公司 | Method and system for sending and processing service request messages and client-side device |
EP2930618A2 (en) * | 2014-04-11 | 2015-10-14 | Maxeler Technologies Ltd. | System and method for load balancing compute resources |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108933822A (en) * | 2018-06-28 | 2018-12-04 | 北京百度网讯科技有限公司 | Method and apparatus for handling information |
CN108933822B (en) * | 2018-06-28 | 2019-10-18 | 北京百度网讯科技有限公司 | Method and apparatus for handling information |
CN112199043A (en) * | 2020-09-30 | 2021-01-08 | 深圳壹账通智能科技有限公司 | Server selection method and device, electronic equipment and storage medium |
CN112468573A (en) * | 2020-11-24 | 2021-03-09 | 新天科技股份有限公司 | Data pushing method, device, equipment and storage medium |
CN112468573B (en) * | 2020-11-24 | 2023-05-23 | 新天科技股份有限公司 | Data pushing method, device, equipment and storage medium based on distributed deployment |
CN112866496A (en) * | 2021-03-18 | 2021-05-28 | 浙江百应科技有限公司 | Outbound line routing method and device based on concurrency control and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108093009A (en) | The load-balancing method and device of a kind of server | |
CN103391299B (en) | Load-balancing method and SiteServer LBS | |
CN107426332B (en) | A kind of load-balancing method and system of web server cluster | |
CN105279027B (en) | A kind of virtual machine deployment method and device | |
CN108667878A (en) | Server load balancing method and device, storage medium, electronic equipment | |
CN102394931B (en) | Cloud-based user visit request scheduling method | |
CN107295048A (en) | Load-balancing method and device | |
CN109104500A (en) | A kind of server load balancing method and device of dynamic adjustment | |
CA2532677C (en) | Communications system providing server load balancing based upon weighted health metrics and related methods | |
CN106385468A (en) | Method for balancing predictable dynamic load of Web clusters | |
CN104901898A (en) | Load balancing method and device | |
CN108551489A (en) | A kind of application server load balancing method, system, device and storage medium | |
US20110153828A1 (en) | Load balancing apparatus and method for regulating load using the same | |
CN105007336B (en) | The load-balancing method and its system of server | |
CN106716937A (en) | A path calculating and access request distributing method, device and system | |
CN106230992B (en) | A kind of load-balancing method and load balancing node | |
CN104811467A (en) | Comprehensive effect data handling method | |
CN109995818A (en) | A kind of method and device of server load balancing | |
CN108111567A (en) | Realize the uniform method and system of server load | |
CN104811466A (en) | Cloud media resource distribution method and device | |
CN105872082A (en) | Fine-grained resource response system based on load balancing algorithm of container cluster | |
CN111124439B (en) | Intelligent dynamic unloading algorithm with cloud edge cooperation | |
CN112561301A (en) | Work order distribution method, device, equipment and computer readable medium | |
CN109600402A (en) | Server load balancing method and device, storage medium, server, service system | |
CN110311810A (en) | A kind of server resource allocation method, device, electronic equipment and 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180529 |