CN104407923A - Cluster task balancing method and device based on single node triggering - Google Patents
Cluster task balancing method and device based on single node triggering Download PDFInfo
- Publication number
- CN104407923A CN104407923A CN201410601792.8A CN201410601792A CN104407923A CN 104407923 A CN104407923 A CN 104407923A CN 201410601792 A CN201410601792 A CN 201410601792A CN 104407923 A CN104407923 A CN 104407923A
- Authority
- CN
- China
- Prior art keywords
- task
- pending
- server node
- node
- cluster
- 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
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a cluster task balancing method based on single node triggering and a cluster task balancing device based on the single node triggering. The cluster task balancing method based on the single node triggering comprises the steps of regularly or periodically selecting available server nodes in a cluster; sending a triggering request to the available server nodes, wherein the triggering request carries the name of a to-be-handled task, so that the available server nodes are triggered to execute the to-be-handled task. By applying the method and the device, the task dispatch in the cluster can be realized based on single nodes; task loads can be dispersed relatively uniformly in the cluster, so that the cluster server resource can be utilized better.
Description
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of cluster task equalization methods based on single node triggering and device.
Background technology
In prior art, for avoiding individual server load excessive, need task to carry out load balancing in the cluster.In a kind of feasible technical scheme, when only having single node run timing task, single node is generally by running crontab or use Quartz timing operation task in Java application, but this scheme can only be executed the task on a single node, even if there is multiple node to use, also only have a station server to work, to get on execution by all machines task cannot be put into equably in cluster.
Another kind of feasible technical scheme, message is delivered in the cluster by message-oriented middleware, Stochastic choice recipient Processing tasks, this technical scheme needs message-oriented middleware, and the task that could realize in cluster is distributed to require this message-oriented middleware support to deliver at random.And this technical scheme is carried out task between cluster by message mechanism and is triggered, and time precision is not high, easily has delay.
Summary of the invention
Object of the present invention is intended to solve one of technical matters in correlation technique at least to a certain extent.
For this reason, first object of the present invention is to propose a kind of cluster task equalization methods triggered based on single node.The method realizes the task scheduling in cluster based on single node, can decentralized task load in the cluster relatively uniformly, thus can utilize cluster server resource better.
Second object of the present invention is to propose a kind of cluster task equalization methods triggered based on single node, in the method, after receiving the trigger request of trigger node, perform pending task, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
3rd object of the present invention is to propose a kind of cluster task equalizing device triggered based on single node.
4th object of the present invention is to propose a kind of cluster task equalizing device triggered based on single node.
In order to realize above-described embodiment, the cluster task equalization methods based on single node triggering of first aspect present invention embodiment comprises: the available server node in timing or periodically selection cluster; Send trigger request to described available server node, in described trigger request, carry the title of pending task, perform described pending task to trigger described available server node.
The cluster task equalization methods triggered based on single node of the embodiment of the present invention, timing or periodically selection available server node, and send trigger request to above-mentioned available server node, the title of pending task is carried in above-mentioned trigger request, pending task is performed to trigger above-mentioned available server node, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
In order to realize above-described embodiment, the cluster task equalization methods based on single node triggering of second aspect present invention embodiment comprises: the trigger request receiving trigger node timing or periodically send, and carries the title of pending task in described trigger request; After determining to perform described pending task according to the title of described pending task, perform described pending task.
The cluster task equalization methods triggered based on single node of the embodiment of the present invention, after receiving the trigger request of trigger node, perform pending task, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
In order to realize above-described embodiment, the cluster task equalizing device based on single node triggering of third aspect present invention embodiment comprises: select module, selects the available server node in cluster for timing or periodicity; Sending module, sends trigger request for the available server node to described selection model choice, carries the title of pending task in described trigger request, performs described pending task to trigger described available server node.
The cluster task equalizing device triggered based on single node of the embodiment of the present invention, select module timing or periodically select available server node, sending module sends trigger request to above-mentioned available server node, the title of pending task is carried in above-mentioned trigger request, pending task is performed to trigger above-mentioned available server node, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
In order to realize above-described embodiment, the cluster task equalizing device based on single node triggering of fourth aspect present invention embodiment comprises: receiver module, for the trigger request receiving trigger node timing or periodically send, in described trigger request, carry the title of pending task; Determination module, the title for the pending task received according to described receiver module determines whether to perform described pending task; Execution module, for determine to perform described pending task at described determination module after, performs described pending task.
The cluster task equalizing device triggered based on single node of the embodiment of the present invention, receiver module receives the trigger request of trigger node, after determination module determines to perform above-mentioned pending task, execution module performs above-mentioned pending task, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or additional aspect and advantage will become obvious and easy understand from the following description of the accompanying drawings of embodiments, wherein:
Fig. 1 is the process flow diagram that the present invention is based on the cluster task equalization methods embodiment that single node triggers;
Fig. 2 is the process flow diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers;
Fig. 3 is the deployment schematic diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers;
Fig. 4 is the process flow diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers;
Fig. 5 is the process flow diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers;
Fig. 6 is the deployment schematic diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers;
Fig. 7 is the structural representation that the present invention is based on the cluster task equalizing device embodiment that single node triggers;
Fig. 8 is the structural representation that the present invention is based on another embodiment of cluster task equalizing device that single node triggers;
Fig. 9 is the structural representation that the present invention is based on another embodiment of cluster task equalizing device that single node triggers.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.On the contrary, embodiments of the invention comprise fall into attached claims spirit and intension within the scope of all changes, amendment and equivalent.
Fig. 1 is the process flow diagram that the present invention is based on the cluster task equalization methods embodiment that single node triggers, and as shown in Figure 1, the cluster task equalization methods that should trigger based on single node can comprise:
Step 101, timing or periodically selection available server node.
Particularly, selection available server node can be: from the server node catalogue of static configuration, select available server node; Or, obtain available server node from service locator or server configuration center.
When specific implementation, a node in the cluster can configure timing or periodic task, such as: can the timing of configuration task be carried out by the crontab order of linux or periodically perform.The responsibility of this timing or periodic task is the available server node in Stochastic choice cluster, such as can from the server node catalogue of static configuration Stochastic choice available server node, or an available server node can be obtained at random from service locator or server configuration center, then go to trigger concrete task processing logic.
Step 102, sends trigger request to above-mentioned available server node, carries the title of pending task in above-mentioned trigger request, performs above-mentioned pending task to trigger above-mentioned available server node.
When specific implementation, trigger and CURL order initiation REST only need be utilized simply to ask.By providing a task process framework, in this task process framework, unified HTTP REST interface can be provided, being responsible for receiving HTML (Hypertext Markup Language) (Hypertext Transfer Protocol; Hereinafter referred to as: HTTP) request, print service daily record, process parameter and task asynchronous execution, business only need realize concrete Processing Interface, is responsible for service logic specially.
In above-described embodiment, timing or periodically selection available server node, and send trigger request to above-mentioned available server node, the title of pending task is carried in above-mentioned trigger request, pending task is performed to trigger above-mentioned available server node, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
Fig. 2 is the process flow diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers, and as shown in Figure 2, the method can comprise:
Step 201, trigger node timing or periodically selection available server node.
Particularly, selection available server node can be: from the server node catalogue of static configuration, select available server node; Or, obtain available server node from service locator or server configuration center.
Wherein, trigger node is a node in cluster, configuration timing or periodic task on trigger node, such as: can carry out the timing of configuration task by the crontab order of linux or periodically perform.The responsibility of this timing or periodic task makes the available server node in trigger node Stochastic choice cluster, such as: trigger node can from the server node catalogue of static configuration Stochastic choice available server node, or trigger node can obtain an available server node at random from service locator or server configuration center, then go to trigger concrete task processing logic.
Step 202, trigger node sends trigger request to above-mentioned available server node, carries the title of pending task in above-mentioned trigger request.
Step 203, available server node determines whether to perform above-mentioned pending task according to the title of pending task.
Particularly, according to the title of pending task, available server node can determine whether above-mentioned pending task is performed by self, if so, then performs above-mentioned pending task; If according to the title of pending task, available server node determines that above-mentioned pending task is not performed by self, then available server node does not perform above-mentioned pending task.
When available server node performs above-mentioned pending task, if available server node determines that pending task performed, and again perform this pending task result obtained and coming to the same thing of obtaining before, then available server node can simplify the implementation of above-mentioned pending task, such as: only can carry out pre-service to above-mentioned pending task, no longer perform concrete operation flow.
Step 204, available server node sends to trigger node and triggers response.
Particularly, if available server node is determined to perform above-mentioned pending task, then carry the instruction that available server node determines to perform above-mentioned pending task in above-mentioned triggering response; If available server node is determined not perform above-mentioned pending task, then carry the instruction that available server node determines not perform above-mentioned pending task in above-mentioned triggering response.
When available server node is determined to perform above-mentioned pending task, perform step 205; When available server node is determined not perform above-mentioned pending task, this flow process terminates.
Step 205, available server node asynchronous performs above-mentioned pending task.
In above-described embodiment, trigger node timing or periodically selection available server node, and send trigger request to above-mentioned available server node, the title of pending task is carried in above-mentioned trigger request, after receiving the trigger request of trigger node, available server node performs pending task, thus can realize the task scheduling in cluster based on single node, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
Fig. 3 is the deployment schematic diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers, and in Fig. 3, APP-1-1 is trigger node.
As shown in Figure 3, the method can comprise:
Step 301, the upper configuration timing of APP-1-1 or periodic task.
Such as: can the timing of configuration task be carried out by the crontab order of linux or periodically perform.
Step 302, APP-1-1, according to timing or the scheduling of periodic task, selects the available server node in cluster.
Particularly, APP-1-1 can from the server node catalogue of static configuration Stochastic choice available server node, or APP-1-1 can obtain an available server node at random from service locator or server configuration center, then go to trigger concrete task processing logic.
In Fig. 3, APP-1-X is the available server node that APP-1-1 selects.
Step 303, APP-1-1 sends trigger request to APP-1-X, carries the title of pending task in above-mentioned trigger request, performs above-mentioned pending task to trigger APP-1-X.
Above-described embodiment can realize the task scheduling in cluster based on single node, can decentralized task load in the cluster relatively uniformly, thus can utilize cluster server resource better.
Fig. 4 is the process flow diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers, and as shown in Figure 4, the method can comprise:
Step 401, the trigger request receiving trigger node timing or periodically send, carries the title of pending task in above-mentioned trigger request.
Step 402, after determining to perform above-mentioned pending task, performs above-mentioned pending task according to the title of above-mentioned pending task.
Particularly, according to the title of pending task, available server node can determine whether above-mentioned pending task is performed by self, if so, then performs above-mentioned pending task; If according to the title of pending task, available server node determines that above-mentioned pending task is not performed by self, then available server node does not perform above-mentioned pending task.
In the present embodiment, performing above-mentioned pending task can be: above-mentioned pending task is split as at least two pending subtasks, and selects to perform at least one server node of above-mentioned at least two pending subtasks; Then above-mentioned at least two pending subtasks are sent at least one server node respectively, perform above-mentioned at least two pending subtasks respectively by least one server node.
That is, in the present embodiment, after determining to perform pending task, available server node oneself can perform above-mentioned pending task, so just achieve on the server node that the execution of task is distributed in cluster, but when running into large task, only to do like this or cannot effectively dispersive pressure, so, pending task can also be split as at least two pending subtasks by available server node, then at least one server node performing above-mentioned at least two pending subtasks is selected, above-mentioned at least two pending subtasks are performed respectively by least one server node.Particularly, the available server node of at least two pending subtasks can be performed by Stochastic choice, then transfer to random at least one selected available server node to carry out the execution of task at least two pending subtasks.
Wherein, at least one server node performing above-mentioned at least two pending subtasks is selected to be: at least one server node selecting to perform at least two pending subtasks from the server node catalogue of static configuration; Or, at least one server node performing above-mentioned at least two pending subtasks is obtained from service locator or server configuration center.
In addition, in the present embodiment, the trigger request receiving the transmission of trigger node periodicity can be: receive the trigger request that trigger node sent according to the period 1; Performing above-mentioned pending task can be: perform above-mentioned pending task according to second round; Wherein, the period 1 is the multiple of second round.
That is, the present embodiment achieves the function performed continuously after single triggers, for example, it was 60 seconds when the period 1, second round, when being 10 second, every 60 seconds trigger node send trigger request once, but perform requirement be 10 seconds once, at this moment in 60 seconds of available server node before next trigger request arrives, every 10 seconds oneself perform once, realize high-precision triggering thus.
In above-described embodiment, after available server node receives the trigger request of trigger node, perform pending task, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better, and pending task can also be split as at least two pending subtasks by available server node, thus more effectively realize load balancing in the cluster, also achieve the function performed continuously after single triggers in addition, thus high-precision triggering can be realized.
Fig. 5 is the process flow diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers, and as shown in Figure 5, the method can comprise:
Step 501, trigger node timing or periodically selection available server node.
Particularly, selection available server node can be: from the server node catalogue of static configuration, select available server node; Or, obtain available server node from service locator or server configuration center.
Wherein, trigger node is a node in cluster, configuration timing or periodic task on trigger node, such as: can carry out the timing of configuration task by the crontab order of linux or periodically perform.The responsibility of this timing or periodic task makes the available server node in trigger node Stochastic choice cluster, such as: trigger node can from the server node catalogue of static configuration Stochastic choice available server node, or trigger node can obtain an available server node at random from service locator or server configuration center, then go to trigger concrete task processing logic.
Step 502, trigger node sends trigger request to above-mentioned available server node, carries the title of pending task in above-mentioned trigger request.
Step 503, available server node determines whether to perform above-mentioned pending task according to the title of pending task.
Particularly, according to the title of pending task, available server node can determine whether above-mentioned pending task is performed by self, if so, then performs above-mentioned pending task; If according to the title of pending task, available server node determines that above-mentioned pending task is not performed by self, then available server node does not perform above-mentioned pending task.
When available server node performs above-mentioned pending task, if available server node determines that pending task performed, and again perform this pending task result obtained and coming to the same thing of obtaining before, then available server node can simplify the implementation of above-mentioned pending task, such as: only can carry out pre-service to above-mentioned pending task, no longer perform concrete operation flow.
Step 504, available server node sends to trigger node and triggers response.
Particularly, if available server node is determined to perform above-mentioned pending task, then carry the instruction that available server node determines to perform above-mentioned pending task in above-mentioned triggering response; If available server node is determined not perform above-mentioned pending task, then carry the instruction that available server node determines not perform above-mentioned pending task in above-mentioned triggering response.
When available server node is determined to perform above-mentioned pending task, perform step 205; When available server node is determined not perform above-mentioned pending task, this flow process terminates.
Step 505, above-mentioned pending task is split as at least two pending subtasks by available server node, and selects at least one server node performing above-mentioned at least two pending subtasks.
Wherein, at least one server node performing above-mentioned at least two pending subtasks is selected to be: at least one server node selecting to perform at least two pending subtasks from the server node catalogue of static configuration; Or, at least one server node performing above-mentioned at least two pending subtasks is obtained from service locator or server configuration center.
Step 506, at least two pending subtasks are sent at least one server node by available server node respectively.
In the present embodiment, at least two after fractionation pending subtasks can be issued same server node and be performed, and different server nodes also can be sent to respectively to perform; Or divide into groups at least two pending subtasks, the subtask belonging to same group sends to same server node to perform, the subtask belonging to different group sends to different server nodes.
Step 507, at least one server node is above-mentioned at least two the pending subtasks of asynchronous execution respectively.
In above-described embodiment, after available server node receives the trigger request of trigger node, perform pending task, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better, and pending task can also be split as at least two pending subtasks by available server node, thus more effectively realize load balancing in the cluster.
Fig. 6 is the deployment schematic diagram that the present invention is based on another embodiment of cluster task equalization methods that single node triggers, and in Fig. 6, APP-1-1 is trigger node.
As shown in Figure 6, the method can comprise:
Step 601, the upper configuration timing of APP-1-1 or periodic task.
Such as: can the timing of configuration task be carried out by the crontab order of linux or periodically perform.
Step 602, APP-1-1, according to timing or the scheduling of periodic task, selects the available server node in cluster.
Particularly, APP-1-1 can from the server node catalogue of static configuration Stochastic choice available server node, or APP-1-1 can obtain an available server node at random from service locator or server configuration center, then go to trigger concrete task processing logic.
In Fig. 6, APP-1-X is the available server node that APP-1-1 selects.
Step 603, APP-1-1 sends trigger request to APP-1-X, carries the title of pending task in above-mentioned trigger request, performs above-mentioned pending task to trigger APP-1-X.
Step 604, APP-1-X determines to perform after above-mentioned pending task, above-mentioned pending task is split as at least two pending subtasks.
Particularly, APP-1-X according to the title of pending task determine above-mentioned pending task be performed by self time, then perform above-mentioned pending task.
Step 605, APP-1-X selects at least one server node performing above-mentioned at least two pending subtasks.
Step 606, at least two pending subtasks are sent at least one server node by APP-1-X respectively, perform above-mentioned at least two pending subtasks respectively by least one server node.
In Fig. 6, APP-1-N ..., APP-1-M is at least one server node that APP-1-X selects.
Above-described embodiment can realize the task scheduling in cluster based on single node, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better, and pending task can also be split as at least two pending subtasks by APP-1-X, thus more effectively realizes load balancing in the cluster.
Fig. 7 is the structural representation that the present invention is based on the cluster task equalizing device embodiment that single node triggers, the cluster task equalizing device based on single node triggering in the present embodiment can realize the present invention's flow process embodiment illustrated in fig. 1, as shown in Figure 7, this device can comprise: select module 71 and sending module 72;
Wherein, select module 71, select the available server node in cluster for timing or periodicity;
In the present embodiment, select module 71, specifically for selecting available server node from the server node catalogue of static configuration; Or, obtain available server node from service locator or server configuration center.
When specific implementation, module 71 is selected to carry out the timing of configuration task by the crontab order of linux or periodically to perform.The responsibility of this timing or periodic task is the available server node in Stochastic choice cluster, such as can from the server node catalogue of static configuration Stochastic choice available server node, or an available server node can be obtained at random from service locator or server configuration center, then go to trigger concrete task processing logic.
Sending module 72, for sending trigger request to the available server node selecting module 71 to select, carries the title of pending task in above-mentioned trigger request, perform above-mentioned pending task to trigger above-mentioned available server node.
When specific implementation, sending module 72 sends trigger request and CURL order initiation REST only need be utilized simply to ask.
The cluster task equalizing device based on single node triggering in the present embodiment can be trigger node, and also can be a part for trigger node, the present embodiment be not construed as limiting this; Wherein, above-mentioned trigger node can be a server in cluster.
In the above-mentioned cluster task equalizing device based on single node triggering, select module 71 timing or periodically select available server node, sending module 72 sends trigger request to above-mentioned available server node, the title of pending task is carried in above-mentioned trigger request, pending task is performed to trigger above-mentioned available server node, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better.
Fig. 8 is the structural representation that the present invention is based on another embodiment of cluster task equalizing device that single node triggers, the cluster task equalizing device based on single node triggering in the present embodiment can realize the present invention's flow process embodiment illustrated in fig. 4, as shown in Figure 8, this device can comprise: receiver module 81, determination module 82 and execution module 83;
Wherein, receiver module 81, for the trigger request receiving trigger node timing or periodically send, carries the title of pending task in above-mentioned trigger request.
Determination module 82, the title for the pending task received according to receiver module 81 determines whether to perform above-mentioned pending task; Particularly, according to the title of pending task, determination module 82 can determine whether above-mentioned pending task is performed by the above-mentioned cluster task equalizing device triggered based on single node, and if so, then determination module 82 is determined to perform above-mentioned pending task; If according to the title of pending task, determination module 82 determines that above-mentioned pending task is not performed by the above-mentioned cluster task equalizing device triggered based on single node, then determination module 82 is determined not perform above-mentioned pending task.
Execution module 83, for determine to perform above-mentioned pending task at determination module 82 after, performs above-mentioned pending task.Particularly, when execution module 83 performs above-mentioned pending task, if determine that above-mentioned pending task performed, and again perform this pending task result obtained and coming to the same thing of obtaining before, then execution module 83 can simplify the implementation of above-mentioned pending task, such as: only can carry out pre-service to above-mentioned pending task, no longer perform concrete operation flow.
In the present embodiment, receiver module 81, specifically for receiving the trigger request that trigger node sent according to the period 1; Execution module 83, specifically for according to second round perform above-mentioned pending task; Wherein, the period 1 is the multiple of second round.
That is, the cluster task equalizing device based on single node triggering in the present embodiment achieves the function performed continuously after single triggers, for example, it was 60 seconds when the period 1, second round is when being 10 second, every 60 seconds trigger node send trigger request once, that is, receiver module 81 receives trigger request once every 60 seconds, but perform requirement be 10 seconds once, at this moment in 60 seconds of execution module 83 before next trigger request arrives, every 10 seconds oneself perform once, realize high-precision triggering thus.
The cluster task equalizing device based on single node triggering in the present embodiment can be available server node, or a part for available server node, and the present embodiment is not construed as limiting this.Wherein, above-mentioned available server node can be a server in cluster.
In the above-mentioned cluster task equalizing device based on single node triggering, after receiver module 81 receives the trigger request of trigger node, execution module 83 performs pending task, thus the task scheduling that can realize based on single node in cluster, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better, and achieve the function performed continuously after single triggers, thus high-precision triggering can be realized.
Fig. 9 is the structural representation that the present invention is based on another embodiment of cluster task equalizing device that single node triggers, compared with the cluster task equalizing device triggered based on single node shown in Fig. 8, difference is, execution module 83 can comprise: split submodule 831, chooser module 832 and send submodule 833;
Wherein, split submodule 831, for above-mentioned pending task being split as at least two pending subtasks;
Chooser module 832, for selecting to perform at least one server node splitting at least two pending subtasks that submodule 831 splits;
Send submodule 833, for at least one server node that will split the pending subtask of submodule 831 at least two of splitting and send to chooser module 832 to select respectively, perform above-mentioned at least two pending subtasks respectively by least one server node above-mentioned.
That is, in the present embodiment, after determination module 82 determines to perform pending task, execution module 83 oneself can perform above-mentioned pending task, so just achieve on the server node that the execution of task is distributed in cluster, but when running into large task, only to do like this or cannot effectively dispersive pressure, so, pending task can also be split as at least two pending subtasks by the fractionation submodule 831 in execution module 83, then chooser module 832 selects at least one server node performing above-mentioned at least two pending subtasks, above-mentioned at least two pending subtasks are performed respectively by least one server node.Particularly, the available server node of at least two pending subtasks can be performed by Stochastic choice, then transfer to random at least one selected available server node to carry out the execution of task at least two pending subtasks.
Particularly, chooser module 832, can select at least one server node performing above-mentioned at least two pending subtasks from the server node catalogue of static configuration; Or, at least one server node performing above-mentioned at least two pending subtasks is obtained from service locator or server configuration center.
The above-mentioned cluster task equalizing device triggered based on single node can realize the task scheduling in cluster based on single node, can decentralized task load in the cluster relatively uniformly, thus cluster server resource can be utilized better, and pending task can also be split as at least two pending subtasks by available server node, thus more effectively realize load balancing in the cluster, also achieve the function performed continuously after single triggers in addition, thus high-precision triggering can be realized.
It should be noted that, in describing the invention, term " first ", " second " etc. only for describing object, and can not be interpreted as instruction or hint relative importance.In addition, in describing the invention, except as otherwise noted, the implication of " multiple " is two or more.
Describe and can be understood in process flow diagram or in this any process otherwise described or method, represent and comprise one or more for realizing the module of the code of the executable instruction of the step of specific logical function or process, fragment or part, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can not according to order that is shown or that discuss, comprise according to involved function by the mode while of basic or by contrary order, carry out n-back test, this should understand by embodiments of the invention person of ordinary skill in the field.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple step or method can with to store in memory and the software performed by suitable instruction execution system or firmware realize.Such as, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: the discrete logic with the logic gates for realizing logic function to data-signal, there is the special IC of suitable combinational logic gate circuit, programmable gate array (Programmable Gate Array; Hereinafter referred to as: PGA), field programmable gate array (Field ProgrammableGate Array; Hereinafter referred to as: FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, this program perform time, step comprising embodiment of the method one or a combination set of.
In addition, each functional module in each embodiment of the present invention can be integrated in a processing module, also can be that the independent physics of modules exists, also can two or more module integrations in a module.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.If described integrated module using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained at least one embodiment of the present invention or example.In this manual, identical embodiment or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more embodiment or example.
Although illustrate and describe embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, and those of ordinary skill in the art can change above-described embodiment within the scope of the invention, revises, replace and modification.
Claims (12)
1., based on the cluster task equalization methods that single node triggers, it is characterized in that, comprising:
Available server node in timing or periodically selection cluster;
Send trigger request to described available server node, in described trigger request, carry the title of pending task, perform described pending task to trigger described available server node.
2. method according to claim 1, is characterized in that, the available server node in described selection cluster comprises:
Available server node is selected from the server node catalogue of static configuration; Or,
Available server node is obtained from service locator or server configuration center.
3., based on the cluster task equalization methods that single node triggers, it is characterized in that, comprising:
The trigger request receiving trigger node timing or periodically send, carries the title of pending task in described trigger request;
After determining to perform described pending task according to the title of described pending task, perform described pending task.
4. method according to claim 3, is characterized in that, the described pending task of described execution comprises:
Described pending task is split as at least two pending subtasks, and at least one server node of at least two pending subtasks described in selecting to perform;
Described at least two pending subtasks are sent at least one server node described respectively, at least two pending subtasks described at least one server node described performs respectively.
5. method according to claim 4, is characterized in that, selects at least one server node of at least two pending subtasks described in performing to comprise:
At least one server node of at least two pending subtasks described in performing is selected from the server node catalogue of static configuration; Or,
From service locator or server configuration center obtain perform described at least one server nodes of at least two pending subtasks.
6. the method according to claim 3-5 any one, is characterized in that, the trigger request that described reception trigger node periodically sends comprises: receive the trigger request that trigger node sent according to the period 1;
The described pending task of described execution comprises: perform described pending task according to second round;
Wherein, the described period 1 is the multiple of described second round.
7., based on the cluster task equalizing device that single node triggers, it is characterized in that, comprising:
Select module, select the available server node in cluster for timing or periodicity;
Sending module, sends trigger request for the available server node to described selection model choice, carries the title of pending task in described trigger request, performs described pending task to trigger described available server node.
8. device according to claim 7, is characterized in that,
Described selection module, specifically for selecting available server node from the server node catalogue of static configuration; Or, obtain available server node from service locator or server configuration center.
9., based on the cluster task equalizing device that single node triggers, it is characterized in that, comprising:
Receiver module, for the trigger request receiving trigger node timing or periodically send, carries the title of pending task in described trigger request;
Determination module, the title for the pending task received according to described receiver module determines whether to perform described pending task;
Execution module, for determine to perform described pending task at described determination module after, performs described pending task.
10. device according to claim 9, is characterized in that, described execution module comprises:
Split submodule, for described pending task being split as at least two pending subtasks;
Chooser module, for selecting to perform at least one server node of described fractionation submodule splits at least two pending subtasks;
Send submodule, at least two for described fractionation submodule being split pending subtasks send at least one server node of described chooser model choice respectively, at least two pending subtasks described at least one server node described performs respectively.
11. devices according to claim 10, is characterized in that,
Described chooser module, specifically at least one server node of at least two pending subtasks described in selecting to perform from the server node catalogue of static configuration; Or, from service locator or server configuration center obtain perform described at least one server nodes of at least two pending subtasks.
12. devices according to claim 9-11 any one, is characterized in that,
Described receiver module, specifically for receiving the trigger request that trigger node sent according to the period 1;
Described execution module, specifically for according to second round perform described pending task;
Wherein, the described period 1 is the multiple of described second round.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410601792.8A CN104407923A (en) | 2014-10-31 | 2014-10-31 | Cluster task balancing method and device based on single node triggering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410601792.8A CN104407923A (en) | 2014-10-31 | 2014-10-31 | Cluster task balancing method and device based on single node triggering |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104407923A true CN104407923A (en) | 2015-03-11 |
Family
ID=52645556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410601792.8A Pending CN104407923A (en) | 2014-10-31 | 2014-10-31 | Cluster task balancing method and device based on single node triggering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104407923A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301178A (en) * | 2016-04-14 | 2017-10-27 | 阿里巴巴集团控股有限公司 | Data query processing method, apparatus and system |
CN110166306A (en) * | 2019-06-14 | 2019-08-23 | 上海富欣智能交通控制有限公司 | Data communications method and system |
CN113238839A (en) * | 2021-04-26 | 2021-08-10 | 深圳微品致远信息科技有限公司 | Cloud computing based data management method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060136600A1 (en) * | 2004-11-30 | 2006-06-22 | International Business Machines Corporation | A Method, System and Computer Program for Addressing a Web Service |
CN101753461A (en) * | 2010-01-14 | 2010-06-23 | 中国建设银行股份有限公司 | Method for realizing load balance, load balanced server and group system |
CN102096602A (en) * | 2009-12-15 | 2011-06-15 | 中国移动通信集团公司 | Task scheduling method, and system and equipment thereof |
US20110231888A1 (en) * | 1998-08-21 | 2011-09-22 | Corporate Media Partners D/B/A Americast | System and method for a master scheduler |
CN102541640A (en) * | 2011-12-28 | 2012-07-04 | 厦门市美亚柏科信息股份有限公司 | Cluster GPU (graphic processing unit) resource scheduling system and method |
CN102681881A (en) * | 2011-03-07 | 2012-09-19 | 中国银联股份有限公司 | Cross-computer scheduling method and system thereof |
CN103793272A (en) * | 2013-12-27 | 2014-05-14 | 北京天融信软件有限公司 | Periodical task scheduling method and periodical task scheduling system |
-
2014
- 2014-10-31 CN CN201410601792.8A patent/CN104407923A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110231888A1 (en) * | 1998-08-21 | 2011-09-22 | Corporate Media Partners D/B/A Americast | System and method for a master scheduler |
US20060136600A1 (en) * | 2004-11-30 | 2006-06-22 | International Business Machines Corporation | A Method, System and Computer Program for Addressing a Web Service |
CN102096602A (en) * | 2009-12-15 | 2011-06-15 | 中国移动通信集团公司 | Task scheduling method, and system and equipment thereof |
CN101753461A (en) * | 2010-01-14 | 2010-06-23 | 中国建设银行股份有限公司 | Method for realizing load balance, load balanced server and group system |
CN102681881A (en) * | 2011-03-07 | 2012-09-19 | 中国银联股份有限公司 | Cross-computer scheduling method and system thereof |
CN102541640A (en) * | 2011-12-28 | 2012-07-04 | 厦门市美亚柏科信息股份有限公司 | Cluster GPU (graphic processing unit) resource scheduling system and method |
CN103793272A (en) * | 2013-12-27 | 2014-05-14 | 北京天融信软件有限公司 | Periodical task scheduling method and periodical task scheduling system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301178A (en) * | 2016-04-14 | 2017-10-27 | 阿里巴巴集团控股有限公司 | Data query processing method, apparatus and system |
CN107301178B (en) * | 2016-04-14 | 2021-07-02 | 创新先进技术有限公司 | Data query processing method, device and system |
CN110166306A (en) * | 2019-06-14 | 2019-08-23 | 上海富欣智能交通控制有限公司 | Data communications method and system |
CN113238839A (en) * | 2021-04-26 | 2021-08-10 | 深圳微品致远信息科技有限公司 | Cloud computing based data management method and device |
CN113238839B (en) * | 2021-04-26 | 2022-04-12 | 深圳微品致远信息科技有限公司 | Cloud computing based data management method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10338964B1 (en) | Computing node job assignment for distribution of scheduling operations | |
US11748154B2 (en) | Computing node job assignment using multiple schedulers | |
CN115328663B (en) | Method, device, equipment and storage medium for scheduling resources based on PaaS platform | |
CN105100259A (en) | Distributed timed task execution method and system | |
US20190332423A1 (en) | Workflow Service for a Cloud Foundry Platform | |
US9559906B2 (en) | Server load management | |
CN104407923A (en) | Cluster task balancing method and device based on single node triggering | |
CN109062681A (en) | A kind of execution method, system, device and the storage medium of periodic cycle task | |
US20200310828A1 (en) | Method, function manager and arrangement for handling function calls | |
CN114064199A (en) | Cluster capacity management method and system | |
CN111352726B (en) | Stream data processing method and device based on containerized micro-service | |
US20230123350A1 (en) | Containerized workload management in container computing environment | |
CN111124708B (en) | Microservice-oriented batch reasoning method, server and computer readable storage medium | |
CN116599828A (en) | Task execution method and device, storage medium and electronic equipment | |
US10701167B1 (en) | Adaptive quorum for a message broker service | |
CN102932389A (en) | Request processing method and device, and server system | |
Bellavista et al. | GAMESH: a grid architecture for scalable monitoring and enhanced dependable job scheduling | |
CN106447755A (en) | Animation rendering system | |
Pachghare | Microservices architecture for cloud computing | |
CN113485828B (en) | Distributed task scheduling system and method based on quatertz | |
US20170169048A1 (en) | Multi-Level High Availability Model for an Object Storage Service | |
US8473957B2 (en) | Architecture for providing on-demand and background processing | |
CN106294408B (en) | The method and apparatus that the Asynchronous Request of dynamic web page is monitored | |
JP2014023011A5 (en) | ||
CN111353696A (en) | Resource pool scheduling method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into 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: 20150311 |