POD load scheduling and distribution method, device and storage medium

By calculating the ratio of POD requirements to node resources and the average and difference of resource utilization, combined with deviation calculation, the demand receiving node is determined, which solves the problem of node load imbalance caused by Kubernetes scheduling strategy and improves the stability of the cluster.

CN119248461BActive Publication Date: 2025-03-28KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411794668.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-28
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

Existing Kubernetes scheduling strategies can easily lead to unbalanced node load, resulting in low node stability, thereby reducing the stability of the cluster.

Method used

By calculating the ratio of the POD demand request amount to the total resource amount of each node, the average value and difference of resource utilization, and the deviation between the average load of each node and the node after receiving the demand, the demand receiving node is determined so that the difference between the load rate of each node and the average value of the node resource utilization rate after the allocation is smaller than the preset difference threshold.

Benefits of technology

A better balance of cluster load is achieved, reducing the risk of sharp changes in node loads, thereby improving the stability of clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248461B_ABST
    Figure CN119248461B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a POD load scheduling and allocation method, device and storage medium, the method comprising: calculating the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD; calculating the average value of the resource utilization of all nodes, and the difference between the current resource utilization of each node and the average value; calculating the deviation of each node from the average load of the node after each node receives the demand according to the average value, the difference and the ratio; determining the demand receiving node according to the deviation of each node from the average load of the node after receiving the demand, so that the difference between the load rate of each node after allocation and the average value of the node resource utilization rate is less than a preset difference threshold. It can further balance the load of the cluster as a whole and improve the stability of the cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of container technology, and in particular to a POD load scheduling and distribution method, device and storage medium. Background Art

[0002] Kubernetes, abbreviated as k8s, is an open source container orchestration management tool. POD is the smallest control unit of k8s, used to carry and run actual applications, and is also the smallest scheduling unit in k8s. POD can also be started and run independently without the need for a controller in k8s.

[0003] In Kubernetes, it is supported to specify resource requests for containers in PODs. Resource requests are the expected values ​​of the required resources for the container. The scheduler will match the allocatable resources within the node in the Kubernetes cluster with the resource requests of the container to determine which node the POD should be assigned to. When a user submits a POD to the k8s cluster, a POD will be selected to start the scheduling operation. Each time a POD is scheduled, a computing node is first selected for the POD, and then the POD is bound to the computing node selected in the server and starts running on this computing node.

[0004] The existing native Kubernetes scheduling strategy tends to schedule PODs to nodes with more remaining resources. This method requires accurate definition of the remaining resource value of the node. Once the remaining resource value is set inaccurately, some nodes will not receive PODs, while other nodes will be overloaded, destroying the balance and stability of the cluster. Summary of the invention

[0005] The embodiments of the present invention provide a POD load scheduling and allocation method, device and storage medium to solve the problem that the POD load scheduling strategy in the prior art easily leads to unbalanced node loads, resulting in low node stability, thereby reducing the stability of the cluster.

[0006] In a first aspect, an embodiment of the present invention provides a POD load scheduling and allocation method, including:

[0007] Calculate the ratio of the demand request amount to the total resources of each node based on the POD demand;

[0008] Calculate the average resource utilization of all nodes and the difference between the current resource utilization of each node and the average resource utilization;

[0009] Calculate the deviation of each node from the average load of the node after each node receives the demand according to the average value, the difference and the ratio;

[0010] The demand receiving node is determined according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold.

[0011] In a second aspect, an embodiment of the present invention further provides a POD load scheduling and distribution device, including:

[0012] A first calculation module is used to calculate the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD;

[0013] The second calculation module is used to calculate the average value of resource utilization of all nodes and the difference between the current resource utilization of each node and the average value;

[0014] A third calculation module, used for calculating the deviation of each node from the node average load after each node receives the demand according to the average value, the difference and the ratio;

[0015] The determination module is used to determine the demand receiving node according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold.

[0016] In a third aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the POD load scheduling and allocation method provided in the above embodiment.

[0017] The POD load scheduling and allocation method, device and storage medium provided by the embodiment of the present invention calculate the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD; calculate the average value of the resource utilization of all nodes, and the difference between the current resource utilization of each node and the average value; calculate the deviation of each node from the average load of the node after each node receives the demand according to the average value, the difference and the ratio; determine the demand receiving node according to the deviation of each node from the average load of the node after receiving the demand, so that the difference between the load rate of each node after allocation and the average value of the node resource utilization rate is less than the preset difference threshold. Nodes with relatively balanced node loads and low risk of rapid load changes are selected by calculating the score, so that the POD is more inclined to schedule to the nodes with the above characteristics, thereby further balancing the load of the cluster as a whole and improving the stability of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0019] Figure 1 It is a flow chart of the POD load scheduling and allocation method provided in the first embodiment of the present invention;

[0020] Figure 2a It is the first different load state in the cluster in the POD load scheduling and allocation method provided in the first embodiment of the present invention;

[0021] Figure 2b It is the second different load state in the cluster in the POD load scheduling and allocation method provided in the first embodiment of the present invention;

[0022] Figure 2c It is the third different load state in the cluster in the POD load scheduling and allocation method provided in the first embodiment of the present invention;

[0023] Figure 2d It is the fourth different load state in the cluster in the POD load scheduling and allocation method provided in the first embodiment of the present invention;

[0024] Figure 3 It is a structural diagram of the Kubernetes platform corresponding to the POD load scheduling and allocation method provided in the first embodiment of the present invention;

[0025] Figure 4 It is a flow chart of a POD load scheduling and allocation method provided in Embodiment 2 of the present invention;

[0026] Figure 5 It is a structural diagram of a POD load scheduling and distribution device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0027] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0028] Embodiment 1

[0029] Figure 1 : is a flow chart of a POD load scheduling and allocation method provided in the first embodiment of the present invention. This embodiment is applicable to the case where a POD load is scheduled to a suitable node in a cluster. The method can be executed by a POD load scheduling and allocation device, and specifically includes the following steps:

[0030] Step 110, calculate the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD.

[0031] In this embodiment, a user can submit a POD task. When receiving the POD task submitted by the user, the demand request amount can be determined based on the needs of the POD. The demand request amount can be the demand request amount of various computing resources required to run the POD. When receiving the POD task, it is necessary to calculate the relationship between the computing resources of each node in the cluster and the computing resources required by the POD. Specifically, the ratio of the demand request amount to the total amount of resources of each node can be calculated for the needs of the POD. Exemplarily, it can be calculated as follows:

[0032] r(n) 资源 = request 资源 / capacity (n) 资源, Among them, r (n) 资源 is the ratio of the demand request amount to the total resources of each n nodes, 资源 The computing resources required by the POD, that is, the required request amount, capacity (n) 资源 is the total amount of resources of the nth node, n is 1-N, and N is the number of nodes.

[0033] Optionally, before calculating the ratio of the demand request amount to the total amount of resources of each node according to the needs of the POD, the method may further add the following steps: calculating the current resource utilization of each node; when the resource utilization is greater than a preset resource utilization threshold, filtering the node. In some special cases, the resources of some nodes are relatively tight. If the POD is assigned to the node, it will lead to the risk of collapse caused by the high load of the node. Therefore, the resource utilization threshold can be set empirically in the above manner to filter some high-load nodes and no longer enter the later scheduling allocation. Furthermore, the ratio of the demand request amount calculated according to the needs of the POD to the total amount of resources of each node can be specifically optimized as follows: the ratio of the demand request amount calculated according to the needs of the POD to the total amount of resources of each node after filtering. Correspondingly, N in the above is the number of nodes after filtering.

[0034] It should be noted that the resource utilization threshold does not remain unchanged, but is reset each time a POD request is received. The nodes that can be allocated are adjusted dynamically and flexibly to make the load of the entire cluster more balanced.

[0035] Step 120, calculating an average value of resource utilization of all nodes, and a difference between the current resource utilization of each node and the average value.

[0036] Exemplarily, the calculation of the average resource utilization of all nodes may be implemented in the following manner:

[0037] M 资源=Σn(resource) / N;

[0038] The current resource utilization of each node is the ratio of the resources already used by the node to all available resources.

[0039] Step 130, calculating the deviation of each node from the node average load after each node receives the demand based on the average value, the difference and the ratio.

[0040] Figure 2a-2d These are four different load states in the cluster in the POD load scheduling and allocation method provided in the first embodiment of the present invention. Among them, M represents the average load of the node, V represents the standard deviation of the load of the node, and the black dot represents a certain node. Figure 2a As shown in Figure 2b, the average load of each node in the cluster is not much different, and the load is relatively balanced, but the standard deviation of the load of some nodes is large, and the node may be subjected to a sharp load change, and the node is unstable; as shown in Figure 2b, the average load of each node in the cluster is very different, and the load is unbalanced, but the standard deviation of the node load is small, and the node is stable; Figure 2c As shown in Figure 2, the average load and standard deviation of each node in the cluster are very different, the load is unbalanced, and the nodes are unstable. Figure 2d The figure shows the ideal target situation. As the average node load increases, the standard deviation of the node load decreases, and the cluster is in a load-balanced and stable state, which is the optimal target.

[0041] Therefore, in this embodiment, the above three factors are used to ensure that after the new POD is allocated, the average load and load standard deviation of each node in the cluster are as small as possible, so that the cluster is in a load-balanced and stable state. Since the ratio of the demand request amount to the total resources of each node is added, it actually simulates the resource changes of each node after receiving the newly added POD. Since the resources required by the POD are negligible relative to the entire cluster, the average value does not change much, and the difference is calculated based on a single node. Therefore, using the above method, the resource changes after the POD joins any node can be effectively simulated, and the deviation of each node from the average load of the node can be calculated. At the same time, the relationship with the average load can also be reflected.

[0042] Exemplarily, the calculation of the deviation of each node from the average load of the node after receiving the demand based on the average resource utilization of each node, the difference between the average values ​​and the ratio of the demand request amount to the total resources of each node may include: calculating the sum of the average resource utilization of each node, the difference and the ratio of the demand request amount to the corresponding total resources of the node, and controlling the sum between [0,1] to filter out nodes whose deviation changes sharply after receiving the demand; and using the controlled sum as the deviation.

[0043] For example, it can be calculated as follows:

[0044] Calculate S 资源 = M 资源 +V 资源 +r 资源 ;

[0045] Calculate S 资源 = min(S 资源 , 1); The above method can ensure that the value of S is always between 0 and 1;

[0046] The above method can be used to filter out nodes whose deviation changes sharply after receiving the demand.

[0047] Step 140, determining the demand receiving node according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold.

[0048] In this embodiment, the method may include: calculating the score of each node based on the difference between the baseline value and the filtered deviation; and selecting the node with the highest score as the demand receiving node.

[0049] Exemplarily, it can be realized by the following method: CPU = (1-S CPU ) * 100. The smaller the sum of the average value and the standard deviation of the resource utilization in the node calculated by the above method is, the more balanced the load of the current node is, and the smaller the risk of sudden load changes is. The higher the score of the current node is, the more likely it is to be used as a demand receiving node.

[0050] This embodiment calculates the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD; calculates the average value of the resource utilization of all nodes, and the difference between the current resource utilization of each node and the average value; calculates the deviation of each node from the average load of the node after each node receives the demand according to the average value, the difference and the ratio; determines the demand receiving node according to the deviation of each node from the average load of the node after receiving the demand, so that the difference between the load rate of each node after allocation and the average value of the node resource utilization rate is less than the preset difference threshold. The calculated score is used to select nodes with relatively balanced node loads and low risk of rapid load changes, so that the POD is more inclined to schedule to the nodes with the above characteristics, thereby further balancing the load of the cluster as a whole and improving the stability of the cluster.

[0051] In a preferred implementation of this embodiment, the resources can be specifically optimized as: CPU resources and memory resources. Usually, computing resources are mainly CPU resources and memory resources. Therefore, in the above calculation process, the ratio of CPU resources to memory resources, the average value of node CPU resource and memory resource utilization, and the difference between the resource utilization and the average value should be calculated respectively; then the scores of the two are obtained respectively, and the required receiving node is determined by taking the minimum value of the two scores. The above method can be used to reasonably evaluate different resources, thereby ensuring that the selected receiving node can have the characteristics of load balancing and balancing in the cluster at the same time, thereby improving the stability of the cluster.

[0052] In another preferred implementation of this embodiment, the POD load scheduling and allocation method can be specifically applied to the Kubernetes platform. Figure 3 This is a schematic diagram of the structure of the Kubernetes platform corresponding to the POD load scheduling and allocation method provided in the first embodiment of the present invention, see Figure 3 , Kube-scheduler can be used to schedule the POD to the demand receiving node, and the RealNodeLoad scheduling plug-in can be used to calculate the average resource utilization of all nodes, as well as the difference between the current resource utilization of each node and the average value; the deviation of each node from the average load of each node after each node receives the demand is calculated based on the average value, the difference and the ratio; the operation of the demand receiving node is determined based on the deviation of each node from the average load of the node after receiving the demand, and the Prometheus component is used to collect the real resource rate of each node, and the average resource utilization of all nodes is calculated. By optimizing the kubernetes platform architecture, the POD load scheduling and allocation method provided in the above embodiment can be better realized.

[0053] Embodiment 2

[0054] Figure 4 It is a flow chart of the POD load scheduling and allocation method provided in the second embodiment of the present invention. This embodiment is optimized based on the above embodiment, and the following steps can be added: obtaining the demand of POD, and when the ratio of one resource to another resource exceeds a preset ratio threshold, calculating the resource quantity demand according to the preset weight value of each resource.

[0055] See also Figure 4 , the POD load scheduling and allocation method comprises:

[0056] Step 210, obtaining the POD demand, when the ratio of one resource to another resource exceeds a preset ratio threshold, calculating the resource quantity demand according to the preset weight value of each resource.

[0057] Exemplarily, the POD task submitted by the user can be obtained by the method provided in the aforementioned embodiment. POD task types are diverse. Some tasks have high requirements for computing power, while some tasks have high requirements for data throughput. Although the scheduling allocation method provided in the above steps can select appropriate nodes to receive PODs according to different scene requirements, it is relatively more complicated and cannot take care of some scenes, especially when there are many types of required resources, such as storage requirements and network transmission requirements. Therefore, in this embodiment, the requirements of POD can be checked in advance. When the resource requirements for one of them far exceed the resource requirements for other items, and the requirements for other resource items are relatively average, they can be merged into one resource value. Exemplarily, when the ratio of one resource to another resource exceeds the preset ratio threshold, the resource quantity requirement is calculated according to the preset weight value of each resource. That is, the resource weight value of each item is determined from the preset comparison table according to the ratio, and the resource quantity requirement is calculated using the weight value.

[0058] Step 220: Calculate the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD.

[0059] Exemplarily, the total amount of resources of the node may also be calculated using the weight values ​​determined in the above steps.

[0060] Step 230, calculating an average value of resource utilization of all nodes, and a difference between the current resource utilization of each node and the average value.

[0061] The average value and the difference value can still be calculated using the weight values ​​determined in the above steps.

[0062] Step 240: Calculate the deviation of each node from the node average load after each node receives the demand based on the average value, the difference and the ratio.

[0063] Step 250: determine the demand receiving node according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold.

[0064] This embodiment adds the following steps: obtaining the POD demand, and when the ratio of one resource to another resource exceeds a preset ratio threshold, calculating the resource demand according to the preset weight value of each resource. In some more complex application scenarios, multiple demands can be fused into a fusion parameter, and the fusion parameter can be used to calculate and determine the demand receiving node. This reduces the amount of calculation on the basis of balancing the cluster load and improving the stability of the cluster.

[0065] Embodiment 3

[0066] Figure 5is a schematic diagram of the structure of the POD load dispatching and distribution device provided in the third embodiment of the present invention, see Figure 5 , the POD load scheduling and distribution device comprises:

[0067] A first calculation module 310, for calculating the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD;

[0068] The second calculation module 320 is used to calculate the average value of resource utilization of all nodes and the difference between the current resource utilization of each node and the average value;

[0069] A third calculation module 330 is used to calculate the deviation of each node from the node average load after each node receives the demand according to the average value, the difference and the ratio;

[0070] The determination module 340 is used to determine the demand receiving node according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold.

[0071] The POD load scheduling and allocation device provided in this embodiment calculates the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD; calculates the average value of the resource utilization of all nodes, and the difference between the current resource utilization of each node and the average value; calculates the deviation of each node from the average load of the node after each node receives the demand according to the average value, the difference and the ratio; determines the demand receiving node according to the deviation of each node from the average load of the node after receiving the demand, so that the difference between the load rate of each node after allocation and the average value of the node resource utilization rate is less than the preset difference threshold. Nodes with relatively balanced node loads and low risk of rapid load changes are selected by calculating the score, so that the POD is more inclined to schedule to the nodes with the above characteristics, thereby further balancing the load of the cluster as a whole and improving the stability of the cluster.

[0072] Based on the above embodiments, the second calculation module includes:

[0073] A filtering unit, used to calculate the sum of the resource utilization average value of each node, the difference and the ratio of the demand request amount to the corresponding node total resource amount, and control the sum between [0, 1] to filter out nodes whose deviation changes sharply after receiving the demand;

[0074] As the unit, it is used to take the controlled sum as the deviation.

[0075] Based on the above embodiments, the determining module includes:

[0076] A score calculation unit, used for calculating the score of each node based on the difference between the benchmark value and the filtered deviation;

[0077] The selection unit is used to select the node with the highest score as the demand receiving node.

[0078] Based on the above embodiments, the resources include:

[0079] CPU resources and memory resources.

[0080] Based on the above embodiments, the selection unit includes:

[0081] The selection unit is used to select a minimum score from the CPU resource score and the memory resource score, and select the highest node with the minimum score as the demand receiving node.

[0082] Based on the above embodiments, the device further includes:

[0083] The acquisition module is used to obtain the demand of POD. When the ratio of one resource to another resource exceeds a preset ratio threshold, the resource quantity demand is calculated according to the preset weight value of each resource.

[0084] Based on the above embodiments, the device further includes:

[0085] A filtering module, used to calculate the current resource utilization of each node; when the resource utilization is greater than a preset resource utilization threshold, filter the node;

[0086] Accordingly, the first calculation module includes:

[0087] The first calculation unit is used to calculate the ratio of the demand request amount to the filtered total amount of resources of each node according to the demand of the POD.

[0088] Based on the above embodiments, the POD load scheduling and allocation method is applied to the kubernetes platform:

[0089] Accordingly, the device further comprises:

[0090] A scheduling module, used to schedule the POD to the demand receiving node using Kube-scheduler;

[0091] The first computing module comprises:

[0092] The second computing unit is used to collect the actual resource rate of each node using the Prometheus component and calculate the average resource utilization of all nodes.

[0093] The POD load scheduling and distribution device provided in the embodiment of the present invention can execute the POD load scheduling and distribution method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0094] Embodiment 4

[0095] Embodiment 4 of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute any of the POD load scheduling and allocation methods provided in the above embodiments.

[0096] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.

[0097] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0098] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0099] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A POD load scheduling and allocation method, characterized in that: include: Calculate the ratio of the demand request amount to the total resources of each node based on the POD demand; Calculate the average resource utilization of all nodes and the difference between the current resource utilization of each node and the average resource utilization; Calculate the deviation of each node from the average load of the node after each node receives the demand according to the average value, the difference and the ratio; Determine the demand receiving node according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold; The calculating, according to the average value, the difference and the ratio, the deviation of each node from the average load of the node after each node receives the demand comprises: Calculate the average value of resource utilization of all nodes, the standard deviation of the current load of each node, and the sum of the ratio of the demand request amount to the corresponding total node resource amount, and control the sum between [0,1] to filter out nodes whose deviation changes sharply after receiving the demand; The controlled sum is taken as the deviation.

2. The method according to claim 1, characterized in that The step of determining the demand receiving node according to the deviation between each node and the average node load after receiving the demand comprises: Calculate the score of each node based on the difference between the baseline value and the filtered deviation; The node with the highest score is selected as the demand receiving node.

3. The method according to claim 2, characterized in that The resources include: CPU resources and memory resources.

4. The method according to claim 3, characterized in that The step of selecting the node with the highest score as the demand receiving node includes: Calculate the CPU resource score and resource score of each node respectively, take the smallest score between the CPU resource score and the resource score as the node score, and select the node with the highest node score as the demand receiving node.

5. The method according to claim 3, characterized in that: The method further comprises: The demand of POD is obtained. When the ratio of one resource to another resource exceeds the preset ratio threshold, the resource demand is calculated according to the preset weight value of each resource.

6. The method according to claim 1, characterized in that Before calculating the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD, the method further includes: Calculate the current resource utilization of each node; when the resource utilization is greater than a preset resource utilization threshold, filter the node; Accordingly, the ratio of the demand request amount to the total amount of resources of each node is calculated according to the demand of the POD, including: The ratio of the demand request amount to the total amount of resources of each node after filtering is calculated according to the demand of POD.

7. The method according to claim 1, characterized in that The POD load scheduling and allocation method is applied to the kubernetes platform. Accordingly, The method further comprises: Using Kube-scheduler to schedule the POD to the demand receiving node; The calculating the average value of resource utilization of all nodes includes: Use the Prometheus component to collect the actual resource utilization of each node and calculate the average resource utilization of all nodes.

8. A POD load dispatching and distribution device, characterized in that: include: A first calculation module is used to calculate the ratio of the demand request amount to the total amount of resources of each node according to the demand of the POD; The second calculation module is used to calculate the average value of resource utilization of all nodes and the difference between the current resource utilization of each node and the average value; A third calculation module, used for calculating the deviation of each node from the node average load after each node receives the demand according to the average value, the difference and the ratio; A determination module, used to determine the demand receiving node according to the deviation between each node and the average node load after receiving the demand, so that the difference between the load rate of each node and the average node resource utilization rate after allocation is less than a preset difference threshold; The third computing module comprises: A filtering unit is used to calculate the average value of resource utilization of all nodes, the standard deviation of the current load of each node, and the sum of the ratio of the demand request amount to the corresponding total node resource amount, and control the sum between [0,1] to filter out nodes whose deviation changes sharply after receiving the demand; As the unit, it is used to take the controlled sum as the deviation.

9. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the POD load scheduling and allocation method as described in any one of claims 1-7 when executed by a computer processor.

Citation Information

Patent Citations

  • Container scheduling method, container scheduling device, storage medium and electronic equipment

    CN114942830A

  • Bandwidth adjustment method and device, computer equipment and storage medium

    CN117971398A