Load distribution device, processing device, load distribution system, load distribution method, and computer-readable recording medium

The load balancing device improves task allocation by monitoring device states and allocating tasks to non-executing nodes, thereby reducing TAT and system costs, addressing inefficiencies in conventional load balancing systems.

WO2024257273A1PCT designated stage expired Publication Date: 2024-12-19NEC CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/022106
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

Conventional load balancing devices prolong Turn Around Time (TAT) by incorrectly determining task completion and failing to allocate new tasks efficiently due to their general-purpose configuration and lack of specialized task handling.

Method used

A load balancing device that periodically transmits life-or-death monitoring messages to processing devices, receives messages indicating their operating and execution states, and allocates tasks preferentially to devices that are not executing tasks, while excluding abnormal devices and prioritizing those with fewer pending tasks.

Benefits of technology

This approach significantly shortens TAT by efficiently allocating tasks to available processing devices, even when all nodes are executing tasks, and minimizes system costs by reducing the need for additional queue and monitoring mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023022106_19122024_PF_FP_ABST
    Figure JP2023022106_19122024_PF_FP_ABST
Patent Text Reader

Abstract

A load distribution device 10 comprises: a transmission unit 11 that transmits, at the timing of polling, a message for alive monitoring to each of processing devices for processing tasks; a reception unit 12 that receives, from each of the processing devices, a message including information about an operation state of the processing device and information about an execution state of a task in the processing device as a response message to the message; and a task distribution unit 13 that identifies, by using the received information, the processing device to which a task is to be preferentially distributed, and distributes the task to the identified processing device.
Need to check novelty before this filing date? Find Prior Art

Description

Load balancing device, processing device, load balancing system, load balancing method, and computer-readable recording medium

[0001] The present disclosure relates to a load balancing device and a load balancing method for balancing the loads of processing devices that process tasks in a computer network, and also to a computer-readable recording medium on which a program for implementing these is recorded.The present disclosure also relates to processing devices that are targets of load balancing and a load balancing system that uses the load balancing device.

[0002] In recent years, load balancers have been introduced into network systems to prevent excessive load concentration on specific nodes. Load balancers can continue to provide stable services to users who are accessing a specific website, even if access to a specific website is concentrated or a server malfunctions (see, for example, Patent Document 1).

[0003] In some load balancing devices, the API (Application Programming Interface) specification is such that a worker node returns a response not when the task is completed, but when the task is still being processed, such as when the task acceptance is completed. According to this API specification, a new task does not occupy the computing resources of the worker node, so the worker node can efficiently proceed with processing.

[0004] Japanese Patent Application Laid-Open No. 2019-57091

[0005] However, when the above-mentioned API specifications are used, a problem occurs in that the turn-around time (TAT) of the task becomes longer than when the task occupies the computational resources of the worker node. The reason for this problem will be explained below.

[0006] First, conventional load balancers are general-purpose and are not specialized for individual tasks. Therefore, when a response is received from a worker node, the conventional load balancer determines that the worker node has completed processing the task.

[0007] As a result, conventional load balancers may respond to a worker node that is still executing a task, even though there are other worker nodes that are not executing tasks. In this case, the worker node currently processing a task must wait for the current task to complete before starting the new task, or share the computing resources between the current task and the new task. As a result, the TAT of the task becomes longer, as described above.

[0008] One example of the objective of the present disclosure is to shorten the TAT of a task.

[0009] In order to achieve the above object, a load balancing device according to one aspect of the present disclosure is characterized by comprising: a sending means for sending a message for alive monitoring to each of a plurality of processing devices that process tasks at the timing of polling; a receiving means for receiving a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; and a task allocation means for using the received information to identify the processing device to which the task should be preferentially allocated, and allocating the task to the identified processing device.

[0010] In order to achieve the above object, a processing device according to one aspect of the present disclosure is characterized by comprising: a task processing unit that processes tasks; a communication unit that receives messages for health monitoring; and a message generation unit that generates a message including information indicating the operating status of the device and information indicating the execution status of tasks in the device as a response message corresponding to the received message.

[0011] In order to achieve the above object, a load balancing system according to one aspect of the present disclosure comprises: a plurality of processing devices that process tasks; and a load balancing device that allocates tasks to the processing devices, wherein the load balancing device comprises: a sending means that sends a message for monitoring the health of each of the plurality of processing devices at a polling timing; a receiving means that receives a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; and a task allocation means that uses the received information to identify the processing device to which the task should be allocated preferentially, and allocates the task to the identified processing device.

[0012] In addition, in order to achieve the above object, a load balancing method according to one aspect of the present disclosure is characterized in that it sends a message for monitoring the health of each of a plurality of processing devices that process tasks at the timing of polling, receives a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device, identifies the processing device to which the task should be preferentially assigned using the received information, and assigns the task to the identified processing device.

[0013] Furthermore, in order to achieve the above object, a computer-readable recording medium according to one aspect of the present disclosure is characterized in that it records a program including instructions to cause a computer to send a message for health monitoring to each of a plurality of processing devices that process tasks at the timing of polling, receive a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device, use the received information to identify the processing device to which the task should be preferentially assigned, and assign the task to the identified processing device.

[0014] As described above, according to the present disclosure, the TAT of a task can be shortened.

[0015] FIG. 1 is a configuration diagram showing an example of a schematic configuration of a load balancer. FIG. 2 is a configuration diagram showing an example of the configuration of a load balancer, a processing device, and a load balancing system. FIG. 3 is a diagram showing an example of alive monitoring processing performed between a load balancer and a worker node. FIG. 4 is a diagram showing an example of task processing performed between a client node 102 and a load balancing system 100. FIG. 5 is a flow diagram showing an example of the operation of the load balancer. FIG. 6 is a configuration diagram showing another example of the configuration of a load balancer, a processing device, and a load balancing system. FIG. 7 is a flow diagram showing another example of the operation of the load balancer. FIG. 8 is a block diagram showing an example of a computer that realizes the load balancer.

[0016] (Summary of the present disclosure) A conventional load balancer periodically sends a health check message to each worker node that processes a task to check the operation of the worker node. Based on the response to the health check message, the conventional load balancer determines whether the worker node is operating normally or not (for example, whether it has fallen into an abnormal state).

[0017] In contrast, in the present disclosure, the response of a worker node to a health check message from a load balancer is enhanced. The enhancements are in the content of the response signal and the timing of sending and receiving the response signal. In addition, in the present disclosure, the load balancer can also enhance the logic for selecting a worker node using information obtained from the response to the health check message.

[0018] For example, in the present disclosure, the response to the health monitoring message is expanded, and a function is implemented in the worker node to add to the response message whether the response is one of the following (1) to (3): (1) The worker node is operating normally and waiting for a task. (2) The worker node is operating normally and not waiting for a task (executing a task). (3) The worker node is not normal (for example, has fallen into an abnormal state). Furthermore, in addition to the above functions, the worker node may also be implemented with a function to add to the response message, for example, the number of tasks waiting to be processed that are queued.

[0019] The load balancer also preferentially allocates tasks to worker nodes that return the response message (1) above, and excludes worker nodes that return the response message (3) above from the targets of task allocation. Furthermore, the load balancer lowers the priority of new task allocation for worker nodes that return the response message (2) above until they receive the response message (1) above.

[0020] In addition, if there is no worker node that returns the response message of (1) above, the load balancer can identify a worker node with a small number of tasks waiting to be processed from among the worker nodes that return the response message of (2) above. In this case, the load balancer can preferentially allocate tasks to this identified worker node.

[0021] The load balancer can also forward messages from worker nodes to client nodes. In this case, after allocating a task to a worker node, the load balancer can send a health check message each time it forwards a message from the worker node to the client node, without determining whether the message being forwarded is a provisional response or a final response indicating task completion. This allows the load balancer to immediately check whether the next task can be allocated when a task on a worker node is completed, thereby efficiently finding available worker nodes.

[0022] First Embodiment A load balancing device, a processing device, a load balancing system, a load balancing method, and a program according to a first embodiment will be described below with reference to FIGS.

[0023] [Device Configuration] A schematic configuration of a load balancing device in the first embodiment will be described with reference to Fig. 1. Fig. 1 is a diagram showing an example of a schematic configuration of a load balancing device.

[0024] The load distribution device 10 shown in Fig. 1 is a device for distributing the load of processing devices that process tasks in a computer network, and is also called a load balancer. In addition to the task allocation function and processing device alive monitoring function of conventional load distribution devices, the load distribution device 10 is equipped with a new function that takes asynchronous processing, which will be described later. For this reason, as shown in Fig. 1, the load distribution device 10 includes a transmitter 11, a receiver 12, and a task allocation unit 13.

[0025] The transmission unit 11 transmits messages for alive monitoring to each of the multiple processing devices that process tasks at a predetermined polling timing (for example, "periodically"). The predetermined polling timing does not necessarily have to be periodic, and may be, for example, the timing when an event occurs or the timing when an event is completed. The polling timing may also be determined dynamically and is not limited to the above-mentioned example. For convenience of explanation, the processing will be described hereinafter using the term "periodically."

[0026] The receiving unit 12 receives, as a response message to the message, a message including information indicating the operating state of each processing device and information indicating the execution state of the task in each processing device. The task allocating unit 13 uses the received information to identify a processing device to which a task should be preferentially allocated, and allocates the task to the identified processing device.

[0027] In this way, the load distribution device 10 can receive information indicating the operating status of each processing device and information indicating the execution status of tasks in each processing device as responses to messages for alive monitoring from the processing devices, and can allocate tasks using this information. Therefore, the load distribution device 10 can shorten the TAT of tasks by preferentially using processing devices that are not executing tasks.

[0028] Next, the configurations and functions of the load balancing device, the processing device, and the load balancing system in the first embodiment will be described with reference to Fig. 2. Fig. 2 is a configuration diagram showing an example of the configuration of the load balancing device, the processing device, and the load balancing system.

[0029] As shown in Fig. 2, the load balancing system 100 includes the load balancing device 10 also shown in Fig. 1 and a plurality of processing devices 20. The load balancing system 100 will also be referred to as a "server function" below. The load balancing system 100 may be realized on a cloud. Reference numeral 101 denotes an administrator of the load balancing system 100.

[0030] Each processing device 20 is a device that processes a task, and will hereinafter also be referred to as a worker node. Each worker node 20 is connected to an external network 103 via the load balancer 10, and is further connected to each client node 102 via the network 103. When each client node 102 requests task processing, the load balancer 10 distributes the requested task to each worker node 20.

[0031] 2 , each worker node 20 includes a communication unit 21, a message generation unit 22, and a task processing unit 23. The communication unit 21 receives a message transmitted from the load balancing device 10, and further transmits a message generated by the message generation unit 22 to the load balancing device 10.

[0032] The message generator 22 generates a message including information indicating the operating state of the worker node 20 and information indicating the execution state of a task in the worker node 20. Here, the information indicating the operating state includes information indicating whether the worker node 20 is operating normally. The information indicating the execution state of a task includes information indicating whether the worker node 20 is waiting for a task (information indicating whether the task is being executed). The message generator 22 can also generate a message that further includes information indicating the number of tasks waiting to be processed.

[0033] The task processing unit 23 processes the assigned tasks. The task processing unit 23 may be provided with a queue for storing tasks waiting to be processed. If a queue is provided, the message generating unit 22 identifies the number of tasks stored in the queue and generates the information indicating the number of tasks waiting to be processed. The task processing unit 23 may store tasks using a mechanism other than a queue.

[0034] Furthermore, in the load balancing device 10, as described above, the transmitter 11 periodically transmits messages for alive monitoring to each worker node 20. As described above, the receiver 12 receives response messages from each worker node 20. Furthermore, when a task processing request is made from each client node 102, the receiver 12 receives the request.

[0035] The task allocation unit 13 uses information included in the response message from each worker node to determine, for each worker node 20, (A) whether the worker node is normal, (B) whether the worker node is waiting for a task (whether the task is currently being executed), and (C) the number of tasks waiting to be processed.The task allocation unit 13 then stores the determination results as information.The task allocation unit 13 also compares the task processing request received by the receiving unit 12 with the tasks that have already been allocated, to identify tasks for which no response has been received, and also stores session information for these tasks.

[0036] The task allocation unit 13 identifies a worker node 20 (hereinafter referred to as "worker node a") that is operating normally and waiting for a task from the judgment results it holds, and allocates the task to the identified worker node a with priority.

[0037] In addition, the task allocation unit 13 also identifies a worker node 20 (hereinafter referred to as "worker node b") that is operating normally and is not waiting for a task from the judgment results it holds, and lowers the task priority of worker node b until it is waiting for a task.

[0038] Furthermore, the task allocation unit 13 also identifies a worker node 20 (hereinafter referred to as "worker node c") that is not operating normally from the judgment results it holds, and excludes worker node c from the targets for task allocation.

[0039] In addition, if the task allocation unit 13 cannot identify worker node a from the judgment results it holds, it can identify the number of tasks waiting to be processed on each worker node b, and preferentially allocate tasks to the worker node b with the fewest number of tasks waiting to be processed.

[0040] Furthermore, in the first embodiment, the transmitter 11 can transmit a message for alive monitoring to the worker node 20 not only at the periodic timing for alive monitoring but also at the timing when the worker node 20 transfers a message to the client node 102. In this case, the task allocator 13 can immediately check whether the worker node 20 is executing a task, and if the execution of the task has been completed, can immediately allocate the next task.

[0041] [Device Operation] Next, the operation of the load balancing device, processing device, and load balancing system in embodiment 1 will be described. In the following description, reference will be made to Figures 1 and 2 as appropriate. In embodiment 1, the load balancing method is implemented by operating the load balancing device 10. Therefore, the description of the load balancing method in embodiment 1 will be replaced by the following description of the operation of the load balancing device 10.

[0042] First, the alive monitoring function performed between the load balancer 10 and the worker node 20 will be described using Fig. 3. Fig. 3 is a diagram showing an example of alive monitoring processing performed between the load balancer and the worker node. In the following description, the numbers (201 onwards) of the messages shown in Fig. 3 will be added.

[0043] As shown in FIG. 3, in the load balancing device 10, the transmitter 11 periodically transmits a message for alive monitoring to each worker node 20 (201), and starts a response waiting timer for each worker node 20 (202).

[0044] Next, in the worker node 20, the communication unit 21 receives the message. Then, if the worker node 20 is in a normal state, the message generation unit 22 generates a response message in response to receiving the message for alive monitoring (203).

[0045] The generated response message includes content indicating successful processing (information indicating normal operation) implemented in conventional alive monitoring, for example, the HTTP (Hypertext Transfer Protocol) status code "200." Furthermore, in the first embodiment, unlike conventional methods, the generated response message also includes information indicating the operating state of the worker node 20, information indicating the execution state of tasks in the worker node 20, and information indicating the number of tasks waiting to be processed.

[0046] In addition, in the worker node 20, the communication unit 21 transmits the generated response message to the load balancer 10 (204). In the load balancer 10, the receiving unit 12 receives the response message and stops the response waiting timer upon receiving the response message (205). Then, if the task allocating unit 13 determines from the response message that the worker node 20 is normal, it records the task execution status and the number of tasks waiting to be processed (206).

[0047] If the worker node 20 is in an abnormal state and cannot receive the alive monitoring message or cannot generate or send a response message, the load balancer 10 will not receive the response message (207). Therefore, the task allocation unit 13 detects the expiration of the response waiting timer (208), records that the corresponding worker node 20 is abnormal, and determines that the task cannot be allocated (209).

[0048] Assume that the worker node 20 can determine that it is in an abnormal state and can receive the alive monitoring message and send a response message. In this case, upon receiving the alive monitoring message, the worker node 20 writes information indicating that it is not operating normally, such as an HTTP protocol status code "500", in the response message and sends the response message to the load balancer 10 (211).

[0049] In this case, in the load balancing device 10, upon receiving the response message, the receiving unit 12 stops the response waiting timer (212), records that the worker node 20 is not operating normally (is abnormal) (213), and determines that it cannot allocate the task (214).

[0050] Next, a description will be given of a process for dynamically increasing or decreasing the number of worker nodes 20. Note that the following description will also refer to FIG.

[0051] First, the load balancer 10 periodically sends messages for alive monitoring to worker nodes 20 that are recorded as not operating normally. However, in this case, the load balancer 10 can lengthen the period for sending messages for alive monitoring (210 and 214). Furthermore, if the load balancer system (server function) 100 including the worker nodes 20 is implemented on a cloud, the load balancer 10 can also initiate a process to delete the worker node 20 that is not operating normally and add a new worker node 20.

[0052] In this case, the administrator 101 (see Figure 2) of the load balancing system (server function) 100 can add or delete worker nodes 20 to be registered with the load balancing device 10 in order to replace a worker node 20 that is not operating properly or to increase or decrease the capacity of the server function.

[0053] Also, when the load balancing system (server function) 100 is realized on the cloud, as described above, the load balancing device 10 can delete and add worker nodes 20 that it manages when a worker node 20 falls into a state where it cannot operate normally.

[0054] Furthermore, when the load balancing system (server function) 100 is implemented on a cloud, in order to reduce the number of worker nodes 20, the load balancing device 10 deletes the storage area corresponding to the worker node 20. Furthermore, in order to increase the number of worker nodes 20, the load balancing device 10 adds a storage area corresponding to the worker node 20, and then initializes the alive monitoring status to normal, the task execution status to not processing a task, the processing queue to empty, and the associated task to none.

[0055] Next, task processing will be described using Fig. 4. Fig. 4 is a diagram showing an example of task processing performed between the client nodes 102 and the load balancing system 100. In the following description, the message numbers (401 onwards) shown in Fig. 4 will be added. Fig. 4 also shows a case where one of the client nodes 102 requests task processing.

[0056] 4, first, one of the client nodes 102 transmits a task processing request message to the load balancer 10 via the network 103 (401, 402). At this time, the load balancer 10 manages the operating status of the worker nodes 20 connected to it.

[0057] Next, in the load balancer 10, the task allocation unit 13 selects a worker node 20 that can execute the task most efficiently according to the steps shown in Fig. 5 (described later) (403). Then, in order to allocate the task, the task allocation unit 13 transmits a message requesting execution of the task to the selected worker node 20 (404).

[0058] As a result, the worker node 20 to which the message was sent executes the task written in the message (405) and sends the result as a response message to the load balancer 10 (406). As a result, in the load balancer 10, the receiver 12 receives the response message from the worker node 20, and the transmitter 11 sends the received response message to the client node 102 (407, 408). As a result, the client node 102 receives the response message and obtains the processing result of the task.

[0059] In addition, in embodiment 1, the transmitter 11 transmits a message for health monitoring to the client node 102 at the timing of transmitting a response message to the client node 102, separate from the periodic transmission timing of the message for health monitoring (409).

[0060] In this case, the client node 102 that receives the message for health monitoring edits the response message (410) in the same way as when it receives a normal message for health monitoring, and transmits the edited response message to the load balancing device 10 (411).

[0061] In this case, the task allocation unit 13 in the load distribution device 10 updates information about the worker node 20 upon receiving the response message (412). This allows the load distribution device 10 to immediately recognize that the worker node 20 is available if the task immediately returns a final result.

[0062] Next, the operation of the load balancing device 10 will be described with reference to Fig. 5. Fig. 5 is a flow diagram showing an example of the operation of the load balancing device. In addition to the steps shown in Fig. 5, in the load balancing device 10, the transmitter 11 periodically transmits a message for alive monitoring to each worker node 20, and the receiver 12 receives a response message to the alive monitoring message from each worker node 20.

[0063] First, as shown in FIG. 5, in the load distribution device 10, the receiving unit 12 receives a message requesting task processing from the client node 102 (step A1).

[0064] Next, the task allocation unit 13 determines whether the task of the message received in step A1 is related to any of the tasks currently being processed (step A2).

[0065] If the result of the determination in step A2 is that the requested task is related to any task (step A2: Yes), the task allocation unit 13 selects a worker node 20 that is executing the related task (step A3).The task allocation unit 13 also allocates the task requested in step A1 to the selected worker node 20 (step A4).

[0066] On the other hand, if the result of the judgment in step A2 is that it is not related to any task (step A2: No), the task allocation unit 13 uses the information contained in the response message received from each worker node 20 to determine whether there is a worker node a that is operating normally and waiting for a task (step A5).

[0067] If the result of the determination in step A5 is that a corresponding worker node a exists (step A5: Yes), the task allocation unit 13 selects the corresponding worker node a (step A6). Then, the task allocation unit 13 executes step A4 to allocate the task requested in step A1 to the selected worker node a.

[0068] On the other hand, if the result of the judgment in step A5 is that a corresponding worker node 20 does not exist (step A5: No), the task allocation unit 13 judges whether a worker node b exists that is operating normally and is not waiting for a task (step A7).

[0069] If the result of the determination in step A7 is that a corresponding worker node b exists (step A7: Yes), the task allocation unit 13 identifies the number of tasks accumulated in the queue of each worker node b and selects the worker node b with the smallest number of tasks accumulated in the queue (step A8). Thereafter, the task allocation unit 13 executes step A4 and allocates the task requested in step A1 to the selected worker node a.

[0070] On the other hand, if the result of the judgment in step A7 is that a corresponding worker node b does not exist (step A7: No), the task allocation unit 13 cannot allocate the task, so it discards the message received in step A1 (step A9) and terminates the processing.

[0071] The processing of steps A1 to A9 is repeatedly executed each time a task processing request message is sent from the client node 102. Then, by the processing of steps A1 to A9, worker nodes 20 that are not executing a task are used preferentially, making it possible to shorten the TAT of the task.

[0072] [Program] The program in the first embodiment may be any program that causes a computer to execute steps A1 to A9 shown in FIG. 5. By installing and executing this program on a computer, the load balancing device 10 and load balancing method in the first embodiment can be realized. In this case, the processor of the computer functions as the transmitter 11, receiver 12, and task distributor 13 to perform processing. Examples of the computer include a server computer and a general-purpose PC. Furthermore, part of the computer may function as a worker node 20.

[0073] The program in the first embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as one of the transmitter 11, the receiver 12, and the task assigner 13.

[0074] [Effects of First Embodiment] The effects of the first embodiment will be described below.

[0075] The first effect is that the load balancer 10 can identify a worker node 20 that can immediately start processing a task. The reason for this is that when the load balancer 10 receives a task response message to be relayed from a worker node to a client node 102, the load balancer 10 can receive information from the worker node as to whether the task is being processed by transmitting an additional aperiodic alive / dead signal.

[0076] In addition, there may be cases where a response message is not sent when the processing of a task is completed depending on the task being processed by the worker node 20. In this case, the worker node returns a response to the alive / dead monitoring message periodically sent by the load balancer 10, and the load balancer 10 can grasp the completion of task processing of each worker node with the maximum delay width being the interval between sending alive / dead signals.

[0077] The second effect is that the load balancer 10 can preferentially allocate tasks to worker nodes 20 that are not currently executing tasks. This is because, due to the first effect, the load balancer 10 can determine whether each worker node 20 is currently processing a task, and can therefore select a worker node 20 that is not currently processing a task as the destination to which the task is to be allocated.

[0078] The third effect is that even if all worker nodes 20 are executing tasks, the load balancer 10 can select a worker node 20 that is expected to have a small amount of accumulated processing and allocate tasks to it. This is because the response message to the alive monitoring message returned by the worker node can include information about the number of tasks waiting to be processed, and the load balancer 10 can use this information to select the worker node 20 with the fewest number of tasks waiting to be processed as the allocation destination for the task.

[0079] Furthermore, conventionally, when attempting to configure a scalable system using worker nodes that may return asynchronous responses to target tasks without using a load balancer, there is a problem that the number of required components increases compared to when a load balancer is used.

[0080] The reason for this is that when the load balancer 10 is used, the worker nodes simply need to process the tasks assigned by the load balancer. In contrast, when a load balancer is not used, additional features are required: (1) a queue mechanism for accumulating tasks, and (2) a mechanism for worker nodes that are not currently executing tasks to periodically monitor the queue and prune tasks. This has the disadvantage of incurring unnecessary costs in the system. In contrast, as a fourth effect, in the first embodiment, the functions of the load balancer 10 and the worker nodes 20 enable the construction of a scale-out system that minimizes TAT ​​without implementing a queue structure or a task prune function from the queue in each worker node.

[0081] Second Embodiment Next, a load balancing device, a processing device, a load balancing system, a load balancing method, and a program according to a second embodiment will be described with reference to FIGS. 6 and 7. FIG.

[0082] In the first embodiment, the load distribution device 10 monitors the session state, but in order to ensure versatility, it may be implemented in a way that does not involve knowledge of the content of the task being processed. In contrast, in the second embodiment, the load distribution device 10 obtains information about the task being processed, thereby reducing the response time of the task that performs synchronous processing.

[0083] When processing tasks in parallel that are greater than the number of worker nodes, in the first embodiment, a worker node with a small number of tasks in its queue is selected. However, in this case, the time required to process the tasks currently being processed and the tasks in the queue is unknown.

[0084] Therefore, in the second embodiment, the functionality of the load distribution device is expanded to enable analysis of task information, thereby making it possible to distinguish between a first task that is expected to be completed in a relatively short time and a second task that may take a long time to process.

[0085] The method for determining tasks varies depending on the application program executed on the worker node. Therefore, a task classification unit, which will be described later, is implemented for each application program. The following describes a method in which the load distribution device 10 optimizes task allocation using information obtained from a task classification unit corresponding to a specific application program, assuming that such a task classification unit is provided.

[0086] [Device Configuration] The configuration of the load balancing device, processing device (worker node), and load balancing system in the second embodiment will be described with reference to Fig. 6. Fig. 6 is a configuration diagram showing another example of the configuration of the load balancing device, processing device, and load balancing system. In the example of Fig. 6, the configuration of the load balancing device is different from the examples of Figs. 1 and 2.

[0087] 6, the load balancing device 30, together with the worker nodes 20, constitutes a load balancing system 100, similar to the load balancing device 10 shown in FIGS. 1 and 2. Also in the second embodiment, each worker node 20 is connected to an external network 103 via the load balancing device 10, and further connected to each client node 102 via the network 103. When each client node 102 requests task processing, the load balancing device 30 distributes the requested task to each worker node 20.

[0088] However, the load distribution device 30 includes a task classification unit 14 in addition to the transmitter 11, receiver 12, and task distributor 13, which are the same as those of the load distribution device 10 shown in Figures 1 and 2. In this respect, the load distribution device 30 differs from the load distribution device 10. The following description will focus on the differences.

[0089] When a client node 102 requests the processing of a task, the task classification unit 14 classifies the requested task according to its estimated processing time. Specifically, in the second embodiment, the task classification unit 14 classifies the task requested for processing into either a first task or a second task. Here, the first task is a task whose estimated processing time is shorter than that of the second task. In other words, a task whose processing time is shorter than the reference time is classified as the first task (hereinafter also referred to as a "short task"). Furthermore, a task whose processing time is longer than the reference time is classified as the second task (hereinafter also referred to as a "long task"). The reference time is set appropriately depending on the type of application program.

[0090] The task allocation unit 13 manages the plurality of worker nodes 20 by dividing them into a plurality of groups in advance according to the type of task to be classified. Specifically, in the second embodiment, the task classification unit 14 manages the plurality of worker nodes 20 by classifying them into a first group corresponding to short tasks and a second group corresponding to long tasks. The worker nodes 20 classified into the first group are used to process short tasks, and the worker nodes 20 classified into the second group are used to process long tasks.

[0091] When the task classification unit 14 classifies the tasks for which processing is requested, the task allocation unit 13 allocates the tasks for which processing is requested to the worker nodes 20 within the groups corresponding to the classification results. Note that, except for the fact that tasks are allocated within the range of the corresponding groups, the task allocation unit 13 allocates tasks using information included in the response messages, similar to the first embodiment.

[0092] [Device Operation] Next, the operation of the load balancing device, processing device, and load balancing system in the second embodiment will be described. In the following description, reference will be made to FIG. 6 as appropriate. In the second embodiment, the load balancing method is implemented by operating the load balancing device 30. Therefore, the description of the load balancing method in the second embodiment will be replaced by the following description of the operation of the load balancing device 30.

[0093] First, in the second embodiment, similarly to the first embodiment, the alive monitoring process and the process of increasing or decreasing the number of worker nodes 20 shown in Fig. 3 are performed between the load balancing device 30 and the worker nodes 20. Furthermore, in the second embodiment, similarly to the first embodiment, the process shown in Fig. 4 is performed between the client node 102 and the load balancing system 100. In the second embodiment, part of the operation of the load balancing device 30 is different from that in the first embodiment.

[0094] Next, the operation of the load balancing device 30 will be described with reference to Fig. 7. Fig. 7 is a flow diagram showing another example of the operation of the load balancing device. Also in the second embodiment, apart from the steps shown in Fig. 7, in the load balancing device 30, the transmitter 11 transmits a message for alive monitoring to each worker node 20 at the timing of polling (for example, periodically), and the receiver 12 receives a response message to the message for alive monitoring from each worker node 20.

[0095] First, as shown in FIG. 7, in the load distribution device 10, the receiving unit 12 receives a message requesting task processing from the client node 102 (step B1).

[0096] Next, the task classification unit 14 classifies the task requested to be processed in the message received in step B1 according to the expected processing time (step B2). Specifically, the task classification unit 14 classifies the task requested to be processed into either a first task or a second task.

[0097] Next, the task allocation unit 13 determines whether the task of the message received in step B1 is related to any of the tasks currently being processed (step B3).

[0098] If the result of the determination in step B3 indicates that the requested task is related to any task (step B3: Yes), the task allocation unit 13 selects a worker node 20 that is executing the related task (step B4).The task allocation unit 13 also allocates the task requested in step B1 to the selected worker node 20 (step B5).

[0099] On the other hand, if the result of the determination in step B3 is that the task is not related to any task (step B3: No), the task allocating unit 13 identifies a group of corresponding worker nodes 20 based on the classification result in step B2 (step B6). For example, if the task is classified as a short task, the task allocating unit 13 identifies a first group corresponding to short tasks. Also, if the task is classified as a long task, the task allocating unit 13 identifies a second group corresponding to long tasks.

[0100] Next, the task allocation unit 13 uses the information contained in the response message received from each worker node 20 within the group identified in step B6 to determine whether there is a worker node a that is operating normally and waiting for a task (step B7).

[0101] If the result of the determination in step B7 is that a corresponding worker node a exists (step B7: Yes), the task allocation unit 13 selects the corresponding worker node a (step B8). Then, the task allocation unit 13 executes step B5 to allocate the task requested in step B1 to the selected worker node a.

[0102] On the other hand, if the result of the judgment in step B7 is that a corresponding worker node 20 does not exist (step B7: No), the task allocation unit 13 judges whether a worker node b that is operating normally and not waiting for a task exists within the group identified in step B6 (step B9).

[0103] If the result of the determination in step B9 is that a corresponding worker node b exists (step B9: Yes), the task allocation unit 13 identifies the number of tasks accumulated in the queue of each worker node b and selects the worker node b with the smallest number of tasks accumulated in the queue (step B10). Thereafter, the task allocation unit 13 executes step B5 and allocates the task requested in step B1 to the selected worker node a.

[0104] On the other hand, if the result of the judgment in step B9 is that a corresponding worker node b does not exist (step B9: No), the task allocation unit 13 cannot allocate the task, so it discards the message received in step B1 (step B11) and terminates the processing.

[0105] The processing of steps B1 to B11 is repeatedly executed each time a task processing request message is sent from the client node 102. The processing of steps B1 to B11 allows worker nodes 20 that are not executing a task to be used preferentially, thereby shortening the TAT of the task.

[0106] [Program] The program in the second embodiment may be any program that causes a computer to execute steps B1 to B11 shown in FIG. 7. By installing and executing this program on a computer, the load balancing device 30 and the load balancing method in the second embodiment can be realized. In this case, the processor of the computer functions as the transmitter 11, receiver 12, task distributor 13, and task classifier 14 to perform processing. Examples of the computer include a server computer and a general-purpose PC. Furthermore, part of the computer may function as a worker node 20.

[0107] The program in the second embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as one of the transmitter 11, receiver 12, task assigner 13, and task classifier 14.

[0108] [Effects of the Second Embodiment] As described above, in the second embodiment, each worker node 20 does not process a mixture of short tasks and long tasks, thereby avoiding a situation in which a short task is forced to wait for a long time due to the influence of a long task being processed. Since short tasks tend to be used more frequently in cases where a highly immediate response is required, and long tasks tend to be used more frequently in cases where immediacy is not required, such as batch processing, improving the response time of short tasks is expected to lead to an improvement in the usability of the entire application program.

[0109] (Application Example 1) Load balancers are a technology widely used in network systems that employ a scale-out strategy, and can be replaced even with the extension of the present disclosure. In addition, the present disclosure is particularly effective in the following situations: [1] A situation in which, when implementing the services provided by a load balancing system (server function), synchronous processing and asynchronous processing are mixed in the specifications of the APIs by which worker nodes execute tasks. [2] A situation in which the load balancing system is provided with general-purpose specifications, and it is not desirable to modify the load balancing system by changing the API specifications or adding new API types. [3] A situation in which the above [2] is further extended to provide multiple systems with their own APIs, but the load balancing system is desired to be common to all systems.

[0110] (Application Example 2) The second embodiment functions effectively in a situation where the number of tasks to be processed in parallel may exceed the number of worker nodes, particularly when it is desired to effectively shorten the TAT of short tasks. However, this may require modifications to suit individual APIs, which is a trade-off with the versatility of the load balancing device 10 as in Application Example 1.

[0111] (Physical Configuration) A computer that implements the load balancing device by executing the programs in the first and second embodiments will now be described with reference to Fig. 8. Fig. 8 is a block diagram showing an example of a computer that implements the load balancing device.

[0112] 8, the computer 110 includes a CPU (Central Processing Unit) 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These components are connected to each other via a bus 121 so as to be able to communicate data with each other.

[0113] Furthermore, the computer 110 may include a GPU (Graphics Processing Unit) or an FPGA (Field-Programmable Gate Array) in addition to or instead of the CPU 111. In this aspect, the GPU or FPGA can execute the programs in the embodiments.

[0114] The CPU 111 loads a program in the embodiment, which is composed of a group of codes and stored in the storage device 113, into the main memory 112 and executes each code in a predetermined order to perform various calculations. The main memory 112 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory).

[0115] The program in the embodiment is provided in a state stored in a computer-readable recording medium 120. The program in the embodiment may be distributed over the Internet connected via the communication interface 117.

[0116] Specific examples of the storage device 113 include a hard disk drive and a semiconductor storage device such as a flash memory. The input interface 114 mediates data transmission between the CPU 111 and input devices 118 such as a keyboard and a mouse. The display controller 115 is connected to a display device 119 and controls the display on the display device 119.

[0117] The data reader / writer 116 mediates data transmission between the CPU 111 and the recording medium 120, reads programs from the recording medium 120, and writes processing results from the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and other computers.

[0118] Specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark)) and SD (Secure Digital), magnetic recording media such as flexible disks, or optical recording media such as CD-ROMs (Compact Disk Read Only Memory).

[0119] The load balancer can be realized not by a computer with a program installed, but by hardware corresponding to each part, such as an electronic circuit. Furthermore, the load balancer may be realized in part by a program and in the remaining part by hardware. In the embodiment, the computer is not limited to the computer shown in FIG. 8.

[0120] Some or all of the above-described embodiments can be expressed by (Supplementary Note 1) to (Supplementary Note 17) described below, but are not limited to the following descriptions.

[0121] (Supplementary Note 1) A load balancing device comprising: a sending unit that sends a message for alive monitoring to each of a plurality of processing devices that process tasks at the timing of polling; a receiving unit that receives a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; and a task allocation unit that uses the received information to identify the processing device to which the task should be allocated preferentially, and allocates the task to the identified processing device.

[0122] (Supplementary Note 2) A load balancing device as described in Supplementary Note 1, wherein the information indicating the operation information of the processing device is information indicating whether the processing device is operating normally, the information indicating the execution status of tasks in the processing device is information indicating whether the processing device is waiting for a task, and the task allocation unit uses the received information to identify a processing device that is operating normally and waiting for a task as the processing device to which the task should be allocated preferentially.

[0123] (Supplementary Note 3) The load distribution device according to Supplementary Note 2, wherein the receiving unit further receives the message including information indicating the number of tasks waiting to be processed in the processing device, and when the task allocation unit cannot identify a processing device that is operating normally and waiting for tasks as the processing device to which tasks should be preferentially allocated using the received information, the task allocation unit identifies, among the processing devices that are operating normally and not waiting for tasks, the processing device with the fewest tasks waiting to be processed as the processing device to which tasks should be preferentially allocated.

[0124] (Supplementary Note 4) A load balancing device according to Supplementary Note 1, wherein when a message sent from the processing device is forwarded to the device that requested the task via the load balancing device, the sending unit sends the message for health monitoring to the processing device to which the message was forwarded not only at the time of polling but also at the time of forwarding.

[0125] (Supplementary Note 5) The load balancing device according to Supplementary Note 1 further comprises a task classification unit that classifies tasks that have been requested to be processed according to expected processing times, wherein the task allocation unit manages the plurality of processing devices by dividing them into a plurality of groups in advance according to the type of task to be classified, and when the tasks that have been requested to be processed are classified, the tasks that have been requested to be processed are allocated to the processing devices within the group corresponding to the classification result.

[0126] (Supplementary Note 6) A processing device comprising: a task processing unit that processes a task; a communication unit that receives a message for alive monitoring; and a message generation unit that generates a message including information indicating an operating state of the device and information indicating an execution state of a task in the device as a response message corresponding to the received message.

[0127] (Supplementary Note 7) A load balancing system comprising: a plurality of processing devices that process tasks; and a load balancing device that allocates tasks to the processing devices, wherein the load balancing device comprises: a sending unit that sends a message for alive monitoring to each of the plurality of processing devices at a polling timing; a receiving unit that receives a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; and a task allocation unit that uses the received information to identify the processing device to which the task should be allocated preferentially, and allocates the task to the identified processing device.

[0128] (Supplementary Note 8) A load balancing method comprising: transmitting a message for monitoring alive status to each of a plurality of processing devices that process tasks at the timing of polling; receiving a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; using the received information, identifying the processing device to which the task should be preferentially assigned; and assigning the task to the identified processing device.

[0129] (Supplementary Note 9) A load balancing method according to Supplementary Note 8, wherein the information indicating the operation information of the processing device is information indicating whether the processing device is operating normally, the information indicating the execution status of tasks in the processing device is information indicating whether the processing device is waiting for a task, and in allocating the tasks, the received information is used to identify a processing device that is operating normally and waiting for a task as the processing device to which the task should be allocated preferentially.

[0130] (Supplementary Note 10) A load balancing method according to Supplementary Note 9, comprising receiving the message further including information indicating the number of tasks waiting to be processed in the processing device; and in allocating the tasks, if a processing device that is operating normally and waiting for tasks cannot be identified as the processing device to which the tasks should be preferentially allocated using the received information, identifying the processing device that is operating normally and not waiting for tasks and has the fewest tasks waiting to be processed as the processing device to which the tasks should be preferentially allocated.

[0131] (Supplementary Note 11) The load balancing method according to Supplementary Note 8, wherein, when a message sent from the processing device is forwarded to the device that requested the task, the message for health monitoring is sent to the processing device to which the message was forwarded not only at the time of polling but also at the time of forwarding.

[0132] (Supplementary Note 12) The load balancing method according to Supplementary Note 8 further comprises classifying tasks for which processing is requested according to expected processing times, and in allocating the tasks, managing the plurality of processing devices in advance by dividing them into a plurality of groups according to the type of task to be classified, and when the tasks for which processing is requested are classified, allocating the tasks for which processing is requested to the processing devices within the group corresponding to the result of the classification.

[0133] (Supplementary Note 13) A computer-readable recording medium having recorded thereon a program including instructions to: cause a computer to send a message for alive monitoring to each of a plurality of processing devices that process tasks at the timing of polling; receive a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; use the received information to identify the processing device to which the task should be preferentially assigned; and assign the task to the identified processing device.

[0134] (Supplementary Note 14) A computer-readable recording medium as described in Supplementary Note 13, wherein the information indicating the operation information of the processing device is information indicating whether the processing device is operating normally, the information indicating the execution status of tasks in the processing device is information indicating whether the processing device is waiting for a task, and in allocating the tasks, the received information is used to identify a processing device that is operating normally and waiting for a task as the processing device to which the task should be allocated preferentially.

[0135] (Supplementary Note 15) A computer-readable recording medium according to Supplementary Note 14, wherein the message further includes information indicating the number of tasks waiting to be processed in the processing device, and when the received information is used in the task allocation to identify a processing device that is operating normally and waiting for tasks as the processing device to which tasks should be allocated preferentially, the processing device that is operating normally and not waiting for tasks and has the fewest tasks waiting to be processed is identified as the processing device to which tasks should be allocated preferentially.

[0136] (Supplementary Note 16) A computer-readable recording medium according to Supplementary Note 13, wherein, when a message sent from the processing device is forwarded to a device that requested the task, the message for health monitoring is sent to the processing device to which the message was forwarded not only at the time of polling but also at the time of forwarding.

[0137] (Supplementary Note 17) The computer-readable recording medium according to Supplementary Note 13, wherein the program includes instructions to cause the computer to classify tasks for which processing is requested according to expected processing times, and in the task allocation, the program causes the computer to manage the plurality of processing devices by dividing them into a plurality of groups in advance according to the type of task to be classified, and when the tasks for which processing is requested are classified, the program causes the computer to allocate the tasks for which processing is requested to the processing devices within the group corresponding to the result of the classification.

[0138] Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above-described embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

[0139] The present disclosure is useful for distributing tasks across a computer network.

[0140] 10 Load balancing device (first embodiment) 11 Transmission unit 12 Reception unit 13 Task allocation unit 14 Task classification unit 20 Worker node 30 Load balancing device (second embodiment) 100 Load balancing system 101 Administrator 102 Client node 103 Network 110 Computer 111 CPU 112 Main memory 113 Storage device 114 Input interface 115 Display controller 116 Data reader / writer 117 Communication interface 118 Input device 119 Display device 120 Recording medium 121 Bus

Claims

1. A load balancing device comprising: a transmitting means for transmitting a message for alive monitoring to each of a plurality of processing devices processing tasks at a polling timing; a receiving means for receiving a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; and a task allocation means for using the received information to identify a processing device to which a task should be allocated preferentially, and allocating the task to the identified processing device.

2. A load balancing device as described in claim 1, wherein the information indicating the operation information of the processing device is information indicating whether the processing device is operating normally, and the information indicating the execution status of tasks in the processing device is information indicating whether the processing device is waiting for a task, and the task allocation means uses the received information to identify a processing device that is operating normally and waiting for a task as the processing device to which the task should be allocated preferentially.

3. The load balancing device of claim 2, wherein the receiving means further receives the message including information indicating the number of tasks waiting to be processed in the processing device, and when the task allocation means cannot identify a processing device that is operating normally and waiting for tasks as the processing device to which tasks should be assigned preferentially using the received information, it identifies, among the processing devices that are operating normally and not waiting for tasks, the processing device that has the smallest number of tasks waiting to be processed as the processing device to which tasks should be assigned preferentially.

4. A load balancing device as described in claim 1, wherein when a message sent from the processing device is forwarded to the device that requested the task via the load balancing device, the transmitting means transmits the message for alive monitoring to the processing device to which the message was forwarded not only at the time of polling but also at the time of forwarding.

5. A load balancing device as described in claim 1, further comprising a task classification means for classifying tasks for which processing is requested according to expected processing time, wherein the task allocation means manages the multiple processing devices by dividing them into multiple groups in advance according to the type of task to be classified, and when the tasks for which processing is requested are classified, the tasks for which processing is requested are allocated to the processing devices within the group corresponding to the result of the classification.

6. A processing device comprising: a task processing means for processing a task; a communication means for receiving a message for alive monitoring; and a message generating means for generating a message including information indicating the operating state of the device and information indicating the execution state of a task in the device as a response message corresponding to the received message.

7. A load balancing system comprising: a plurality of processing devices for processing tasks; and a load balancing device for allocating tasks to the processing devices, wherein the load balancing device comprises: a transmitting means for transmitting a message for alive monitoring to each of the plurality of processing devices at a polling timing; a receiving means for receiving a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; and a task allocating means for identifying a processing device to which a task should be allocated preferentially using the received information, and allocating the task to the identified processing device.

8. A load balancing method comprising the steps of: sending a message for alive monitoring to each of a plurality of processing devices that process tasks at a polling timing; receiving a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; using the received information, identifying the processing device to which the task should be preferentially assigned; and assigning the task to the identified processing device.

9. A computer-readable recording medium having recorded thereon a program including instructions to cause a computer to: send a message for alive monitoring to each of a plurality of processing devices that process tasks at the timing of polling; receive a message from each of the plurality of processing devices as a response message to the message, the message including information indicating the operating status of the processing device and information indicating the execution status of the task in the processing device; use the received information to identify the processing device to which the task should be preferentially assigned; and assign the task to the identified processing device.

Citation Information

Patent Citations

  • Apparatus, system, method, and program for distributed processing

    JP2010079504A

  • Broadcasting system and broadcasting method

    JP2010103757A

  • Registration request system, registration request server device, and registration request control method for server device

    JP2010198317A

  • Database management system, lock fault monitoring method and lock fault monitoring program

    JP2010211616A

  • Connection destination node selecting method, node and program

    JP2010212751A