CN106936925A - Load-balancing method and system - Google Patents
Load-balancing method and system Download PDFInfo
- Publication number
- CN106936925A CN106936925A CN201710249953.5A CN201710249953A CN106936925A CN 106936925 A CN106936925 A CN 106936925A CN 201710249953 A CN201710249953 A CN 201710249953A CN 106936925 A CN106936925 A CN 106936925A
- Authority
- CN
- China
- Prior art keywords
- server
- task
- response time
- available
- allocated
- 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
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a kind of load-balancing method, methods described includes:When the task requests of task to be allocated are received, the task type of the task to be allocated is obtained;After the task type is obtained, available server is selected from server list;Obtain request response time of the task with the task type in each described available server;Obtain the quantity of the current task with the task type for performing in each described available server;The quantity of request response time and the current task with the task type for performing according to the task with the task type in each described available server, server to be allocated is chosen in all available servers;The task to be allocated is assigned into the server to be allocated to go to perform.Load-balancing method of the invention improves the request answer speed of network system, improves load balancing effect, while present invention also offers a kind of SiteServer LBS.
Description
Technical field
The present invention relates to computer cluster technology field, more particularly to load-balancing method and system.
Background technology
Cluster is made up of multiple servers or processing unit, belongs to the server or processing unit of same cluster generally by uniting
One system administration, is got up by net connection, and carries out same service.Load-balancing technique is the crucial skill of Clustering
One of art, request can be shared execution on multiple processing units, each processing unit be made full use of, so that lifting system is whole by it
Body disposal ability.The load-balancing method that current industry is generally used includes poll, WRR, IP load balancing, minimum even
Connect the methods such as number.
However, using existing load-balancing method, in the case of visit capacity increase, complex requests are increased, network system
System still suffers from the problem that component requests task cannot be responded for a long time.
The content of the invention
The present invention proposes a kind of load-balancing method and system, can lift the request answer speed of network system, improves net
The flexibility of network system and availability.
One aspect of the present invention provides a kind of load-balancing method, and methods described includes:
When the task requests of task to be allocated are received, the task type of the task to be allocated is obtained;
After the task type is obtained, available server is selected from server list;
Obtain request response time of the task with the task type in each described available server;
Obtain the quantity of the current task with the task type for performing in each described available server;
Request response time according to the task with the task type in each described available server and work as
The quantity of the task with the task type of preceding execution, server to be allocated is chosen in all available servers;
The task to be allocated is assigned into the server to be allocated to go to perform.
As it is highly preferred that described obtain the asking in each described available server of the task with the task type
The response time is asked, including:
Request of the task with the task type in each described available server is obtained from local data base to ring
Between seasonable;Wherein, the task of different task type is stored in the local data base in each described available server
Request response time;
For available server each described, judge the task with the task type in each available server
On request response time life span in the local database whether exceed default duration threshold value;
When more than the duration threshold value, send instruction to reacquire with described to the corresponding available server
Request response time of the task of task type in the corresponding available server is simultaneously updated in the local data base.
In an implementation method of methods described, it is described according in each described available server with described
The corresponding request response time of service type and the currently task corresponding with the task type of execution
Quantity, chooses server to be allocated in all available servers, including:
Calculation server response time threshold value is with the task with the task type in each described available server
Request response time difference, and in the available server choose with the difference more than 0 normal server;
Calculate in each described normal server the quantity of the current task with the task type for performing with it is corresponding
The difference ratio, and the server to be allocated of the ratio for having minimum is chosen in the normal server.
It is described to select available server from server list in an implementation method of methods described, including:
Line justification bag is sent in the server in the server list;
Judge whether that receiving the server is receiving the feedback message sent after line justification bag;
When the feedback message is received, judge that the server is available server;
When the feedback message is not received, judge that the server is unavailable server.
In an implementation method of methods described, methods described also includes:
When selecting available server from server list, if the server list does not have available server, return
Return error message.
Another aspect of the present invention additionally provides a kind of SiteServer LBS, and the system includes:
Task type module is obtained, for when the task requests of task to be allocated are received, obtaining described to be allocated
The task type of business;
Selection available server module, for after the task type is obtained, selection can to use clothes from server list
Business device;
Response time module is obtained, for obtaining the task with the task type in each available server
Request response time;
Obtain connection quantity module, for obtain in each described available server it is current perform with the task class
The quantity of the task of type;
Server module to be allocated is chosen, there is the task of the task type in each available service for basis
The quantity of request response time and the current task with the task type for performing on device, all described with clothes
Server to be allocated is chosen in business device;
Distribution task module, goes to perform for the task to be allocated to be assigned into the server to be allocated.
As it is highly preferred that the acquisition response time module includes:
First acquisition unit, can use for obtaining the task with the task type from local data base described in each
Request response time on server;Wherein, the task of different task type is stored in the local data base in each institute
State the request response time in available server;
Life span judging unit, for for available server each described, judging appointing with the task type
It is default whether the request response time being engaged in each described available server life span in the local database exceedes
Duration threshold value;
Response time updating block, for when more than the duration threshold value, being sent to the corresponding available server
Instruct to reacquire request response time of the task with the task type in the corresponding available server simultaneously
In updating the local data base.
In an implementation method of the system, the selection server module to be allocated includes:
First chooses unit, for calculation server response time threshold value with the task with the task type at each
The difference of the request response time in the available server, and being chosen in the available server, there is the difference to be more than
0 normal server;
Second choose unit, for calculate in each described normal server it is current perform with the task type
The ratio of the quantity of task and the corresponding difference, and chosen in the normal server there is the minimum ratio
Server to be allocated.
In an implementation method of the system, the selection available server module includes:
Inquiry unit, for being sent in line justification bag to the server in the server list;
Feedback judging unit, for judging whether that receiving the server is receiving the anti-of the transmission after line justification bag
Feedback message;
First identifying unit, for when the feedback message is received, judging that the server is available server;
Second identifying unit, for when the feedback message is not received, judging that the server is unavailable service
Device.
In an implementation method of the system, the system also includes:
Error message module, during for selecting available server from server list, if the server list does not have
Available server, then return to error message.
Relative to prior art, the present invention has following prominent beneficial effect:The invention provides a kind of load balancing
Method and system, wherein load-balancing method include:When the task requests of task to be allocated are received, obtain described to be allocated
The task type of task;After the task type is obtained, available server is selected from server list;Obtain described in having
Request response time of the task of task type in each described available server;Each described available server is obtained to be taken in
The quantity of the task with the task type of preceding execution;Can be used according to the task with the task type at each
The quantity of request response time on server and the current task with the task type for performing, it is all it is described can
With choosing server to be allocated in server;The task to be allocated is assigned into the server to be allocated to go to perform.This hair
The load-balancing method and system of bright offer, by take into full account in the task of distribution request response time, it is current perform appoint
Business quantity and task type choose server to be allocated, improve the accuracy of the selection of server to be allocated, it is therefore prevented that
The situation that component requests task cannot be responded for a long time in the case of big visit capacity, complex requests, improves network system
Request answer speed, improves load balancing effect.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the first embodiment of the load-balancing method that the present invention is provided;
Fig. 2 is the structural representation of the first embodiment of the SiteServer LBS that the present invention is provided.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
It is the schematic flow sheet of the first embodiment of the load-balancing method that the present invention is provided, methods described bag referring to Fig. 1
Include:
S101, when the task requests of task to be allocated are received, obtains the task type of the task to be allocated;
S102, after the task type is obtained, selects available server from server list;
S103, obtains request response time of the task with the task type in each described available server;
S104, obtains the quantity of the current task with the task type for performing in each described available server;
S105, according to request response time of the task with the task type in each described available server with
And the quantity of the current task with the task type for performing, choose service to be allocated in all available servers
Device;
S106, is assigned to the task to be allocated the server to be allocated and goes to perform.
It should be noted that the task type include but is not limited to CPU intensive type, I/O intensive type, memory-intensive,
GPU intensities, database write type, database read type, session relationship type and session independent type.
I.e. by take into full account in the task of distribution request response time, the current task quantity for performing and task type come
Server to be allocated is chosen, improve the accuracy of the selection of server to be allocated, it is therefore prevented that in big visit capacity, complex requests
In the case of component requests task situation about cannot respond for a long time, improve the request answer speed of network system, improve
Load balancing effect.
As it is highly preferred that described obtain the asking in each described available server of the task with the task type
The response time is asked, including:
Request of the task with the task type in each described available server is obtained from local data base to ring
Between seasonable;Wherein, the task of different task type is stored in the local data base in each described available server
Request response time;
For available server each described, judge the task with the task type in each available server
On request response time life span in the local database whether exceed default duration threshold value;
When more than the duration threshold value, send instruction to reacquire with described to the corresponding available server
Request response time of the task of task type in the corresponding available server is simultaneously updated in the local data base.
I.e. by storage of the local data base to request response time, it is easy to system in the life span of request response time
Request response time is obtained from local data base according to demand during not less than the duration threshold value, and without directly being used to described
Server sends the commands to obtain request response time, so as to improve the processing speed of system, and reduces and described can use clothes
Business device to the number of processes of the instruction, so as to alleviate the pressure of the available server;By judging request response time
Whether life span in the local database exceedes default duration threshold value please to decide whether to update in the local database
The response time is asked, so as to obtain real-time request response time, server state is dynamically considered, further increased to be allocated
The accuracy of the selection of server.
Present invention also offers a kind of second embodiment of load-balancing method, methods described includes above-mentioned load balancing side
Step S101~S106 in the first embodiment of method, further defined it is described according in each described available server with
The quantity of the corresponding request response time of task type and the current task corresponding with the task type for performing,
Server to be allocated is chosen in all available servers, including:
Calculation server response time threshold value is with the task with the task type in each described available server
Request response time difference, and in the available server choose with the difference more than 0 normal server;
Calculate in each described normal server the quantity of the current task with the task type for performing with it is corresponding
The difference ratio, and the server to be allocated of the ratio for having minimum is chosen in the normal server.
In the present embodiment, server response time threshold value is preset value;Task with the task type is in difference
Request response time in available server is likely less than server response time threshold value, is likely larger than server response time threshold
Value, it is also possible to equal to server response time threshold value, if the request response time of the available server is more than or equal to service
Device response time threshold value, then less than or equal to 0, now, the available server is in abnormality to the difference.
For example, the task type is divided into m classes, if the normal server chosen in the available server
Sum is n, then the set of the normal server is represented with Si ∈ { S1, S2 ..., Sn }.If the task described to be allocated for obtaining
Task type be the jth class in m kind task types, then represent that request of the jth generic task on server S i rings with Tj (Si)
Between seasonable, server response time threshold value is MaxTime, and the jth generic task that server S i is currently performed is represented with Lj (Si)
Quantity, the quantity and the corresponding difference of the current task with the task type for performing in the normal server
The ratio of MaxTime-Tj (Si) isWherein, Tj (Si)<MaxTime;In the normal server
The server to be allocated of the ratio for having minimum is chosen, that is, is chosen and is with ratio's
Server to be allocated.
For the ratioLj (Si) is smaller, and MaxTime-Tj (Si) is bigger, then ratio is smaller.
Lj (Si) is smaller, and the quantity of the current task with the task type for performing is fewer in the normal server, illustrates just
The idle degrees of normal server Si are higher;Difference MaxTime-Tj (Si) is bigger, then Tj (Si) is smaller, and jth generic task is normal
Request response time on server S i is fewer, illustrates that response speed of the jth generic task on normal server Si is faster;Cause
This, by the server to be allocated for choosing the ratio for having minimum so that the server to be allocated meets service simultaneously
The idle degrees of device are high and the characteristics of jth generic task fast response time on the server, so as to improve service to be allocated
The accuracy of the selection of device.
Normal server is chosen according to request response time in the task of distribution, request response time is exceeded into service
The server of device response time threshold value is excluded in selection range, so as to avoid have chosen the server in abnormality;It is logical
Cross the quantity and the corresponding difference of the current task with the task type for performing in each described normal server
Ratio choose idle degrees highests, the server to be allocated of fast response time, be effectively improved the choosing of server to be allocated
The efficiency and accuracy for taking, and then improve the request answer speed of network system.When the ratio is calculated, in dividing for ratio
The task type of request task is all considered in son and denominator, so as to increased the data granularity of the ratio, is further improved
The accuracy of the selection of server to be allocated.It is described present invention also offers a kind of 3rd embodiment of load-balancing method
Method includes the step S101~S106 in the first embodiment of above-mentioned load-balancing method, has further defined described from clothes
Available server is selected in business device list, including:
Line justification bag is sent in the server in the server list;
Judge whether that receiving the server is receiving the feedback message sent after line justification bag;
When the feedback message is received, judge that the server is available server;
When the feedback message is not received, judge that the server is unavailable server.
I.e. by judging whether that receiving server is receiving the feedback message sent after line justification bag, will fast and reliablely
Unavailable server is excluded in selection range, improves the efficiency of the selection of available server.
Present invention also offers a kind of fourth embodiment of load-balancing method, methods described includes above-mentioned load balancing side
Step S101~S106 in the first embodiment of method, having further defined methods described also includes:
When selecting available server from server list, if the server list does not have available server, return
Return error message.
I.e. by returning to the timely feedback server state of error message, it is therefore prevented that not available in the server list
Continue to choose the waste of the process resource caused by available server during server.
It should be noted that the flow chart shown in Fig. 1 is intended merely to express the process step of one embodiment of the invention, but this
The process step of invention is not limited to strictly be performed according to the order of S101~S106.For example, S103, S104 can be to hold side by side
Capable.
Present invention also offers a kind of first embodiment of SiteServer LBS.It is the load of present invention offer referring to Fig. 2
The structural representation of the first embodiment of equalizing system, the system includes:
Task type module 201 is obtained, for when the task requests of task to be allocated are received, obtaining described to be allocated
The task type of task;
Selection available server module 202, for after the task type is obtained, selecting available from server list
Server;
Response time module 203 is obtained, for obtaining the task with the task type in each available service
Request response time on device;
Obtain connection quantity module 204, for obtain in each described available server it is current perform with described
The quantity of the task of service type;
Server module to be allocated 205 is chosen, for that can be used described in each according to the task with the task type
The quantity of request response time on server and the current task with the task type for performing, it is all it is described can
With choosing server to be allocated in server;
Distribution task module 206, goes to perform for the task to be allocated to be assigned into the server to be allocated.
It should be noted that the task type include but is not limited to CPU intensive type, I/O intensive type, memory-intensive,
GPU intensities, database write type, database read type, session relationship type and session independent type.
I.e. by take into full account in the task of distribution request response time, the current task quantity for performing and task type come
Server to be allocated is chosen, improve the accuracy of the selection of server to be allocated, it is therefore prevented that in big visit capacity, complex requests
In the case of component requests task situation about cannot respond for a long time, improve the request answer speed of network system, improve
Load balancing effect.
As it is highly preferred that the acquisition response time module includes:
First acquisition unit, can use for obtaining the task with the task type from local data base described in each
Request response time on server;Wherein, the task of different task type is stored in the local data base in each institute
State the request response time in available server;
Life span judging unit, for for available server each described, judging appointing with the task type
It is default whether the request response time being engaged in each described available server life span in the local database exceedes
Duration threshold value;
Response time updating block, for when more than the duration threshold value, being sent to the corresponding available server
Instruct to reacquire request response time of the task with the task type in the corresponding available server simultaneously
In updating the local data base.
I.e. by storage of the local data base to request response time, it is easy to system in the life span of request response time
Request response time is obtained from local data base according to demand during not less than the duration threshold value, and without directly being used to described
Server sends the commands to obtain request response time, so as to improve the processing speed of system, and reduces and described can use clothes
Business device alleviates the pressure of the available server to the number of processes of the instruction;By judging request response time
Whether life span in the local database exceedes default duration threshold value please to decide whether to update in the local database
The response time is asked, so as to obtain real-time request response time, server state is dynamically considered, further increased to be allocated
The accuracy of the selection of server.
Present invention also offers a kind of second embodiment of SiteServer LBS, it includes the of above-mentioned SiteServer LBS
The acquisition task type module 201 of one embodiment, selection available server module 202, acquisition response time module 203, acquisition
Connection quantity module 204, selection server module 205 to be allocated, distribution task module 206, have further defined the choosing
Taking server module to be allocated includes:
First chooses unit, for calculation server response time threshold value with the task with the task type at each
The difference of the request response time in the available server, and being chosen in the available server, there is the difference to be more than
0 normal server;
Second choose unit, for calculate in each described normal server it is current perform with the task type
The ratio of the quantity of task and the corresponding difference, and chosen in the normal server there is the minimum ratio
Server to be allocated.
In the present embodiment, server response time threshold value is preset value;Task with the task type is in difference
Request response time in available server is likely less than server response time threshold value, is likely larger than server response time threshold
Value, it is also possible to equal to server response time threshold value, if the request response time of the available server is more than or equal to service
Device response time threshold value, then less than or equal to 0, now, the available server is in abnormality to the difference.
For example, the task type is divided into m classes, if the normal server chosen in the available server
Sum is n, then the set of the normal server is represented with Si ∈ { S1, S2 ..., Sn }.If the task described to be allocated for obtaining
Task type be the jth class in m kind task types, then represent that request of the jth generic task on server S i rings with Tj (Si)
Between seasonable, server response time threshold value is MaxTime, and the jth generic task that server S i is currently performed is represented with Lj (Si)
Quantity, the quantity and the corresponding difference of the current task with the task type for performing in the normal server
The ratio of MaxTime-Tj (Si) isWherein, Tj (Si)<MaxTime;In the normal server
The server to be allocated of the ratio for having minimum is chosen, that is, is chosen and is with ratio's
Server to be allocated.
For the ratioLj (Si) is smaller, and MaxTime-Tj (Si) is bigger, then ratio is smaller.
Lj (Si) is smaller, and the quantity of the current task with the task type for performing is fewer in the normal server, illustrates just
The idle degrees of normal server Si are higher;Difference MaxTime-Tj (Si) is bigger, then Tj (Si) is smaller, and jth generic task is normal
Request response time on server S i is fewer, illustrates that response speed of the jth generic task on normal server Si is faster;Cause
This, by the server to be allocated for choosing the ratio for having minimum so that the server to be allocated meets service simultaneously
The idle degrees of device are high and the characteristics of jth generic task fast response time on the server, so as to improve service to be allocated
The accuracy of the selection of device.
Normal server is chosen according to request response time in the task of distribution, request response time is exceeded into service
The server of device response time threshold value is excluded in selection range, so as to avoid have chosen the server in abnormality;It is logical
Cross the quantity and the corresponding difference of the current task with the task type for performing in each described normal server
Ratio choose idle degrees highests, the server to be allocated of fast response time, be effectively improved the choosing of server to be allocated
The efficiency and accuracy for taking, and then improve the request answer speed of network system.When the ratio is calculated, in dividing for ratio
The task type of request task is all considered in son and denominator, so as to increased the data granularity of the ratio, is further improved
The accuracy of the selection of server to be allocated.
Present invention also offers a kind of 3rd embodiment of SiteServer LBS, it includes the of above-mentioned SiteServer LBS
The acquisition task type module 201 of one embodiment, selection available server module 202, acquisition response time module 203, acquisition
Connection quantity module 204, selection server module 205 to be allocated, distribution task module 206, have further defined the choosing
Selecting available server module includes:
Inquiry unit, for being sent in line justification bag to the server in the server list;
Feedback judging unit, for judging whether that receiving the server is receiving the anti-of the transmission after line justification bag
Feedback message;
First identifying unit, for when the feedback message is received, judging that the server is available server;
Second identifying unit, for when the feedback message is not received, judging that the server is unavailable service
Device.
I.e. by judging whether that receiving server is receiving the feedback message sent after line justification bag, will fast and reliablely
Unavailable server is excluded in selection range, improves the efficiency of the selection of available server.
Present invention also offers a kind of fourth embodiment of SiteServer LBS, it includes the of above-mentioned SiteServer LBS
The acquisition task type module 201 of one embodiment, selection available server module 202, acquisition response time module 203, acquisition
Connection quantity module 204, selection server module 205 to be allocated, distribution task module 206, have further defined the system
System also includes:
Error message module, during for selecting available server from server list, if the server list does not have
Available server, then return to error message.
I.e. by returning to the timely feedback server state of error message, it is therefore prevented that not available in the server list
Continue to choose the waste of the process resource caused by available server during server.
The present invention provide load-balancing method and system, by distribute task when take into full account request response time,
The current task quantity for performing and task type choose server to be allocated, improve server to be allocated selection it is accurate
Property, it is therefore prevented that the situation that component requests task cannot be responded for a long time in the case of big visit capacity, complex requests, improve
The request answer speed of network system, improves load balancing effect.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method, can be
The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (RandomAccess
Memory, RAM) etc..
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as
Protection scope of the present invention.
Claims (10)
1. a kind of load-balancing method, it is characterised in that methods described includes:
When the task requests of task to be allocated are received, the task type of the task to be allocated is obtained;
After the task type is obtained, available server is selected from server list;
Obtain request response time of the task with the task type in each described available server;
Obtain the quantity of the current task with the task type for performing in each described available server;
Request response time according to the task with the task type in each described available server and currently hold
The quantity of the capable task with the task type, server to be allocated is chosen in all available servers;
The task to be allocated is assigned into the server to be allocated to go to perform.
2. load-balancing method as claimed in claim 1, it is characterised in that the acquisition has the task of the task type
Request response time in each described available server, including:
When obtaining request response of the task with the task type in each described available server from local data base
Between;Wherein, request of the task of different task type in each described available server is stored in the local data base
Response time;
For available server each described, judge the task with the task type in each described available server
Whether request response time life span in the local database exceedes default duration threshold value;
When more than the duration threshold value, send instruction to reacquire with the task to the corresponding available server
Request response time of the task of type in the corresponding available server is simultaneously updated in the local data base.
3. load-balancing method as claimed in claim 1 or 2, it is characterised in that described according to each available server
On request response time corresponding with the task type and the current task corresponding with the task type for performing number
Amount, chooses server to be allocated in all available servers, including:
Calculation server response time threshold value asking in each described available server with the task with the task type
The difference of response time is sought, and the normal server with the difference more than 0 is chosen in the available server;
Calculate the quantity of the current task with the task type for performing and corresponding institute in each described normal server
The ratio of difference is stated, and the server to be allocated of the ratio for having minimum is chosen in the normal server.
4. load-balancing method as claimed in claim 1, it is characterised in that described that available service is selected from server list
Device, including:
Line justification bag is sent in the server in the server list;
Judge whether that receiving the server is receiving the feedback message sent after line justification bag;
When the feedback message is received, judge that the server is available server;
When the feedback message is not received, judge that the server is unavailable server.
5. the load-balancing method as described in claim 1 or 4, it is characterised in that methods described also includes:
When selecting available server from server list, if the server list does not have available server, return wrong
False information.
6. a kind of SiteServer LBS, it is characterised in that the system includes:
Task type module is obtained, for when the task requests of task to be allocated are received, obtaining the task to be allocated
Task type;
Selection available server module, for after the task type is obtained, available server being selected from server list;
Response time module is obtained, for obtaining the asking in each described available server of the task with the task type
Ask the response time;
Obtain connection quantity module, for obtain in each described available server it is current perform with the task type
The quantity of task;
Server module to be allocated is chosen, there is the task of the task type in each available server for basis
Request response time and the current task with the task type for performing quantity, in all available servers
It is middle to choose server to be allocated;
Distribution task module, goes to perform for the task to be allocated to be assigned into the server to be allocated.
7. SiteServer LBS as claimed in claim 6, it is characterised in that the acquisition response time module includes:
First acquisition unit, for obtaining the task with the task type in each available service from local data base
Request response time on device;Wherein, stored in the local data base task of different task type each it is described can
With the request response time on server;
Life span judging unit, for for available server each described, judging that the task with the task type exists
Whether request response time in each described available server life span in the local database exceedes default duration
Threshold value;
Response time updating block, for when more than the duration threshold value, instruction being sent to the corresponding available server
To reacquire request response time of the task in the corresponding available server with the task type and update
To in the local data base.
8. SiteServer LBS as claimed in claims 6 or 7, it is characterised in that the selection server module bag to be allocated
Include:
First choose unit, for calculation server response time threshold value with have the task type task described in each
The difference of the request response time in available server, and choose have the difference more than 0 in the available server
Normal server;
Second chooses unit, for calculating the current task with the task type for performing in each described normal server
Quantity and the corresponding difference ratio, and chosen in the normal server there is treating point for the minimum ratio
With server.
9. SiteServer LBS as claimed in claim 6, it is characterised in that the selection available server module includes:
Inquiry unit, for being sent in line justification bag to the server in the server list;
Feedback judging unit, for judging whether that receive the server disappears in the feedback for receiving the transmission after line justification bag
Breath;
First identifying unit, for when the feedback message is received, judging that the server is available server;
Second identifying unit, for when the feedback message is not received, judging that the server is unavailable server.
10. the SiteServer LBS as described in claim 6 or 9, it is characterised in that the system also includes:
Error message module, during for selecting available server from server list, if the server list not can use
Server, then return to error message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710249953.5A CN106936925A (en) | 2017-04-17 | 2017-04-17 | Load-balancing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710249953.5A CN106936925A (en) | 2017-04-17 | 2017-04-17 | Load-balancing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106936925A true CN106936925A (en) | 2017-07-07 |
Family
ID=59437574
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710249953.5A Pending CN106936925A (en) | 2017-04-17 | 2017-04-17 | Load-balancing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106936925A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107483350A (en) * | 2017-07-11 | 2017-12-15 | 北京潘达互娱科技有限公司 | A kind of gateway distribution method and device |
CN107562546A (en) * | 2017-09-18 | 2018-01-09 | 上海量明科技发展有限公司 | Method for allocating tasks, device and JICQ |
CN108197808A (en) * | 2017-12-29 | 2018-06-22 | 广东溢达纺织有限公司 | Production task distribution method, device and system |
CN109842665A (en) * | 2017-11-29 | 2019-06-04 | 北京京东尚科信息技术有限公司 | Task processing method and device for task distribution server |
CN109922050A (en) * | 2019-02-03 | 2019-06-21 | 普信恒业科技发展(北京)有限公司 | A kind of task detection method and device |
CN110727516A (en) * | 2019-10-12 | 2020-01-24 | 江苏卫健信息科技有限公司 | Data analysis task allocation method |
CN111355814A (en) * | 2020-04-21 | 2020-06-30 | 上海润欣科技股份有限公司 | Load balancing method and device and storage medium |
WO2020211718A1 (en) * | 2019-04-18 | 2020-10-22 | 阿里巴巴集团控股有限公司 | Data processing method, apparatus and device |
CN112596892A (en) * | 2020-11-23 | 2021-04-02 | 中标慧安信息技术股份有限公司 | Data interaction method and system of multi-node edge computing equipment |
CN113204405A (en) * | 2021-05-21 | 2021-08-03 | 乐视致新信息技术(武汉)有限公司 | Page data acquisition method, device, equipment and computer readable storage medium |
CN113778639A (en) * | 2021-03-19 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Method, device and equipment for adjusting thread pool and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102316133A (en) * | 2010-07-01 | 2012-01-11 | 中国移动通信集团上海有限公司 | Method and device for balancing load |
CN104065745A (en) * | 2014-07-07 | 2014-09-24 | 电子科技大学 | Cloud computing dynamic resource scheduling system and method |
CN105141541A (en) * | 2015-09-23 | 2015-12-09 | 浪潮(北京)电子信息产业有限公司 | Task-based dynamic load balancing scheduling method and device |
CN105516360A (en) * | 2016-01-19 | 2016-04-20 | 苏州帕科泰克物联技术有限公司 | Method and device for load balance of computer |
CN105872082A (en) * | 2016-05-18 | 2016-08-17 | 上海交通大学 | Fine-grained resource response system based on load balancing algorithm of container cluster |
-
2017
- 2017-04-17 CN CN201710249953.5A patent/CN106936925A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102316133A (en) * | 2010-07-01 | 2012-01-11 | 中国移动通信集团上海有限公司 | Method and device for balancing load |
CN104065745A (en) * | 2014-07-07 | 2014-09-24 | 电子科技大学 | Cloud computing dynamic resource scheduling system and method |
CN105141541A (en) * | 2015-09-23 | 2015-12-09 | 浪潮(北京)电子信息产业有限公司 | Task-based dynamic load balancing scheduling method and device |
CN105516360A (en) * | 2016-01-19 | 2016-04-20 | 苏州帕科泰克物联技术有限公司 | Method and device for load balance of computer |
CN105872082A (en) * | 2016-05-18 | 2016-08-17 | 上海交通大学 | Fine-grained resource response system based on load balancing algorithm of container cluster |
Non-Patent Citations (1)
Title |
---|
陈志刚等: "《多层客户/服务计算模型及实现技术》", 31 January 2003 * |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107483350A (en) * | 2017-07-11 | 2017-12-15 | 北京潘达互娱科技有限公司 | A kind of gateway distribution method and device |
CN107562546A (en) * | 2017-09-18 | 2018-01-09 | 上海量明科技发展有限公司 | Method for allocating tasks, device and JICQ |
CN107562546B (en) * | 2017-09-18 | 2020-06-16 | 上海量明科技发展有限公司 | Task allocation method and device and instant messaging tool |
CN109842665A (en) * | 2017-11-29 | 2019-06-04 | 北京京东尚科信息技术有限公司 | Task processing method and device for task distribution server |
CN109842665B (en) * | 2017-11-29 | 2022-02-22 | 北京京东尚科信息技术有限公司 | Task processing method and device for task allocation server |
CN108197808A (en) * | 2017-12-29 | 2018-06-22 | 广东溢达纺织有限公司 | Production task distribution method, device and system |
CN108197808B (en) * | 2017-12-29 | 2023-10-20 | 广东溢达纺织有限公司 | Production task distribution method, device and system |
CN109922050A (en) * | 2019-02-03 | 2019-06-21 | 普信恒业科技发展(北京)有限公司 | A kind of task detection method and device |
WO2020211718A1 (en) * | 2019-04-18 | 2020-10-22 | 阿里巴巴集团控股有限公司 | Data processing method, apparatus and device |
CN110727516B (en) * | 2019-10-12 | 2020-08-28 | 江苏卫健信息科技有限公司 | Data analysis task allocation method |
CN110727516A (en) * | 2019-10-12 | 2020-01-24 | 江苏卫健信息科技有限公司 | Data analysis task allocation method |
CN111355814A (en) * | 2020-04-21 | 2020-06-30 | 上海润欣科技股份有限公司 | Load balancing method and device and storage medium |
CN111355814B (en) * | 2020-04-21 | 2024-04-19 | 上海润欣科技股份有限公司 | Load balancing method, device and storage medium |
CN112596892A (en) * | 2020-11-23 | 2021-04-02 | 中标慧安信息技术股份有限公司 | Data interaction method and system of multi-node edge computing equipment |
CN112596892B (en) * | 2020-11-23 | 2021-08-31 | 中标慧安信息技术股份有限公司 | Data interaction method and system of multi-node edge computing equipment |
CN113778639A (en) * | 2021-03-19 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Method, device and equipment for adjusting thread pool and computer storage medium |
CN113204405A (en) * | 2021-05-21 | 2021-08-03 | 乐视致新信息技术(武汉)有限公司 | Page data acquisition method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106936925A (en) | Load-balancing method and system | |
CN107145384A (en) | Method for allocating tasks and system | |
US8095935B2 (en) | Adapting message delivery assignments with hashing and mapping techniques | |
US7065526B2 (en) | Scalable database management system | |
CN102938790B (en) | Resource allocation methods in cloud computing system | |
CN109951537B (en) | Load balancing distribution method facing block chain | |
CN108881512B (en) | CTDB virtual IP balance distribution method, device, equipment and medium | |
CN110868465A (en) | Load balancing system and method for container cloud | |
TWI505682B (en) | Remote management system with adaptive session management mechanism | |
CN105007337A (en) | Cluster system load balancing method and system thereof | |
CN101741907A (en) | Method and system for balancing server load and main server | |
CN101938504A (en) | Cluster server intelligent dispatching method and system | |
US20100058451A1 (en) | Load balancing for services | |
CN110912972B (en) | Service processing method, system, electronic equipment and readable storage medium | |
CN109995842B (en) | Grouping method and device for distributed server cluster | |
CN105933408A (en) | Implementation method and device of Redis universal middleware | |
CN117149445B (en) | Cross-cluster load balancing method and device, equipment and storage medium | |
CN104283963A (en) | Distributed and collaborative type CDN load balancing method | |
US20110153826A1 (en) | Fault tolerant and scalable load distribution of resources | |
US7984158B2 (en) | Web service for coordinating actions of clients | |
CN111930505B (en) | Data resource management method and system for big data platform, server and medium | |
CN109240826B (en) | Method for allocating computing resources when nodes share computing equipment in multi-block chain network | |
EP3672203A1 (en) | Distribution method for distributed data computing, device, server and storage medium | |
CN114168312A (en) | Distributed cluster load balancing method and device and storage medium | |
CN105099753B (en) | The method of Network Management System and its processing business |
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: 20170707 |