CN101753461B - Method for realizing load balance, load balanced server and group system - Google Patents

Method for realizing load balance, load balanced server and group system Download PDF

Info

Publication number
CN101753461B
CN101753461B CN2010100022642A CN201010002264A CN101753461B CN 101753461 B CN101753461 B CN 101753461B CN 2010100022642 A CN2010100022642 A CN 2010100022642A CN 201010002264 A CN201010002264 A CN 201010002264A CN 101753461 B CN101753461 B CN 101753461B
Authority
CN
China
Prior art keywords
load
node
task requests
child node
balanced server
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.)
Active
Application number
CN2010100022642A
Other languages
Chinese (zh)
Other versions
CN101753461A (en
Inventor
张立锋
顾润喆
景培培
吴炜斯
杨芬
施健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN2010100022642A priority Critical patent/CN101753461B/en
Publication of CN101753461A publication Critical patent/CN101753461A/en
Application granted granted Critical
Publication of CN101753461B publication Critical patent/CN101753461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a group system comprising a load balanced server and at least two sub nodes, wherein the at least two sub nodes are used for respectively collecting respective various source information, and sending the source information to the load balanced server; the load balanced server is used for receiving tusk requirements and the various source information; sub nodes for processing the tusk requirements are ensured according to load balanced tactics and the various source information; and the tusk requirements are sent to the ensured sub nodes. Correspondingly, the present invention also discloses a method for realizing load balance and the load balanced server. The sub nodes for processing the tusk requirements are ensured according to the load balanced tactics and the various source information respectively sent by the at least two sub nodes in the group system, the most reasonable source distribution is realized in the group system, and flexible configuration can be realized according needs to enable the processing efficiency of the group system to improve mostly.

Description

Realize method, load-balanced server and the group system of load balancing
Technical field
The present invention relates to the computer cluster technical field, more particularly, relate to a kind of method, load-balanced server and group system that realizes load balancing.
Background technology
Along with the growth of application system data volume, make data processing request and calculating strength correspondingly increase, and growing data processing request and calculating strength are had higher requirement to the scale and the disposal ability of system.In order to tackle such trend, can adopt the cluster running environment of multimachine to come collaborative work and handle various task requests, thereby reach the high concurrent purpose that merges with multisystem of single system.Simultaneously, realize the seamless expansion of system, make the increase of systematic function and hardware obtain proportional raising through cluster.
At present, most of cluster schemes all are to rely on the basis of hardware, realize a hardware cluster.But; These cluster schemes are only come the allocating task request according to the single resource in the group system, and can not realize as required disposing flexibly, cause the wasting of resources of some platforms in the cluster; Reduce the disposal ability of group system, made group system can not make correct Decision of Allocation.
Summary of the invention
The objective of the invention is to: a kind of method, load-balanced server and group system that realizes load balancing is provided; Be used for various resource information allocating task request, thereby realize the flexible configuration and the more effective load balancing of group system according to group system.
On the one hand, the invention provides a kind of method that realizes load balancing, this method comprises:
Load-balanced server receives task requests,
The various resource informations of sending respectively according to load balancing strategy and at least two node confirm to handle the child node of said task requests,
Said task requests is sent to the child node of determining.
On the other hand, the invention provides a kind of load-balanced server, this load-balanced server comprises:
Receiver module is used to receive the various resource informations that task requests and at least two node are sent respectively;
Load balancing module is used for according to load balancing strategy and the definite child node of handling said task requests of said various resource information;
Distribution module is used for said task requests is sent to the child node of determining.
On the one hand, the present invention also provides a kind of group system again, and this group system comprises:
At least two node and load-balanced server;
Wherein, Said at least two node are gathered various resource informations separately respectively; And said various resource informations are sent to load-balanced server; Said load-balanced server receives task requests and said various resource information, confirms to handle the child node of this task requests according to load balancing strategy and said various resource information, and this task requests is sent to the child node of determining.
A kind of method, load-balanced server and group system of load balancing of realizing of embodiment of the present invention has following beneficial effect: the child node of confirming the Processing tasks request through the various resource informations of sending respectively according at least two node in load balancing strategy and the cluster; In group system, realize the most rational resource allocation; Thereby the load balancing of the system of realization; And can realize as required disposing flexibly, make the treatment effeciency of system obtain maximum raising.
Description of drawings
Fig. 1 is a kind of flow chart of realizing the method for load balancing of the present invention;
Fig. 2 is the embodiment one of the method for realization load balancing of the present invention;
Fig. 3 is the embodiment two of the method for realization load balancing of the present invention;
Fig. 4 is the structural representation of a kind of group system of the present invention;
Fig. 5 is the structural representation of the load-balanced server in the group system of the present invention;
Fig. 6 is the structural representation of the load balancing module in the load-balanced server of the present invention;
Fig. 7 is the embodiment one of the load-balanced server in the group system of the present invention;
Fig. 8 is the embodiment two of the load-balanced server in the group system of the present invention;
Fig. 9 is the embodiment three of the load-balanced server in the group system of the present invention.
Embodiment
For the purpose, technical scheme and the advantage that make embodiments of the invention is clearer, will combine accompanying drawing that the present invention is done to describe in detail further below.
Fig. 1 is a kind of flow chart of realizing the method for load balancing of the present invention.As shown in Figure 1, this method comprises:
S101, load-balanced server receives task requests.
Owing in group system, usually the task requests of adding type is done load balancing, therefore, the task requests that in S101, receives refers to local task requests or the long-range interpolation task requests of adding.In addition; For the reliable path that provides to receive task requests to group system; The embodiment of the invention preferably adopts the point-to-point pattern of MINA (Multipurpose Infrastructure for Network Applications) to receive task requests; Wherein, MINA is a web application framework of increasing income and organizing APACHE to safeguard, the user utilizes MINA can easily develop the web application of high-performance and high scalability.Certainly, the embodiment of the invention also can adopt among the JAVA other patterns based on TCP/IP socket communication modes to receive.
S102, the various resource informations of sending respectively according to load balancing strategy and at least two node confirm to handle the child node of this task requests, comprise two kinds of execution modes:
Execution mode one: handle the method for figuring and said various resource information is determined the child node of handling this task requests according to the least resource of configuration; Perhaps
Execution mode two: weighted round robin dispatching algorithm and said various resource information according to configuration are determined the child node of handling this task requests.
Need to prove; Said at least two node are according to time interval of configuration timing acquiring and send the various resource informations of said child node respectively, still, if the too frequent collection of child node and send resource information; Then can influence the performance and the stability of group system; Therefore, in practical application, be that unit disposes the said time interval usually with the second.In one embodiment of the invention, can dispose this time interval is 5 seconds, and in other execution modes of the present invention, the technical staff can dispose according to actual conditions on the basis of performance that satisfies group system and stability neatly should the time interval.
S103 sends to said task requests the child node of determining.
Wherein, For reliable, the path of trusting that provides to send task requests to group system; The embodiment of the invention preferably adopts the point-to-point pattern of MINA task requests to be sent to the child node of determining; Certainly, also can adopt based on other patterns of TCP/IP socket communication modes and send.
Do detailed explanation in the face of the execution mode one among the S102 down.
Execution mode one: handle the various resource informations that the method for figuring and said at least two node send respectively according to the least resource of configuration and determine the child node of handling this task requests, be specially:
For each node at least two node in the group system is provided with the node weights; Each resource information in the various resource informations of sending respectively at least two node is provided with resource value and resource load weights, and said node weights, resource value and resource load weights all can be provided with and be revised by the technical staff according to actual needs.Wherein, Said resource information comprises thread utilization rate, CPU usage, memory usage and just in task for processing request quantity; Certainly; Execution mode one among the S102 of the embodiment of the invention is not limited to above-mentioned four kinds of resource informations, and the kind of the resource information that should consider can also be set by the technical staff according to actual needs.The disposal ability of node weight value representation node, the node weights are high more, and the disposal ability of this node is strong more, and the chance that obtains task requests is also just big more.Resource value is meant the value of said resource information.The purpose that the resource load weights are set is: every kind of resource all can obtain a numerical value when collection of resources; But because the Type-Inconsistencies of each resource; The influence that processing caused to task requests is also inconsistent; So just need this numerical value be done modification here, make each resource based on unified standard.For example; For CPU usage and these two kinds of resource informations of thread utilization rate; Strengthen the resource load weights that influence that CPU handles task requests then increases the weight of CPU usage if desired, strengthen the resource load weights that influence that thread handles task requests then increases the weight of the thread utilization rate if desired;
Each child node in each node is obtained this each node load value separately by following processing: respectively the resource value of each resource information of this child node and resource load weights are done product and handle and obtain first end value; The first end value addition of various resource informations is obtained second end value, the node weights of this second end value and this child node are done product handle the load value that obtains this child node;
Determine the child node of handling this task requests according to the load value of each node, particularly,, load value in each node is met this regular child node confirm as the child node of handling this task requests according to pre-configured rule.In one embodiment of the invention; Above-mentioned pre-configured rule can be to select the minimum child node of load value in this each node; In other execution modes of the present invention; Above-mentioned pre-configured rule can be to select load value time little child node in this each node, perhaps can dispose said rule according to actual needs by the technical staff.
For example; The m node is arranged in the group system, and m is a natural number, and the number of child node in the group system can be set by the technical staff according to actual needs; The various resource informations of each child node in this m node have the n kind; N is a natural number, and the kind of the resource information that should consider can be set by the technical staff according to actual needs, then:
The node weights are designated as M, and the node weights of this m node are designated as M={M 0, M 1, M 2, M 3..., M M-1, M iRepresent the node weights of i node in the group system;
Resource value is designated as β, and the resource value of this n kind resource information is designated as β={ β 0, β 1, β 2, β 3..., β N-1, β iRepresent the resource value of i kind resource information;
The resource load weights are designated as W, and the resource load weights of this n kind resource information are designated as W={W 0, W 1, W 2, W 3..., W N-1, W iRepresent the resource load weights of i kind resource information;
Load value is designated as L, and the load value of this m node is designated as L={L 0, L 1, L 2, L 3..., L M-1, L iRepresent the load value of i node.
So, k in this group system (k=1,2,3 ..., m) the load value L of node kFor:
L k = Σ i = 1 n ( W i × β i ) × M k
Last according to the above-mentioned rule that disposes according to actual needs by the technical staff, with L k(k=1,2,3 ..., value m) meets this regular child node and confirms as the child node of handling this task requests, particularly, can select L k(k=1,2,3 ..., m) the minimum child node of intermediate value is to handle the child node of this task requests, certainly, also can select L k(k=1,2,3 ..., m) intermediate value time little child node is to handle the child node of this task requests, perhaps confirms to handle the child node of this task requests according to other pre-configured rules.
In a kind of preferred implementation of the present invention; Said resource information also comprises the information of a last task requests that disposes; When handling the child node of the method for figuring and the request of the definite processing of various resource information current task according to least resource, just can take into account the information of this last task requests that disposes.Because it is short a lot of that the time interval of resource information is gathered and sent to the processing of task requests, the time ratio child node of response; Not that an one magnitude is other; Therefore; Adopt this preferred implementation; Even when the task requests quantity that receives increases explosively, can not appear in the above-mentioned time interval situation that all task requests that receive is all sent to the same child node of determining according to this algorithm and various resource information yet, can not influence the normal operation of whole group system because task requests quantity increases explosively.When child node was sent various resource information once more, new resource information replaced original resource information, carried out according to least resource with continued and handled the step that the method for figuring and various resource information are determined the child node of Processing tasks request.
In addition; In the execution mode one in S102; As another kind of preferred implementation, said resource information can also comprise state information and/or the response message after each node Processing tasks request of the platform of each node, wherein; The state information of the platform of said child node comprises platform operate as normal and platform non-normal working, and said response message comprises handling successfully fails with handling.Before the child node of handling the method for figuring and this task requests of the definite processing of various resource information according to the least resource of configuration; The S102 step can also comprise according to said state information and/or response message judging in said each node, whether have disabled child node; When being judged as not; Continue to carry out said least resource and handle the step that the method for figuring and various resource information are determined the child node of handling said task requests according to configuration; When being judged as when being; With said disabled child node deletion, carry out said least resource then and handle the step that the method for figuring and various resource information are determined the child node of handling said task requests according to configuration.Wherein, when said state information is platform non-normal working and/or said response message when exceeding first threshold for the ratio of handling failure, then be judged as to have disabled child node; Do not exist otherwise be judged as, wherein, said first threshold can be provided with according to the character of said each node task for processing request by the technical staff; For example; The lower task requests of serious forgiveness for relatively more responsive can be provided with lower first threshold values (as 20%), for the higher task requests of serious forgiveness; Higher first threshold (as 50%) can be set; Certainly, said first threshold is not limited to above-mentioned two kinds of numerical value, and the technical staff can be provided with first threshold according to actual needs.Alternatively, can utilize the group administrative mechanism of the cluster communication instrument JGroup among the JAVA to delete said disabled child node.Through with the deletion of disabled child node, avoided assignment error, improved the efficient that least resource is handled the method for figuring.
From the above; Execution mode one among the S102 of the embodiment of the invention adopts least resource to handle the method for figuring; Can be by technical staff's resource allocation information neatly according to actual needs; Even when the child node handling property in the group system has nothing in common with each other, perhaps when the time that receives task requests alters a great deal, can both in group system, realize rational resource allocation.
Do detailed explanation in the face of the execution mode two among the S102 down.
Execution mode two: the various resource informations according to the weighted round robin dispatching algorithm and at least two node of configuration are sent are respectively determined the child node of handling this task requests, are specially:
According to said various resource informations is that each node in said at least two node is provided with weighted value; Wherein, Said resource information comprises thread utilization rate, CPU usage, memory usage etc., and as stated, child node is according to the time interval timing acquiring that disposes and send various resource informations; Therefore when child node was sent various resource information once more, new resource information replaced original resource information.Certainly, the execution mode two among the S102 of the embodiment of the invention is not limited to above-mentioned three kinds of resource informations, and the kind of the resource information that should consider can also be set by the technical staff according to actual needs.Said weighted value can by the technical staff according to actual needs and said resource information be provided with;
Determine the child node of handling said task requests according to the weighted value of said each node, wherein, weighted value is represented the disposal ability of each node, the ratio of the child node of the Processing tasks request determined of this algorithm just of the ratio between the weighted value.For example, for the child node S={S in the group system 0, S 1, S 2..., S N-1, n representes the number of the child node in this group system, S 0Weight be 1, S 1Weight be 5, S then 1Handle 5 subtask request S 0Just can handle once.
In addition; In the execution mode two in S102; As another kind of preferred implementation; Said resource information can also comprise state information and/or the response message after each node Processing tasks request of the platform of each node; And before the child node according to the weighted round robin dispatching algorithm that disposes and this task requests of the definite processing of various resource information, the S102 step can also comprise according to said state information and/or response message judging in said each node, whether have disabled child node, when being judged as not; Continue to carry out the said step of determining the child node of handling said task requests according to the weighted round robin dispatching algorithm and the various resource information of configuration; When being judged as when being,, carry out the said step of determining the child node of handling said task requests according to the weighted round robin dispatching algorithm and the various resource information of configuration then with said disabled child node deletion.Wherein, said state information with response message and the description in the execution mode one among the deterministic process that judges whether to exist disabled child node and the S102 identical, repeat no more here.Alternatively, can utilize the group administrative mechanism of the cluster communication instrument JGroup among the JAVA to delete said disabled child node.Through with disabled child node deletion, avoided assignment error, improved the efficient of weighted round robin dispatching algorithm.
From the above; The present invention confirms that through the various resource informations of sending according at least two node in load balancing strategy and the cluster child node of Processing tasks request realizes the load balancing of system; Can adopt least resource to handle and figure method or weighted round robin dispatching algorithm; No matter adopt which kind of algorithm to realize according to actual needs disposing neatly, in group system, realize rational resource allocation, make the treatment effeciency of system obtain maximum raising.
Fig. 2 is the embodiment one of the method for realization load balancing of the present invention.As shown in Figure 2, this method comprises:
S201, load-balanced server receives task requests.Identical among this step and Fig. 1 to the description of S101, repeat no more here.
S202 judges whether to do load balance process, when not being judged as not, carries out S203, when being judged as when being, carries out S204.Particularly; Processing tasks processing of request amount according to said load-balanced server is judged; When the treating capacity of this load-balanced server reaches or exceeds second threshold value; Explain that this load-balanced server can not handle the said task requests that receives, then be judged as and do load balance process, need not do load balance process otherwise be judged as.Wherein, said second threshold value can be provided with according to the disposal ability of load-balanced server by the technical staff, for example; Handle 60 task requests if the maximum processing capability of this load-balanced server is a per minute, so in order to guarantee the even running of system, it is that per minute is handled 50 task requests that second threshold value can be set; Certainly; Here just illustrate, said second threshold value is not limited to this, and the technical staff can also be provided with second threshold value according to actual needs.
S203 handles said task requests by said load-balanced server.
S204, the various resource informations of sending respectively according to load balancing strategy and at least two node confirm to handle the child node of said task requests.Identical among this step and Fig. 1 to the description of S102, repeat no more here.
S205 sends to said task requests the child node of determining.Identical among this step and Fig. 1 to the description of S103, repeat no more here.
The embodiment one that realizes the method for load balancing judges whether that according to the treating capacity of load-balanced server needs do load balance process; Reach or exceed under the situation of second threshold value in the treating capacity of load-balanced server and just do load balance process; All do the method for load balance process compares with the task requests that all are received; Can alleviate the burden of group system, accelerate the speed of service of group system.
Fig. 3 is the embodiment two of the method for realization load balancing of the present invention.As shown in Figure 3, this method comprises:
S301, load-balanced server receives task requests.Identical among this step and Fig. 1 to the description of S101, repeat no more here.
S302 judges according to said task requests whether the destination node of this task requests is said load-balanced server, when being judged as when being, carries out S303, when being judged as not, carries out S304.Wherein, the destination node of said task requests is to be pointed out by the request message of said task requests.
S303 handles said task requests by this load-balanced server.
S304, the various resource informations of sending respectively according to load balancing strategy and at least two node confirm to handle the child node of said task requests.Identical among this step and Fig. 1 to the description of S102, repeat no more here.
S305 sends to this task requests the child node of determining.Identical among this step and Fig. 1 to the description of S103, repeat no more here.
In addition, in another embodiment of the invention, after S301; And before S302; The embodiment two of the method for realization load balancing of the present invention can also comprise and judges whether to do load balance process, when being judged as not, handles said task requests by load-balanced server; When being judged as when being, carrying out and saidly judge according to task requests whether the destination node of this task requests is the step of load-balanced server.Wherein, the description of the S202 among the said concrete deterministic process that judges whether to do load balance process and Fig. 2 is identical, repeats no more here.
The embodiment two that realizes the method for load balancing not only judges whether doing load balancing; To whether be that load-balanced server is judged also to the destination node of the task requests that receives; Not only realized the purpose of load balancing, also satisfied particular task processing of request needs.
Fig. 4 is the structural representation of a kind of group system 1 of the present invention.As shown in Figure 4, group system 1 comprises:
Load-balanced server 10 and at least two node of communicating by letter with this load-balanced server 10; Comprise first child node 11, second child node 12 ..., N child node 13; Wherein, N is a natural number, and the technical staff can be provided with the number of the child node in the group system according to actual needs.
First child node 11 in said at least two node, second child node 12 ..., N child node 13 is used for regularly gathering various resource informations separately respectively and these resource informations being sent to load-balanced server 10 according to the time interval of configuration.Wherein, Said various resource information comprise thread utilization rate, CPU usage, memory usage, just task for processing request quantity, dispose on the state information etc. of platform of information, each node of a task requests, can also comprise according to actual needs and other information of setting of different load balancing strategies by the technical staff.In addition; In said at least two node; The child node that is determined out the processing task requests also is used for receiving this task requests of task requests reprocessing, and the response message that after finishing dealing with, will handle this task requests sends to load-balanced server 10 as one of said resource information.
Need to prove, if the too frequent collection of child node and send resource information then can influence the performance and the stability of group system, therefore, in practical application, be that unit disposes the said time interval with the second usually.In one embodiment of the invention, can dispose this time interval is 5 seconds, and in other execution modes of the present invention, the technical staff can dispose according to actual conditions on the basis of performance that satisfies group system and stability neatly should the time interval.
Load-balanced server 10 is used to receive the various resource informations that task requests and at least two node are sent respectively; According to load balancing strategy and the definite child node of handling this task requests of said various resource information; And this task requests sent to the child node of determining, thereby realize load balancing.
Need to prove; In cluster 1; Load-balanced server is not limited to set-up mode as shown in Figure 4 with each node; Can be configured its method that can realize load balancing that makes on the child node arbitrarily, then this child node that can realize the method for load balancing arbitrarily all can be used as load-balanced server.For example; If the method that first child node 11 achieves load balancing is set; Then first child node 11 also can be used as load-balanced server; When load-balanced server 10 cisco unity malfunctions, the child node of method that first child node 11 or other can realize load balancing arbitrarily then can be set as new load-balanced server replacement load-balanced server 10.
To combine Fig. 5-Fig. 8 to set forth the 26S Proteasome Structure and Function of the load-balanced server 10 in the group system 1 in detail below.
Fig. 5 is the structural representation of the load-balanced server 10 in the group system 1 of the present invention.As shown in Figure 5, this load-balanced server 10 comprises:
Receiver module 100 is used for receiving the various resource informations that at least two node of task requests and Fig. 4 are sent respectively.
Owing in group system, usually the task requests of adding type is done load balance process, therefore, the task requests that receiver module 100 receives refers to local task requests or the long-range interpolation task requests of adding.In addition; For reliable, the path of trusting that provides to receive task requests to group system; The embodiment of the invention preferably adopts the point-to-point pattern of MINA to receive task requests, certainly, also can adopt other patterns based on TCP/IP socket communication modes to receive.
Load balancing module 101, the various resource informations that are used for receiving according to load balancing strategy and receiver module 100 confirm to handle the child node of the task requests that receiver module 100 receives.
Distribution module 102 is used for said task requests is sent to the child node that load balancing module 101 is determined.
Wherein, For reliable, the path of trusting that provides to send task requests to group system; The embodiment of the invention preferably adopts the point-to-point pattern of MINA task requests to be sent to the child node of determining; Certainly, also can adopt based on other patterns of TCP/IP socket communication modes and send.
Fig. 6 is the structural representation of the load balancing module 101 in the load-balanced server 10 of the present invention.As shown in Figure 6, load balancing module 101 comprises:
Buffer unit 1010 is used to store the various resource informations that at least two node that receiver module 100 receives are sent respectively.
Especially; According to mentioned above; Various resource informations are gathered and sent at least two node in the cluster regularly respectively according to the time interval of configuration, so, and whenever child node is sent various resource informations; Receiver module 100 receives after these resource informations, and buffer unit 1010 is just stored these resource informations and replaced original resource information simultaneously.
First confirms unit 1011, is used for handling the child node that various resource informations that the method for figuring and buffer unit 1010 store are determined the Processing tasks request according to the least resource of configuration.
Second confirms unit 1012, is used for determining according to the various resource informations that the weighted round robin dispatching algorithm and the buffer unit 1010 of configuration are stored the child node of Processing tasks request.
In addition; In a kind of preferred implementation of the present invention; Load balancing module 101 can also comprise delete cells; Be used to realize following function: first confirm that unit 1011 or second confirms that the child node of Processing tasks requests is confirmed in unit 1012 before, the response message of handling after the said task requests according to the state information of the platform of each node in the various resource informations of storage in the buffer unit 1010 and/or each node judges whether to exist disabled child node, when being judged as not; Handle by first definite unit 1011 or second definite unit 1012; When being judged as when being,, confirm that by first unit 1011 or second confirms that unit 1012 handles then with said disabled child node deletion.Alternatively, utilize the group administrative mechanism of the cluster communication instrument JGroup among the JAVA to delete disabled child node.Through with the deletion of disabled child node, avoided assignment error, improved the efficient that least resource is handled the method for figuring.
Fig. 7 is the embodiment one of the load-balanced server 10 in the group system 1 of the present invention.As shown in Figure 7, load-balanced server 10 comprises: receiver module 100, load balancing module 101, distribution module 102 and first judge module 103, wherein,
The function of receiver module 100, load balancing module 101, distribution module 102 is identical with the description in Fig. 5, repeats no more here.
First judge module 103 is used to realize following function:
After receiver module 100 receives task requests, judge whether to do load balance process,
When being judged as not, handle said task requests by load-balanced server 10,
When being judged as when being, handle by load balancing module 101.
Fig. 8 is the embodiment two of the load-balanced server 10 in the group system 1 of the present invention.As shown in Figure 8, load-balanced server 10 comprises: receiver module 100, load balancing module 101, distribution module 102, second judge module 104, wherein,
The function of receiver module 100, load balancing module 101, distribution module 102 is identical with the description in Fig. 5, repeats no more here.
Second judge module 104 is used to realize following function:
After receiver module 100 receives task requests, judge according to said task requests whether the destination node of this task requests is load-balanced server 10,
When being judged as not, handle by load balancing module 101,
When being judged as when being, handle said task requests by load-balanced server 10.
Fig. 9 is the embodiment three of the load-balanced server 10 in the group system 1 of the present invention.As shown in Figure 9, load-balanced server 10 comprises: receiver module 100, load balancing module 101, distribution module 102, the 3rd judge module 105, wherein,
The function of receiver module 100, load balancing module 101, distribution module 102 is identical with the description in Fig. 5, repeats no more here.
The 3rd judge module 106 is used to realize following function:
After receiver module 100 receives task requests, judge whether to do load balance process,
When being judged as not, handle said task requests by load-balanced server 10,
When being judged as when being, judge according to said task requests whether the destination node of this task requests is load-balanced server 10,
When being judged as when not being load-balanced server 10, handle by load balancing module 101,
When being judged as when being load-balanced server 10, handle said task requests by load-balanced server 10.
In sum; A kind of method, load-balanced server and group system that realizes load balancing of the present invention confirmed the child node of Processing tasks request through the various resource informations of sending respectively according at least two node in load balancing strategy and the cluster; In group system, realize rational resource allocation, thereby the load balancing of the system of realization has the transparency to the legacy data handling process; Make clustered deploy(ment) not influence original system; And can realize as required disposing flexibly, can merge fully, make the treatment effeciency of system obtain maximum raising with platform.
Through the description of above execution mode, those skilled in the art can be well understood to the present invention and can realize by the mode of software combined with hardware platform, can certainly all implement through hardware.Based on such understanding; All or part of can the coming out that technical scheme of the present invention contributes to background technology with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises that some instructions are with so that a computer equipment (can be a personal computer; Server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
More than disclosedly be merely embodiment of the present invention; Only be used for the present invention is illustrated; Can not limit the present invention's protection range with this, those skilled in the art can carry out various modifications, variation or replacement under the prerequisite that does not break away from essence of the present invention, therefore; Various equivalent variations according to the present invention did still belong to the scope that the present invention is contained.

Claims (5)

1. a method that realizes load balancing is characterized in that, said method comprises:
Load-balanced server receives task requests, wherein adopts the point-to-point pattern of MINA to receive task requests,
The various resource informations of sending respectively according to load balancing strategy and at least two node confirm to handle the child node of said task requests; Comprising handle the child node that the method for figuring and said various resource information are determined the said task requests of processing according to the least resource of configuration; Particularly; Each node that is included as in said at least two node is provided with the node weights; For each resource information in the said various resource informations is provided with resource value and resource load weights; Each child node in said each node is obtained each node load value separately by following processing: respectively the resource value of each resource information of this child node and resource load weights are done product and handle and obtain first end value, the first end value addition of various resource informations is obtained second end value, the node weights of said second end value and this child node are done the load value that the product processing obtains this child node; According to pre-configured rule; Load value in said each node is met this regular child node confirm as the child node of handling said task requests, wherein pre-configured rule is for selecting the minimum child node of load value in this each node
Said task requests is sent to the child node of determining,
Wherein said resource information comprises the information of a last task requests that disposes.
2. method according to claim 1 is characterized in that,
Said resource information also comprises the response message after state information and/or said each node of the platform of said each node are handled said task requests;
Handle before the method for figuring and various resource information determine the child node of handling said task requests in said least resource according to configuration, said various resource informations of sending respectively according to load balancing strategy and at least two node confirm that the child node of the said task requests of processing also comprises:
Judge in said each node, whether have disabled child node according to said state information and/or response message,
When not being judged as not, continue to carry out said least resource and handle the step that the method for figuring and various resource information are determined the child node of handling said task requests according to configuration,
When being judged as when being,, carrying out said least resource then and handle the step that the method for figuring and various resource information are determined the child node of handling said task requests according to configuration with said disabled child node deletion.
3. method according to claim 1; It is characterized in that; After said load-balanced server receives task requests; And before the various resource informations of sending respectively according to load balancing strategy and at least two node confirmed to handle the child node of said task requests, said method also comprised:
Load-balanced server judges whether to do load balance process,
When being judged as not, handle said task requests by this load-balanced server,
When being judged as when being, carry out the step that said various resource informations of sending respectively according to load balancing strategy and at least two node confirm to handle the child node of said task requests.
4. method according to claim 1; It is characterized in that; After said load-balanced server receives task requests; And before the various resource informations of sending respectively according to load balancing strategy and at least two node confirmed to handle the child node of said task requests, said method also comprised:
Load-balanced server judges according to said task requests whether the destination node of this task requests is said load-balanced server,
When being judged as when being, handle said task requests by this load-balanced server,
When not being judged as not, carries out the step of the child node of the said said task requests of the definite processing of various resource informations of sending respectively according to load balancing strategy and at least two node.
5. method according to claim 4; It is characterized in that; After said load-balanced server receives task requests, and before whether the destination node of judging this task requests according to task requests was said load-balanced server, said method also comprised:
Load-balanced server judges whether to do load balance process,
When being judged as not, handle said task requests by this load-balanced server,
When being judged as when being, carrying out and saidly judge according to task requests whether the destination node of this task requests is the step of said load-balanced server.
CN2010100022642A 2010-01-14 2010-01-14 Method for realizing load balance, load balanced server and group system Active CN101753461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010100022642A CN101753461B (en) 2010-01-14 2010-01-14 Method for realizing load balance, load balanced server and group system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010100022642A CN101753461B (en) 2010-01-14 2010-01-14 Method for realizing load balance, load balanced server and group system

Publications (2)

Publication Number Publication Date
CN101753461A CN101753461A (en) 2010-06-23
CN101753461B true CN101753461B (en) 2012-07-25

Family

ID=42479886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010100022642A Active CN101753461B (en) 2010-01-14 2010-01-14 Method for realizing load balance, load balanced server and group system

Country Status (1)

Country Link
CN (1) CN101753461B (en)

Families Citing this family (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447609B (en) * 2010-09-30 2014-11-05 中国移动通信集团公司 Deployment method and device for dummy nodes in virtualized resource system
CN102222174A (en) * 2011-02-22 2011-10-19 深圳华大基因科技有限公司 Gene computation system and method
CN102724104B (en) * 2011-03-30 2015-04-29 北京东方通科技股份有限公司 Apparatus and method for automatically configuring Java EE application cluster
CN102281329B (en) * 2011-08-02 2013-11-20 北京邮电大学 Resource scheduling method and system for platform as a service (Paas) cloud platform
CN102387071A (en) * 2011-10-12 2012-03-21 苏州阔地网络科技有限公司 Network load balancing method, processor and system
CN102609309B (en) * 2012-01-19 2018-08-21 南京中兴新软件有限责任公司 A kind of strategy scheduling system and method for cloud computing
CN104023319B (en) * 2013-02-28 2017-10-10 北京信威通信技术股份有限公司 A kind of method that Large Copacity short data works simultaneously with group service
CN103365718A (en) * 2013-06-28 2013-10-23 贵阳朗玛信息技术股份有限公司 Thread scheduling method, thread scheduling device and multi-core processor system
WO2015077958A1 (en) * 2013-11-28 2015-06-04 华为技术有限公司 Method, apparatus and system for controlling service traffic
CN104407923A (en) * 2014-10-31 2015-03-11 百度在线网络技术(北京)有限公司 Cluster task balancing method and device based on single node triggering
CN104639645A (en) * 2015-02-12 2015-05-20 广州神马移动信息科技有限公司 Method and device for balancing network load, and cluster service system
CN104731663B (en) * 2015-03-31 2018-04-13 北京奇艺世纪科技有限公司 Task processing method and system
CN105049509A (en) * 2015-07-23 2015-11-11 浪潮电子信息产业股份有限公司 Cluster scheduling method, load balancer and clustering system
CN105007337A (en) * 2015-08-20 2015-10-28 浪潮(北京)电子信息产业有限公司 Cluster system load balancing method and system thereof
CN105577759A (en) * 2015-12-15 2016-05-11 东软熙康健康科技有限公司 Server node allocation method and device
CN105553872A (en) * 2015-12-25 2016-05-04 浪潮(北京)电子信息产业有限公司 Multipath data traffic load equalizing method
CN107729126A (en) * 2016-08-12 2018-02-23 中国移动通信集团浙江有限公司 A kind of method for scheduling task and device of container cloud
CN108206789A (en) * 2016-12-20 2018-06-26 英业达科技有限公司 The SiteServer LBS and its method of segmented processing request
CN110362406B (en) * 2017-01-20 2020-12-25 腾讯科技(深圳)有限公司 Event processing method and device
CN107071002A (en) * 2017-03-22 2017-08-18 山东中创软件商用中间件股份有限公司 A kind of application server cluster request scheduling method and device
CN107302580B (en) * 2017-06-30 2020-05-29 北京金山安全软件有限公司 Load balancing method and device, load balancer and storage medium
CN107341057A (en) * 2017-07-07 2017-11-10 郑州云海信息技术有限公司 A kind of data processing method and device
CN107317880B (en) * 2017-08-08 2020-05-26 苏州浪潮智能科技有限公司 Method and device for realizing load balance
CN107800768B (en) * 2017-09-13 2020-01-10 平安科技(深圳)有限公司 Open platform control method and system
CN108156236B (en) * 2017-12-22 2021-05-25 平安养老保险股份有限公司 Service request processing method and device, computer equipment and storage medium
CN107862615A (en) * 2017-12-22 2018-03-30 平安养老保险股份有限公司 Claims Resolution information processing method, device, computer equipment and storage medium
CN108156235A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Online verification method, apparatus, computer equipment and storage medium
TWI689823B (en) * 2018-01-04 2020-04-01 財團法人工業技術研究院 Method and server for dynamic work transfer
CN108762924A (en) * 2018-05-28 2018-11-06 郑州云海信息技术有限公司 A kind of method, apparatus and computer readable storage medium of load balancing
CN110895474A (en) * 2018-08-24 2020-03-20 深圳市鸿合创新信息技术有限责任公司 Terminal micro-service device and method and electronic equipment
CN109918152A (en) * 2019-03-18 2019-06-21 中科麦迪人工智能研究院(苏州)有限公司 Task executing method, device, server and storage medium based on policy flow
CN110213358A (en) * 2019-05-23 2019-09-06 深圳壹账通智能科技有限公司 Method, node, equipment and the storage medium of cluster resource scheduling
CN110855762B (en) * 2019-10-31 2022-07-22 云南电网有限责任公司信息中心 Data block distribution method for heterogeneous cluster nodes in power grid system
CN110933136A (en) * 2019-10-31 2020-03-27 北京浪潮数据技术有限公司 Service node selection method, device, equipment and readable storage medium
CN111061697B (en) * 2019-12-25 2023-06-13 中国联合网络通信集团有限公司 Log data processing method and device, electronic equipment and storage medium
CN111930523A (en) * 2020-09-28 2020-11-13 支付宝(杭州)信息技术有限公司 Load balancing method and system for service cluster
CN116711286A (en) * 2021-01-13 2023-09-05 Oppo广东移动通信有限公司 Node determination method, device, equipment and medium for distributed tasks
CN113282405B (en) * 2021-04-13 2023-09-15 福建天泉教育科技有限公司 Load adjustment optimization method and terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434393A (en) * 2003-02-24 2003-08-06 武汉大学 Dynamic loading balance method for cluster server

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434393A (en) * 2003-02-24 2003-08-06 武汉大学 Dynamic loading balance method for cluster server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
曹英存.集群系统下的动态负载均衡探究.《和田师范专科学校学报》.2006,第26卷(第二期),第159页左栏第7-9段,右栏第2-4段. *
郑祺.基于集群的Web服务器负载均衡算法研究.《浙江科技学院学报》.2009,第21卷(第1期),第15页左栏第2段,第16页左栏第6段,第16页右栏第1-3段,第17页左栏第1段. *

Also Published As

Publication number Publication date
CN101753461A (en) 2010-06-23

Similar Documents

Publication Publication Date Title
CN101753461B (en) Method for realizing load balance, load balanced server and group system
Lv et al. Communication-aware container placement and reassignment in large-scale internet data centers
CN103516807B (en) A kind of cloud computing platform server load balancing system and method
EP0540151B1 (en) Method of operating a computer in a network
CN109347947A (en) A kind of method of load balancing, name server and cluster nas server
CN103401947A (en) Method and device for allocating tasks to multiple servers
KR101867286B1 (en) Distributed processing apparatus and method for big data using hardware acceleration based on work load
CN105516369A (en) Video cloud platform load balancing method and video cloud platform load balancing dispatcher
CN101986272A (en) Task scheduling method under cloud computing environment
EP2789147B1 (en) Method and apparatus for load balancing in communication system
CN102004673A (en) Processing method and system of multi-core processor load balancing
EP3163446A1 (en) Data storage method and data storage management server
JP2000268012A (en) Method and device for distributing load in client server system
CN102158346A (en) Information acquisition system and method based on cloud computing
CN104067578A (en) Dynamic load balancing without packet reordering
CN102970244A (en) Network message processing method of multi-CPU (Central Processing Unit) inter-core load balance
CN102946429A (en) High-efficiency dynamic resource scheduling method based on cloud storage
JP2019121334A (en) Data storage and dynamic migration method, and data storage and dynamic migration device
CN102932271A (en) Method and device for realizing load balancing
CN104426694A (en) Method and device for adjusting virtual-machine resources
CN101778050A (en) Load balancing method, device and system
CN110351376A (en) A kind of edge calculations node selecting method based on negative feedback mechanism
Mukhopadhyay et al. A study on the application of existing load balancing algorithms for large, dynamic, heterogeneous distributed systems
CN113835823A (en) Resource scheduling method and device, electronic equipment and computer readable storage medium
Patel et al. A survey on load balancing in cloud computing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant