LOAD BALANCER APPARATUS, LOAD BALANCER SYSTEM, AND LOAD BALANCER METHOD

The load balancing device optimizes container-based resource management by dynamically adjusting node deployment and deletion based on resource availability, addressing delays and cost inefficiencies in container-based systems.

JP7571083B2Active Publication Date: 2024-10-22HITACHI LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022099262
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2024-10-22
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

Existing container-based resource management systems face delays in deployment processing, leading to negative impacts on service provision and wastage of unused resources, resulting in increased costs.

Method used

A load balancing device and method that includes a schedule mechanism and a scale mechanism to deploy and manage container-based nodes by acquiring resource and external information, deleting excessive nodes, and adding insufficient nodes to optimize resource utilization.

Benefits of technology

Reduces costs associated with unused resources while minimizing deployment delays, ensuring efficient and economical service provision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007571083000001
    Figure 0007571083000001
  • Figure 0007571083000002
    Figure 0007571083000002
  • Figure 0007571083000003
    Figure 0007571083000003
Patent Text Reader

Abstract

To provide a load distribution apparatus, a load distribution system and a load distribution method capable of contributing from an economic point of view while improving the convenience of a user by reducing costs associated with unused resources while suppressing the occurrence of processing delays in deployment and adverse effects of service provision.SOLUTION: The load distribution apparatus is provided with a scheduling mechanism for deploying a container to a node of a container base, and a scaling mechanism for acquiring information of a resource from the container base. The scale mechanism acquires external information about the container to be deployed to the container base, determines the resources of the container base based on the information of the resources and the external information, deletes the nodes of the container base when it determines that the resources are excessive, and adds the nodes of the container base when it determines that the resources are insufficient.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a load balancing device, a load balancing system, and a load balancing method. [Background technology]

[0002] There are environments where multiple containers are deployed and share limited hardware resources. In these environments, there is a need to achieve both cost reduction and response to service loads by using the hardware resources efficiently.

[0003] Here, Patent Document 1 discloses a technology for efficiently allocating cluster resources. That is, Patent Document 1 discloses a method for allocating and managing cluster resources in a cloud platform, including a step of a cloud platform system generating service group information when a cluster resource allocation request is input, a step of adding / removing a user of the service group, a step of selecting a cluster to be allocated to the user of the service group and inputting allocation information, a step of inquiring about available cluster resources, a step of registering resource allocation information to the service group and allocating resources to complete cluster resource allocation if resources are available as a result of the resource available amount inquiry, a step of checking whether cluster resources can be added if resources are insufficient as a result of the resource available amount inquiry, a step of additionally registering the cluster resources if the cluster resources can be added, a step of registering resource allocation information to the service group and allocating resources to complete cluster resource allocation, and a step of reselecting an available cluster if the cluster resources cannot be added.

[0004] Patent Document 2 discloses a technique for accurately predicting a resource capacity required for an IT service from monitoring information of resources with different monitoring conditions. That is, Patent Document 2 discloses a resource capacity prediction device including a log reliability calculation means and a resource utilization rate transition estimation means. The log reliability calculation means acquires a first log related to the monitoring conditions of the resource from a computer, and calculates the reliability of the log at multiple times based on the information on the monitoring conditions of the computer at multiple times included in the first log. The resource utilization rate transition estimation means acquires a second log related to the use of the resource and a third log related to the measurement of the service level items of the computer from the computer, and estimates the resource utilization rate of the computer based on the information on the resource utilization rate of the computer at multiple times included in the second log, the information on the measurement values ​​of the service level items of the computer at multiple times included in the third log, and the reliability of the logs at multiple times. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Special Publication No. 2021-530801 [Patent Document 2] JP 2013-175085 A Summary of the Invention [Problem to be solved by the invention]

[0006] By using the techniques of Patent Documents 1 and 2, it is possible to manage the resources of the container infrastructure on which containers are deployed.

[0007] However, while containers can be scaled quickly, the processing time required for the nodes that form the resource base of the container platform can be long, which can cause delays in the container deployment process and adverse effects on the provision of services to users, for example, when adding a node while the container platform is in a high operating state. On the other hand, if resources are provided with a surplus in consideration of such circumstances, costs will be wasted on unused resources.

[0008] Therefore, the present invention aims to provide a load balancing device, load balancing system, and load balancing method that can reduce the costs associated with unused resources while suppressing the occurrence of deployment processing delays and adverse effects on service provision, thereby ensuring convenience for users and contributing from an economic perspective. [Means for solving the problem]

[0009] According to a first aspect of the present invention, there is provided a load balancing device as described below. The load balancing device includes a scheduler and a scaler. The scheduler deploys containers to nodes of a container platform. The scaler obtains resource information from the container platform. The scaler obtains external information related to containers to be deployed to the container platform. The scaler determines resources of the container platform based on the resource information and the external information, and removes a node of the container platform if it determines that there are excess resources, and adds a node of the container platform if it determines that there are insufficient resources.

[0010] According to a second aspect of the present invention, there is provided a load balancing system as follows. The load balancing system includes a container board having a plurality of nodes for storing containers, and a load balancing device connected to the container board and deploying containers to the nodes of the container board. The load balancing device includes a processor and a storage unit. The processor acquires resource information from the container board, stores the acquired resource information in the storage unit, acquires external information related to containers to be deployed to the container board, and stores the acquired external information in the storage unit. The processor determines resources of the container board based on the resource information and external information stored in the storage unit, and deletes a node of the container board if it is determined that there is an excess of resources, and adds a node of the container board if it is determined that there is a shortage of resources.

[0011] According to a third aspect of the present invention, there is provided a load balancing method as follows. This load balancing method is performed using a load balancing device that includes a processor and a storage unit and deploys data to a container-based node. The processor acquires resource information from the container base, stores the acquired resource information in the storage unit, acquires external information related to a container to be deployed to the container base, stores the acquired external information in the storage unit, determines resources of the container base based on the resource information stored in the storage unit and the external information, deletes a container-based node if it is determined that there is an excess of resources, and adds a container-based node if it is determined that there is a shortage of resources. Effect of the Invention

[0012] According to the present invention, a load balancing device, a load balancing system, and a load balancing method are provided that can reduce costs associated with unused resources while suppressing deployment processing delays and adverse effects on service provision, thereby ensuring user convenience and contributing from an economic perspective. Note that problems, configurations, and effects other than those described above will be made clear by the following description of the embodiment of the invention. [Brief description of the drawings]

[0013] [Figure 1] FIG. 2 is a diagram illustrating an example of an outline of a process performed by a load balancing device. [Diagram 2] FIG. 1 is a diagram illustrating an overview of an example in which a load balancer is applied in combination with a CI / CD pipeline of a development environment. [Diagram 3] FIG. 1 is a diagram illustrating an overview of an example in which a load balancer is applied in combination with a CI / CD pipeline of a development environment. [Figure 4] FIG. 2 illustrates an example of a configuration of a load balancing device. [Diagram 5] 13 is a flowchart illustrating an example of a process of a schedule mechanism. [Figure 6] 13 is a flowchart illustrating an example of a process of a scale mechanism. [Figure 7] FIG. 13 is a diagram illustrating an example of information obtained from a CI / CD pipeline. [Figure 8A] 13 is a flowchart showing an example of scale determination. [Figure 8B] 8B is a flowchart showing an example of scale determination, which is a continuation of FIG. 8A. [Figure 9] FIG. 11 is a diagram illustrating an example of information acquired regarding a node group. [Figure 10] 13A and 13B are diagrams illustrating an example of previous values ​​and current values ​​of information acquired regarding a node group. [Figure 11] 13 is a flowchart illustrating an example of a process when a node is added. [Figure 12] 13 is a flowchart illustrating an example of a process when deleting a node. [Figure 13] FIG. 13 is a diagram showing an example of the calculation results of (A) and (ΔA). [Figure 14] FIG. 11 is a diagram showing an example of a scale determination result. [Figure 15] FIG. 13 is a diagram illustrating an example of a calculation result of surplus resource costs. [Figure 16] FIG. 2 is a diagram illustrating an example of a hardware configuration of the entire system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The embodiment is an example for explaining the present invention, and for the sake of clarity, some details have been omitted or simplified. The present invention can be implemented in various other forms. As examples of various information, the various information may be described using expressions such as "table," "list," and "queue," but the various information may be expressed using data structures other than these. For example, various information such as "XX table," "XX list," and "XX queue" may be expressed as "XX information." When describing identification information, expressions such as "identification information," "identifier," "name," "ID," and "number" are used, but these are mutually interchangeable.

[0015] First, an overview of a processing example of the load balancer of this embodiment will be described with reference to FIG. 1 to FIG. 3. The load balancer 11 can manage the resources of the container board 21. That is, as shown in FIG. 1, for example, when the resources of the container board 21 are insufficient and a container cannot be deployed to the container board 21, the load balancer 11 performs control to add a node to the container board 21. Here, the load balancer 11 obtains external information in addition to information from the container board 21, and performs control to add a node based on the information. The external information is information about the container to be deployed to the container board 21, and is information according to the use of the environment (for example, information about the status of a CI job in a development environment). Then, when a node is newly added to the container board 21, the load balancer 11 deploys the container to the container board 21 (the added node in this example). It is to be noted that an external resource 31 may be used depending on the situation. Also, in FIG. 1 and the like, the priority of the processing is expressed by "high", "medium", and "low".

[0016] Next, with reference to FIG. 2-FIG. 3, an example of applying the load balancer 11 in combination with a CI / CD pipeline of a development environment will be described. As shown in FIG. 2, when a developer pushes code and the CI / CD pipeline starts, a container image is generated (built) in the CI / CD pipeline. Here, the load balancer 11 detects the start of the pipeline and acquires external information related to the container. Then, when a container to be deployed is generated (i.e., while the build is continuing in the build stage), the load balancer 11 performs control to add a node in the container base 21 according to the information from the container base 21 and the external information. After that, the load balancer 11 deploys the built container image to the container base 21, and a test (test stage) for verifying the code is started.

[0017] Next, a configuration example of a load balancing device will be described with reference to FIG. 4. FIG. 4 is a diagram showing an example of the configuration of a load balancing device. As shown in FIG. 4, the load balancing device 11 includes a scale mechanism 17 and a schedule mechanism 18 as program modules, and in the load balancing device 11, the scale mechanism 17 and the schedule mechanism 18 cooperate with each other to perform processing. The scale mechanism 17 performs scaling based on the resource usage status of the container base 21 and external information. That is, the scale mechanism 17 makes a scale-out / scale-in decision according to the resources of the container base 21. The schedule mechanism 18 makes a decision to deploy each container for which a deployment instruction has been issued to the container base 21 or the external resource 31 based on the described request.

[0018] Next, an example of the process of the schedule mechanism will be described with reference to FIG. 5. FIG. 5 is a flowchart showing an example of the process of the schedule mechanism. In the example of FIG. 5, input and output of information with the outside are indicated by dashed lines. In this example, a series of process flows in a development environment will be described. That is, as described above, a developer pushes code, the CI / CD pipeline starts, and the build of a container image begins. Then, after the build is completed, a deployment request (deployment instruction) is input to the load balancer. Then, after the deployment is completed, a test is executed, and the CI / CD pipeline ends.

[0019] The scheduling mechanism 18 receives a request for container deployment (S501). The scheduling mechanism 18 also determines whether there is an unscheduled container (i.e., whether there is a container that has not yet been processed) (S502). If there is an unscheduled container, the scheduling mechanism 18 determines whether the container base 21 has resources for the container to be deployed and whether the container can be deployed (S503). If the container can be deployed, the scheduling mechanism deploys the container (S504).

[0020] On the other hand, if it is determined that the container is not deployable, the scheduler 18 notifies the scaler 17 of that fact (S505) and determines whether there is a container that can be evacuated in the container base 21 (S506). If it is determined that there is a container that can be evacuated, the scheduler 18 evacuates this container (S507) and deploys the unscheduled container (S504). If it is determined that there is no container that can be evacuated, the scheduler 18 determines whether the external resource 31 is available based on the information of the unscheduled container (S508). If the scheduler 18 determines that the external resource 31 is available, the scheduler 18 deploys the unscheduled container to the external resource 31 (S509). On the other hand, if it is determined that the external resource is not available, the scheduler 18 returns the unscheduled container to the queue (S510).

[0021] The deployment request includes information about the resources (CPU, memory, persistent storage) required by the container. Depending on the request, some containers may only be able to be deployed to specific nodes (for example, if a created AWS EBS is used as persistent storage, the container cannot be deployed to any AZ other than the one where the EBS is located), but the scheduler 18 makes its decision based on such information.

[0022] The scheduler 18 also appropriately determines whether the external resource 31 is available. For example, if a container to be deployed (i.e., an unscheduled container) does not communicate with other containers (e.g., in the case of unit testing), it does not necessarily need to be deployed to a cluster, so the scheduler 18 determines that the external resource 31 is available. On the other hand, if a container to be deployed has a dependency relationship with another container, it will not work if deployed to a different location, so the scheduler 18 determines that the external resource 31 is unavailable.

[0023] Next, an example of the processing of the scale mechanism will be described with reference to Fig. 6. Fig. 6 is a flowchart showing an example of the processing of the scale mechanism. In the example of Fig. 6, input and output of information with the outside are indicated by dashed lines. As with the case of the schedule mechanism, this example will also be described as a series of processing flows in the development environment.

[0024] The scale mechanism 17 monitors the state of the container board 21 (S601). The scale mechanism 17 also acquires information on the CI / CD pipeline (S602). The scale mechanism 17 then determines whether the resources of the container board 21 are necessary and sufficient (S603). If it is determined that the resources of the container board 21 are excessive, the scale mechanism 17 instructs the deletion of a node in the container board 21 (S604). On the other hand, if it is determined that the resources of the container board 21 are insufficient, the scale mechanism 17 instructs the addition of a node in the container board 21 (S605). If it is determined that the resources of the container board 21 are necessary and sufficient, the scale mechanism 17 does not perform scaling (i.e., adding or deleting a node). The scale mechanism 17 then waits for a certain period of time (S606) and repeats the process.

[0025] The scale mechanism 17 performs the above-mentioned scale determination based on a notification that container deployment is not possible or a notification of the start of a CI / CD pipeline from the schedule mechanism 18. Details of the scale determination will be described later.

[0026] Next, an example of information of the CI / CD pipeline acquired by the scale mechanism 17 as external information will be described with reference to FIG. 7. FIG. 7 is a diagram showing an example of information acquired from the CI / CD pipeline. The required resources, type, purpose (batch processing or server), priority, and dependencies of the container to be deployed are acquired from the CI / CD pipeline. Note that this information is almost always written in the deployment request, and it is assumed that it is managed in a repository in the same way as the source code of the application.

[0027] As shown in FIG. 7, the information of the CI / CD pipeline includes, for example, a container name (identification information of the container), a use (use of the container), the number of replicas, a CPU request value (request resource of the container), a memory request value (request resource of the container), a priority (processing priority), and an affinity rule. In this example, this information is organized for each container. The number of replicas indicates the number of copies of data to be stored in the cluster. The CPU request value is a request value of the CPU (CPU core in this example), and the memory request value is a request value of the memory. The priority indicates the priority of processing the container. In this example, the load balancer 11 preferentially processes a container with a large positive priority. Therefore, the load balancer 11 preferentially processes container C, then processes container A, and then processes container B. The affinity rule indicates a constraint condition. In this example, there is a description regarding AZ (availability zone), and the condition that container C is deployed to a node of AZ-1 is determined by "limited to AZ-1" of container C. In this way, by setting affinity rules, it becomes possible to process containers that have dependency conditions.

[0028] Next, an example of scale determination will be described with reference to Fig. 8A and Fig. 8B. Fig. 8A and Fig. 8B are flowcharts showing an example of scale determination. Note that, here, scale determination will be described for the case where the data shown in Fig. 7 is acquired. Therefore, an example of scale determination based on container C with a high priority will be described.

[0029] First, the scaling mechanism 17 acquires preset thresholds (S801). That is, the scaling mechanism 17 acquires thresholds H and P. Here, threshold H determines the minimum amount of free resources to be left. Threshold P determines the allowable amount of free resources, and is set so that there are resources for one or more nodes. Note that in this specification, threshold H may be indicated as (H) and threshold P as (P).

[0030] Next, the scaling mechanism 17 obtains a list of node groups from the container board 21, and excludes node groups that cannot satisfy the deployment request (S802). The scaling mechanism 17 excludes node groups that cannot satisfy the deployment request, for example, based on affinity rules. In the scaling determination based on container C, since there is a condition "limited to AZ-1", the scaling mechanism 17 excludes node groups other than AZ-1.

[0031] An example of information acquired from the container infrastructure will now be described with reference to Fig. 9. Fig. 9 shows an example of information acquired regarding a node group.

[0032] 9, information is stored for each node group (#1 to #6). This information includes the availability zone of the node group, the CPU capacity of one node in the node group, the memory capacity of one node in the node group, the current number of nodes, the minimum number of nodes, the maximum number of nodes, and the node cost.

[0033] Therefore, when the scaling mechanism 17 performs a scaling decision based on container C using the information shown in FIG. 9, the scaling mechanism 17 excludes the node groups (#2, 3, 5, 6) related to "AZ-2" and "AZ-3" based on the affinity rules and proceeds with the processing.

[0034] Next, the scaling mechanism 17 acquires the CPU capacity per node, the memory capacity per node, the current number of nodes, the upper limit (maximum number of nodes), and the lower limit (minimum number of nodes) (S803). In this example, the scaling mechanism acquires data of the node group (#1, 4) in the scaling judgment based on the container C.

[0035] In the explanation of this specification, each node group may be denoted as G1, G2.... In addition, the amount of CPU per node for each node group may be denoted as C1, C2..., the amount of memory per node for each node group may be denoted as M1, M2..., the current number of nodes for each node group may be denoted as D1, D2..., the maximum number of nodes for each node group may be denoted as U1, U2..., the minimum number of nodes for each node group may be denoted as L1, L2..., and the node cost per node for each node group may be denoted as Y1, Y2....

[0036] Next, the scaling mechanism 17 calculates the free resources (A) of the container base 21 (S804). Here, for CPU and memory, the scaling mechanism 17 calculates the difference between the node resource and the larger of the total container request value or the most recent average actual usage, and calculates the sum of the differences for each node as (A). That is, for the CPU / memory of each node, the scaling mechanism 17 calculates the node resource-MAX (total container request value, most recent average actual usage), and calculates the sum as (A). In this example, the scaling mechanism 17 performs calculations for node group #1 and node group #4.

[0037] An example of the calculation of (A) will be described with reference to Fig. 10. Fig. 10 is a diagram showing an example of previous and current values ​​of information acquired regarding a node. In the example of Fig. 10, the total request (i.e., the total of container request values) and usage (average of actual usage) for the CPU and memory resources of one node are stored for each node group.

[0038] In the case of node group #1, the total CPU request value of the previous value and the current value is 3.90, the CPU usage value of the previous value is 2.05, and the CPU usage value of the current value is 1.05. In addition, the total memory request value of the previous value and the current value is 7.5, the memory usage value of the previous value is 7.6, and the memory usage value of the current value is 7.0.

[0039] Therefore, in calculating the free CPU and memory resources of the nodes in node group #1 from the previous time, the scaling mechanism 17 calculates the CPU amount as 3.90 and the memory amount as 7.6. In addition, in calculating the free CPU and memory resources of the nodes in node group #1 this time, the scaling mechanism 17 calculates the CPU amount as 3.90 and the memory amount as 7.5.

[0040] For node group #4, the total CPU request value for the previous value and the current value is 3.90, and the CPU usage value for the previous value and the current value is 3.25. The total memory request value for the previous value and the current value is 15.5, the memory usage value for the previous value is 15.4, and the memory usage value for the current value is 15.0.

[0041] Therefore, in calculating the free CPU and memory resources of the nodes in node group #4 from the previous time, the scaling mechanism 17 calculates the CPU amount as 3.90 and the memory amount as 15.5. In addition, in calculating the free CPU and memory resources of the nodes in node group #4 this time, the scaling mechanism 17 calculates the CPU amount as 3.90 and the memory amount as 15.5.

[0042] Next, the scale mechanism 17 calculates (ΔA), which is the tendency of (A) (S805). The scale mechanism 17 calculates (ΔA) by subtracting the previous value of (A) from the current value of (A).

[0043] Next, the scaling mechanism 17 calculates a resource request value of the container to be deployed (S806). In this specification, this resource request value may be indicated by (B). The scaling mechanism 17 checks whether a resource request value is specified in the deployment request in the external information related to the container to be deployed. If a resource request value is specified in the deployment request, the scaling mechanism 17 extracts this resource request value, and if a resource request value is not specified in the deployment request, the scaling mechanism 17 obtains a default value for the namespace.

[0044] Then, the scaling mechanism 17 performs a scaling determination for the CPU and memory based on (A), (ΔA), (B), (H), and (P) (S807). If the scaling mechanism 17 determines that there is a relationship of (A)-(B)<(H) or (A)+(ΔA)-(B)<(H), it selects a node group for increasing the number of nodes (S808) and issues a node addition instruction (S809). Details of S808 to S809 will be described later. If the scaling mechanism 17 determines that there is a relationship of (A)-(B)>(P) and (A)+(ΔA)-(B)>(P), it selects a node group for decreasing the number of nodes (S810) and issues a node deletion instruction (S811). Details of S810 to S811 will be described later. In other cases, the scaling mechanism 17 does not perform scaling (addition or deletion of a node).

[0045] The process of S808 to S809 will be described in detail with reference to Fig. 11. Fig. 11 is a flowchart showing an example of the process when a node is added.

[0046] The scaling mechanism 17 selects one of the node groups (S1101) and determines whether the maximum number of nodes has been reached for this node group (S1102). In Fig. 11, Dn indicates the current number of nodes in a node group, and Un indicates the maximum number of nodes in the node group. If the scaling mechanism 17 determines that the maximum number of nodes has not been reached, it calculates the surplus resources required when adding one node (S1103). The scaling mechanism 17 performs this process for all node groups.

[0047] The calculation of surplus resources when adding one node in S1103 will be described below. The scale mechanism 17 performs the calculation for each of the CPU and the memory.

[0048] The scale mechanism 17 calculates surplus CPU resources based on the formula Xcn=Ac+MIN(ΔAc,0)+Cn-Bc. In this formula, Xcn indicates surplus CPU resources when adding one node in the target node group. Ac indicates free CPU resources. MIN(ΔAc,0) indicates using the smaller value of ΔAc or 0, and ΔAc indicates the trend of Ac. ΔAc is calculated by subtracting the previous value of Ac from the current value of Ac. Cn indicates the CPU amount of one node in the target node group. Bc indicates a CPU request value based on external information about the container to be deployed.

[0049] The scale mechanism 17 calculates surplus memory resources based on the formula Xmn=Am+MIN(ΔAm,0)+Mn-Bm. Here, in this formula, Xmn indicates surplus memory resources when adding one node in the target node group. Am indicates free memory resources. MIN(ΔAm,0) indicates using the smaller value of ΔAm or 0, and ΔAm indicates the tendency of Am. ΔAm is calculated by subtracting the previous value of Am from the current value of Am. Mn indicates the memory amount of one node in the target node group. Bm indicates a memory request value based on external information about the container to be deployed.

[0050] After selecting all node groups, the scaling mechanism 17 determines whether or not a node group (Gn) exists that satisfies Xcn>Hc and Xmn>Hm (S1104). Here, Hc indicates a value related to the CPU of (H), and Hm indicates a value related to the memory of (H). If the scaling mechanism 17 determines that a node group that satisfies the above conditions exists, it selects a node group with the smallest surplus resource cost (S1105). If the scaling mechanism 17 determines that a node group that satisfies the above conditions does not exist, it selects a node group with the largest shortage of resources (S1107).

[0051] S1105 will be described in detail. The scale mechanism 17 selects the node group (Gx) for which ((Xcn-Hc) / Cn+(Xmn-Hm) / Mn)×Yn is the smallest. Here, Yn indicates the node cost of a certain node group. The scale mechanism 17 then increases the number of nodes in the selected node group (Gx) by 1 (S1106). In S1105, the amount of surplus resources after adding the nodes is calculated for each CPU and memory, and the sum is multiplied by the node cost to obtain the calculated value. The smaller this value is, the more the added node fits the shortage, and the more the surplus cost can be reduced (for example, if there is a CPU shortage, a node with more CPUs is added, and if there is a memory shortage, a node with more memory is added).

[0052] S1107 will be explained in detail. The scale mechanism 17 selects the node group (Gx) for which MIN((Xcn-Hc) / Cn, (Xmn-Hm) / Mn) is maximized. Then, the scale mechanism 17 increases the number of nodes in the selected node group (Gx) by 1 (S1108). S1107 occurs when the resource shortage cannot be resolved by adding any one node. Therefore, both arguments of the MIN function are always negative (i.e., resource shortage). Here, when adding a node that can resolve the resource shortage, the closer this negative value is to 0, the more the resource shortage will be resolved. Therefore, by passing it through the MIN function, the value of CPU or memory, whichever is more insufficient, is adopted, and a node that brings that value closer to 0 is added.

[0053] After the node is added in S1108, the process returns to S1101, and the scaling mechanism 17 moves to the process of adding another node. Note that if all node groups have reached the maximum number of nodes, the scaling mechanism 17 determines the end of the process in S1104.

[0054] The process of S810 to S811 will be described in detail with reference to Fig. 12. Fig. 12 is a flowchart showing an example of a process when deleting a node.

[0055] The scaling mechanism 17 selects one of the node groups (S1201) and determines whether the minimum number of nodes has been reached for this node group (S1202). In Fig. 12, Dn indicates the current number of nodes in a node group, and Ln indicates the minimum number of nodes in the node group. If the scaling mechanism 17 determines that the selected node group contains more than the minimum number of nodes, it determines whether there are any nodes that can be deleted (S1203).

[0056] S1203 will be explained in detail. When a node is deleted, containers running on the node are evacuated. Basically, it is ideal to be able to evacuate each container at any time, but there are containers such as batch processing containers where interruption of processing can have a large impact. If such a container is not running, it is determined that it can be deleted. There are two methods for specifying containers that cannot be evacuated: automatic (for example, the container is designated as a system management container) and manual (for example, by adding a label).

[0057] Then, when the scale mechanism 17 determines that there is a node that can be deleted, it calculates the surplus resources when one node is deleted (S1204). The scale mechanism 17 executes this process for all node groups.

[0058] The calculation of surplus resources when one node is deleted in S1204 will be described below. The scale mechanism 17 performs the calculation for each of the CPU and the memory.

[0059] The scale mechanism 17 calculates surplus CPU resources based on the formula Xcn=Ac+MIN(ΔAc,0)-Cn-Bc. In this formula, Xcn indicates surplus CPU resources when one node is deleted from the target node group. Ac indicates free CPU resources. MIN(ΔAc,0) indicates using the smaller value of ΔAc or 0, and ΔAc indicates the trend of Ac. ΔAc is calculated by subtracting the previous value of Ac from the current value of Ac. Cn indicates the CPU amount of one node in the target node group. Bc indicates a CPU request value based on external information about the container to be deployed.

[0060] The scale mechanism 17 calculates surplus memory resources based on the formula Xmn=Am+MIN(ΔAm,0)-Mn-Bm. Here, in this formula, Xmn indicates surplus memory resources when one node is deleted from the target node group. Am indicates free memory resources. MIN(ΔAm,0) indicates using the smaller value of ΔAm or 0, and ΔAm indicates the tendency of Am. ΔAm is calculated by subtracting the previous value of Am from the current value of Am. Mn indicates the memory amount of one node in the target node group. Bm indicates a memory request value based on external information about the container to be deployed.

[0061] After selecting all node groups, the scaling mechanism 17 determines whether a node group (Gn) exists that satisfies Xcn>Hc and Xmn>Hm (S1205). Here, Hc indicates a value related to the CPU of (H), and Hm indicates a value related to the memory of (H). If the scaling mechanism 17 determines that a node group that satisfies the above conditions exists, it selects a node group with the smallest surplus resource cost (S1206).

[0062] S1206 will be described in detail. The scale mechanism 17 selects the node group (Gx) for which ((Xcn-Hc) / Cn+(Xmn-Hm) / Mn)×Yn is the smallest. Here, Yn indicates the node cost of a certain node group. The scale mechanism 17 then reduces the number of nodes in the selected node group (Gx) by 1 (S1207). In S1206, the amount of surplus resources after node deletion is calculated for each CPU and memory, and the sum of these values ​​is multiplied by the node cost to obtain the calculated value. The smaller this value is, the more the node to be deleted fits into the surplus, and the more the surplus cost can be reduced (for example, if there is an excess of CPU, a node with a large CPU will be removed, and if there is an excess of memory, a node with a large memory will be removed).

[0063] After the nodes are reduced in S1207, the scaling mechanism 17 determines whether there are still surplus resources (S1208). If it is determined that there are surplus resources, the process returns to S1201, and the scaling mechanism 17 transitions to processing for further reducing another node. In S1208, it is determined whether Xcx>Pc and Xmx>Pm are satisfied. Here, Xcx indicates surplus CPU resources when one node is removed from the node group processed in S1207. Xmx indicates surplus memory resources when one node is removed from the node group processed in S1207. Pc indicates (P) related to the CPU, and Pm indicates (P) related to the memory.

[0064] Next, an example of the operation of the scale mechanism will be described with reference to Figures 13 to 15. In this example, a case will be described in which the information shown in Figure 7 is acquired as external information, and the information shown in Figures 9 and 10 is acquired regarding the container platform information.

[0065] First, the scale mechanism 17 executes the process of container C, which has the highest priority. Here, the affinity rule for container C is referred to, and a process that satisfies the affinity rule is performed.

[0066] The scale mechanism 17 acquires threshold values. Here, Hc=0, Hm=0, Pc=4, and Pm=8 (GB).

[0067] The scaling mechanism 17 obtains information about the list of node groups (here, the information shown in FIGS. 9 and 10) from the container board 21. The scaling mechanism 17 leaves only node group #1 and node group #4 in accordance with the affinity rules and continues processing.

[0068] The scale mechanism 17 calculates (A) and (ΔA). That is, it calculates the values ​​of the CPU and the memory. The calculation results are shown in FIG. 13.

[0069] The scale mechanism 17 calculates (B) based on external information. Here, Bc=0.5 and Bm=0.1 are calculated.

[0070] The scale mechanism 17 performs scale determination. The determination result is shown in FIG.

[0071] The scaling mechanism 17 selects a node group to scale and performs the scaling. Figure 15 shows the calculation result of the surplus resource cost. In this example, the surplus cost resource value of node group #1 is lower, so the number of nodes in node group #1 is increased by 1 (1 ⇒ 2).

[0072] The scale mechanism 17 performs scale determination for the remaining containers A and B in a similar manner.

[0073] Next, an example of a hardware configuration will be described with reference to Fig. 16. Fig. 16 is a diagram showing an example of a hardware configuration of the entire system.

[0074] As shown in Fig. 16, the system (load balancing system 41) includes a load balancing device 11, a container base 21 (cluster), and an external resource 31. A user (e.g., a developer) can use the load balancing device 11 by connecting a computer (client) to the load balancing device 11. The user can connect to, for example, the Internet, a dedicated line, a virtual private network (VPN), or the like. A cloud provider (or an operator) performs configuration work for the load balancing device 11 and preparation work (provisioning) for the container base 21.

[0075] The load balancing device 11 is configured as a computer including a CPU 12 (processor), memory 13 (RAM in this example), auxiliary storage device 14 (constituting a storage unit, SSD in this example), and a network interface 15, and is a device that performs data load balancing and distributes data to nodes. The load balancing device 11 executes the processes described above. Here, the auxiliary storage device 14 stores data such as acquired resource information and external information. The auxiliary storage device 14 also stores a scale mechanism 17 and a schedule mechanism 18. Then, the CPU 12 reads the data into the memory 13 and executes the specified process.

[0076] The container platform 21 has multiple availability zones (or data centers), and nodes that deploy containers are appropriately placed in each availability zone. In this example, the node is configured as a computer equipped with a CPU, memory (RAM in this example), auxiliary storage device (SSD in this example), and a network interface.

[0077] This system also includes an external resource 31, which includes a computer (machine) including a CPU, a memory (RAM in this example), an auxiliary storage device (SSD in this example), and a network interface. The external resource 31 is used, for example, to evacuate a container as necessary when deploying the container.

[0078] Although the embodiments of the present invention have been described above in detail, the present invention is not limited to the above-described embodiments, and various design changes can be made without departing from the spirit of the present invention described in the claims. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and the present invention is not necessarily limited to those having all of the configurations described. In addition, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace a part of the configuration of each embodiment with another configuration.

[0079] It is sufficient that the predetermined processing is executed, and may be changed as appropriate. For example, although an example in which the CPU 12 is a processor has been described, other types of semiconductor devices may be used to perform similar data processing. Although an SSD has been described as the auxiliary storage device 14, other types of devices (e.g., HDD) may be used. Other hardware configurations may also be changed as appropriate as long as they are capable of executing the predetermined processing.

[0080] Apart from the above-mentioned development environment, the load balancer 11 may determine the number of containers required based on a supply and demand forecast of resources in the production environment, and may make a scale decision of the platform based on the resources of the container platform 21. For example, it is predicted that demand will increase at the end of the month or during busy periods. Here, the load balancer 11 may obtain (calculate) a supply and demand forecast based on data that automatically records changes in resources. In addition, the supply and demand forecast may be obtained, for example, from an external source and preregistered in the load balancer 11. The load balancer 11 makes a scale decision at the required timing, and prepares resources according to the supply and demand forecast in the production environment. [Explanation of symbols]

[0081] 11 Load balancer 12 CPU (processor) 13. Memory 14 Auxiliary storage device (storage unit) 15 Network Interface 17 Scale mechanism 18 Scheduling Mechanism 21 Container Platform 31 External Resources 41 Load Balancing System

Claims

1. A scheduler for deploying containers to container-based nodes; A scale mechanism that acquires CPU and memory resource information from the container platform; Equipped with The scale mechanism includes: Acquire information including a CPU requirement value and a memory requirement value regarding a container to be deployed on the container platform; Determining the container-based resources based on the CPU and memory resource information and the acquired CPU requirement value and memory requirement value, and deleting a node of the container-based resources when it is determined that the resources are excessive, and adding a node of the container-based resources when it is determined that the resources are insufficient; The schedule mechanism includes: determining whether the container can be deployed on the container infrastructure based on a container deployment request; If it is determined that the container is deployable, deploying the container to the container infrastructure; if it is determined that the container cannot be deployed, determine whether the container can be deployed on an external resource, and if it is determined that the container can be deployed on the external resource, deploy the container on the external resource; A load balancing device comprising:

2. 2. The load balancing device according to claim 1, The scale mechanism includes: Obtaining information about containers to be deployed from the CI / CD pipeline in the development environment, A load balancing device comprising:

3. 3. The load balancing device according to claim 2, The information further includes container identification information, container usage, processing priority, and affinity rules. A load balancing device comprising:

4. 2. The load balancing device according to claim 1, The scale mechanism includes: Based on a supply and demand forecast of resources in a production environment and information on CPU and memory resources of the container platform, a scaling decision is made for the container platform, and resources are prepared according to the supply and demand forecast. A load balancing device comprising:

5. a container platform having a plurality of nodes for storing containers; a load balancing device connected to the container platform and configured to deploy containers to nodes of the container platform; Equipped with The load balancing device includes: A processor and a storage unit are provided. The processor, Acquire CPU and memory resource information from the container base, and store the acquired resource information in the storage unit; Acquire information including a CPU requirement value and a memory requirement value related to a container to be deployed on the container platform, and store the acquired information in the storage unit; determining resources of the container base based on the CPU and memory resource information stored in the storage unit and the acquired CPU requirement value and memory requirement value, deleting a node of the container base when it is determined that the resources are excessive, and adding a node of the container base when it is determined that the resources are insufficient; determining whether the container can be deployed on the container infrastructure based on a container deployment request; If it is determined that the container is deployable, deploying the container to the container infrastructure; if it is determined that the container cannot be deployed, determine whether the container can be deployed on an external resource, and if it is determined that the container can be deployed on the external resource, deploy the container on the external resource; A load balancing system comprising:

6. A load balancing method using a load balancing device that includes a processor and a storage unit and deploys data to a container-based node, the method comprising: The processor, Acquire CPU and memory resource information from the container base, and store the acquired resource information in the storage unit; Acquire information including a CPU requirement value and a memory requirement value related to a container to be deployed on the container platform, and store the acquired information in the storage unit; determining resources of the container base based on the CPU and memory resource information stored in the storage unit and the acquired CPU requirement value and memory requirement value, deleting a node of the container base when it is determined that the resources are excessive, and adding a node of the container base when it is determined that the resources are insufficient; determining whether the container can be deployed on the container infrastructure based on a container deployment request; If it is determined that the container is deployable, deploying the container to the container infrastructure; if it is determined that the container cannot be deployed, determine whether the container can be deployed on an external resource, and if it is determined that the container can be deployed on the external resource, deploy the container on the external resource; A load balancing method comprising:

7. A program for causing a processor to execute the load balancing method according to claim 6.

8. A scheduler for deploying containers to container-based nodes; A scale mechanism that acquires CPU and memory resource information from the container platform; Equipped with The scale mechanism includes: Acquire information including a CPU requirement value and a memory requirement value regarding a container to be deployed on the container platform; determining the container-based resources based on the CPU and memory resource information and the acquired CPU requirement value and memory requirement value, and deleting a node of the container-based resources when it is determined that the resources are excessive, and adding a node of the container-based resources when it is determined that the resources are insufficient; In the container-based resource determination, Regarding CPU: A value (Ac) obtained by calculating the difference between the node's resource and the total of the container's requested value or the most recent average of the actual usage, whichever is larger, and then calculating the total of the differences for each node in the group; A value (ΔAc) calculated by subtracting the previous value from the current value of the value (Ac); The required value (Bc) of the container to be deployed, A threshold (Hc) of free resources to be left; A threshold value (Pc) of the allowable free resources; and Regarding memory: Calculate the difference between the node's resource and the total of the container's requested values ​​or the most recent average of the actual usage, whichever is greater, and then calculate the total of the differences for each node in the group (Am); A value (ΔAm) calculated by subtracting the previous value from the current value of the value (Am); The required value (Bm) of the container to be deployed, A threshold value (Hm) of free resources to be left; A threshold value of the allowable free resources (Pm), A judgment is made using If (Ac)-(Bc)<(Hc), (Ac)+(ΔAc)-(Bc)<(Hc), (Am)-(Bm)<(Hm), or (Am)+(ΔAm)-(Bm)<(Hm), it is determined that the container-based resource is insufficient; If (Ac)-(Bc)>(Pc) and (Ac)+(ΔAc)-(Bc)>(Pc), or if (Am)-(Bm)>(Pm) and (Am)+(ΔAm)-(Bm)>(Pm), it is determined that the container-based resource is excessive. A load balancing device comprising:

9. 9. The load balancing device according to claim 8, The scale mechanism includes: Obtaining information about containers to be deployed from the CI / CD pipeline in the development environment, A load balancing device comprising:

10. 10. The load balancing device according to claim 9, The information further includes container identification information, container usage, processing priority, and affinity rules. A load balancing device comprising:

11. 9. The load balancing device according to claim 8, The scale mechanism includes: Based on a supply and demand forecast of resources in a production environment and information on CPU and memory resources of the container platform, a scaling decision is made for the container platform, and resources are prepared according to the supply and demand forecast. A load balancing device comprising:

12. 9. The load balancing device according to claim 8, The schedule mechanism includes: determining whether the container can be deployed on the container infrastructure based on a container deployment request; If it is determined that the container is deployable, deploying the container to the container infrastructure; if it is determined that the container cannot be deployed, determine whether the container can be deployed on an external resource, and if it is determined that the container can be deployed on the external resource, deploy the container on the external resource; A load balancing device comprising:

13. a container platform having a plurality of nodes for storing containers; a load balancing device connected to the container platform and configured to deploy containers to nodes of the container platform; Equipped with The load balancing device includes: A processor and a storage unit are provided. The processor, Acquire CPU and memory resource information from the container base, and store the acquired resource information in the storage unit; Acquire information including a CPU requirement value and a memory requirement value related to a container to be deployed on the container platform, and store the acquired information in the storage unit; determining resources of the container base based on the CPU and memory resource information stored in the storage unit and the acquired CPU requirement value and memory requirement value, deleting a node of the container base when it is determined that the resources are excessive, and adding a node of the container base when it is determined that the resources are insufficient; In the container-based resource determination, Regarding CPU: A value (Ac) obtained by calculating the difference between the node's resource and the total of the container's requested value or the most recent average of the actual usage, whichever is larger, and then calculating the total of the differences for each node in the group; A value (ΔAc) calculated by subtracting the previous value from the current value of the value (Ac); The required value (Bc) of the container to be deployed, A threshold (Hc) of free resources to be left; A threshold value (Pc) of the allowable free resources; and Regarding memory: Calculate the difference between the node's resource and the total of the container's requested values ​​or the most recent average of the actual usage, whichever is greater, and then calculate the total of the differences for each node in the group (Am); A value (ΔAm) calculated by subtracting the previous value from the current value of the value (Am); The required value (Bm) of the container to be deployed, A threshold value (Hm) of free resources to be left; A threshold value of the allowable free resources (Pm), A judgment is made using If (Ac)-(Bc)<(Hc), (Ac)+(ΔAc)-(Bc)<(Hc), (Am)-(Bm)<(Hm), or (Am)+(ΔAm)-(Bm)<(Hm), it is determined that the container-based resource is insufficient; If (Ac)-(Bc)>(Pc) and (Ac)+(ΔAc)-(Bc)>(Pc), or if (Am)-(Bm)>(Pm) and (Am)+(ΔAm)-(Bm)>(Pm), it is determined that the container-based resource is excessive. A load balancing system comprising:

14. A load balancing method using a load balancing device that includes a processor and a storage unit and deploys data to a container-based node, the method comprising: The processor, Acquire CPU and memory resource information from the container base, and store the acquired resource information in the storage unit; Acquire information including a CPU requirement value and a memory requirement value related to a container to be deployed on the container platform, and store the acquired information in the storage unit; determining resources of the container base based on the CPU and memory resource information stored in the storage unit and the acquired CPU requirement value and memory requirement value, deleting a node of the container base when it is determined that the resources are excessive, and adding a node of the container base when it is determined that the resources are insufficient; In the container-based resource determination, Regarding CPU: A value (Ac) obtained by calculating the difference between the node's resource and the total of the container's requested value or the most recent average of the actual usage, whichever is larger, and then calculating the total of the differences for each node in the group; A value (ΔAc) calculated by subtracting the previous value from the current value of the value (Ac); The required value (Bc) of the container to be deployed, A threshold (Hc) of free resources to be left; A threshold value (Pc) of the allowable free resources; and Regarding memory, Calculate the difference between the node's resource and the total of the container's requested values ​​or the most recent average of the actual usage, whichever is greater, and then calculate the total of the differences for each node in the group (Am); A value (ΔAm) calculated by subtracting the previous value from the current value of the value (Am); The required value (Bm) of the container to be deployed, A threshold value (Hm) of free resources to be left; A threshold value of the allowable free resources (Pm), A judgment is made using If (Ac)-(Bc)<(Hc), (Ac)+(ΔAc)-(Bc)<(Hc), (Am)-(Bm)<(Hm), or (Am)+(ΔAm)-(Bm)<(Hm), it is determined that the container-based resource is insufficient; If (Ac)-(Bc)>(Pc) and (Ac)+(ΔAc)-(Bc)>(Pc), or if (Am)-(Bm)>(Pm) and (Am)+(ΔAm)-(Bm)>(Pm), it is determined that the container-based resource is excessive. A load balancing method comprising:

15. A program causing a processor to execute the load balancing method according to claim 14.

Citation Information

Patent Citations

  • Apparatus, method and program for predicting resource capacity

    JP2013175085A

  • Dynamic code deployment and versioning

    JP2017534107A

  • Security protocol for low-latency execution of program code

    JP2018512087A

  • Cluster resource allocation and management method on cloud platform

    JP2021530801A

  • Service orchestration within a distributed POD based system

    WO2022103689A1