Cloud native multi-region cluster dynamic scheduling method and device, equipment and medium
By combining resource utilization and latency information in cloud-native multi-region clusters and using multiple optimization algorithms to dynamically schedule Pods, we address the low resource utilization and cross-region communication efficiency issues in existing scheduling methods, achieving more efficient resource utilization and communication.
Patent Information
- Application Number
- CN202511056664.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-10
AI Technical Summary
Existing cloud-native multi-region cluster scheduling methods cannot effectively handle complex, latency-sensitive, and geographically distributed workloads, resulting in low resource utilization and inefficient cross-region communication.
By determining node resource information and Pod resource information, combining resource utilization information and node delay information, and using multiple optimization algorithms such as ant colony optimization, non-dominated sorting genetic algorithm, simulated annealing, and integer linear programming, Pods are dynamically scheduled to target nodes to optimize resource utilization and cross-regional communication efficiency.
It improves the resource utilization and cross-region communication efficiency of multi-region clusters, overcomes the limitations of ignoring node network topology and inter-node latency, and achieves better scheduling decisions.
Smart Images

Figure CN120768901A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a cloud-native multi-region cluster dynamic scheduling method, device, equipment and medium. BACKGROUND
[0002] With the evolution of modern computing infrastructure to cloud-native architecture, effective load scheduling in cloud-native clusters deployed across multiple availability zones has always been a difficult point of research. The default scheduling mechanism often cannot effectively handle complex, latency-sensitive and geographically distributed workloads.
[0003] In modern cloud architecture, deploying containerized workloads across large clusters requires a complex trade-off between computing efficiency, communication latency and fault tolerance. As the core component of its container orchestration platform, the scheduler is responsible for assigning Pods (the smallest deployable unit) to cluster nodes while complying with constraints such as resource availability, affinity / anti-affinity rules and QoS requirements. The default scheduler only considers the current optimal node selection. This strategy, which prioritizes immediate scheduling needs based on heuristic algorithms, may lead to a local optimal but not a global optimal solution. SUMMARY
[0004] The present application provides a cloud-native multi-region cluster dynamic scheduling method, device, equipment and medium to solve the problem of low global scheduling efficiency in cloud-native multi-region distributed clusters.
[0005] According to an aspect of the present application, a cloud-native multi-region cluster dynamic scheduling method is provided, comprising:
[0006] determining node resource information of a plurality of nodes in a cloud-native cluster, and Pod resource information of a plurality of Pods in a Pod set to be scheduled to the cloud-native cluster;
[0007] determining resource utilization information between the target Pod and each node and node latency information between the target Pod and the same group of Pods according to the Pod resource information of the target Pod and the node resource information of each node;
[0008] determining a target node for the target Pod from each node according to the resource utilization information and the node latency information.
[0009] According to another aspect of the present application, a cloud-native multi-region cluster dynamic scheduling device is provided, comprising:
[0010] a resource determination module configured to determine node resource information of a plurality of nodes in a cloud-native cluster, and Pod resource information of a plurality of Pods in a Pod set to be scheduled to the cloud-native cluster;
[0011] A resource calculation module is used to determine the resource utilization information between the target Pod and each node, and the node delay information between the target Pod and the same group of Pods based on the Pod resource information of the target Pod and the node resource information of each node;
[0012] A target node determination module is configured to determine a target node for scheduling the target Pod from among the nodes based on the resource utilization information and the node delay information.
[0013] According to another aspect of the present invention, an electronic device is provided, comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cloud-native multi-region cluster dynamic scheduling method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cloud-native multi-region cluster dynamic scheduling method described in any embodiment of the present invention when executed.
[0018] The technical solution of this embodiment implements Pod scheduling between nodes in multiple regions through resource utilization constraints and same-group latency awareness, overcoming the limitations of ignoring node network topology and inter-node latency, and improving resource utilization and cross-region communication efficiency for multi-region cluster batch processing workloads based on scheduling allocation results.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a flowchart of a cloud-native multi-region cluster dynamic scheduling method provided according to an embodiment of the present invention;
[0022] Figure 2 This is a flowchart of another cloud-native multi-region cluster dynamic scheduling method provided by an embodiment of the present invention;
[0023] Figure 3 2. It is a structural diagram of a cloud-native multi-region cluster dynamic scheduling device provided according to an embodiment of the present invention;
[0024] Figure 4 1 is a schematic diagram of the structure of an electronic device that implements the cloud-native multi-region cluster dynamic scheduling method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "candidate", "target", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or that are inherent to these processes, methods, products or devices.
[0027] Figure 1 The present invention provides a flowchart of a cloud native multi-region cluster dynamic scheduling method. This embodiment is applicable to the case of effective load scheduling of multi-region distributed clusters in a cloud native environment. The method can be executed by a cloud native multi-region cluster dynamic scheduling device. The cloud native multi-region cluster dynamic scheduling device can be implemented in the form of hardware and / or software. The cloud native multi-region cluster dynamic scheduling device can be configured in a server with communication and computing capabilities. Figure 1 As shown, the method includes:
[0028] S110: Determine node resource information of multiple nodes in the cloud native cluster and Pod resource information of multiple Pods in a Pod set to be scheduled to the cloud native cluster.
[0029] Among them, cloud native is a method of building and running applications. It is a technical system and methodology that aims to fully utilize the advantages of the cloud computing environment. The core concepts of cloud native include: containerization, microservice architecture, continuous delivery and continuous integration, declarative API, immutable infrastructure, service mesh, etc. The purpose of cloud native is to enable applications to better utilize the elasticity, scalability and distributed characteristics of the cloud platform to achieve efficient, flexible and reliable operation. A cloud native cluster refers to a multi-node platform built using cloud native technology. Each node is equivalent to a server. Multiple nodes in a cloud native cluster are distributed in multiple different regions, that is, a cloud native cluster is a cloud native multi-region cluster. Pod refers to the smallest deployable unit. Each Pod carries its own load requirements and needs to be bound to the corresponding node. The node needs to have the ability to carry the load scheduling of the Pod.
[0030] Node resource information is used to indicate the resource information supported by each node. Pod resource information refers to the resource request information of each Pod, indicating the lower limit of resource requirements for the bound scheduling node.
[0031] In a feasible embodiment, the node resource information includes CPU utilization, memory utilization, remaining CPU capacity, and remaining memory capacity; the Pod resource information includes CPU demand and memory demand.
[0032] Specifically, it tracks the CPU utilization, memory utilization, remaining CPU capacity, and remaining memory capacity of each node in the cloud native cluster in real time, and determines the CPU and memory requirements of each Pod to be scheduled.
[0033] S120 : Determine resource utilization information between the target Pod and each node, and node latency information between the target Pod and Pods in the same group, based on the Pod resource information of the target Pod and the node resource information of each node.
[0034] The resource utilization information indicates the resource usage of each node when the target Pod is scheduled to the node. The node delay information indicates the network delay between the target Pod and the nodes in the same group of Pods scheduled to the node. For example, the node delay information is represented by the average network delay between the target Pod and the nodes in the same group of Pods scheduled to the node.
[0035] Specifically, the CPU usage of each node caused by the deployment of the target Pod is determined based on the CPU requirements of the target Pod, the CPU utilization of each node, and the remaining CPU capacity. The memory usage of each node caused by the deployment of the target Pod is determined based on the memory requirements of the target Pod, the memory utilization of each node, and the remaining memory capacity. The resource utilization information is determined based on the CPU usage and memory usage.
[0036] Determine the pods in the same group as the target pod. The pods in the same group are located in the same scheduling group as the target pod. Scheduling groups are determined based on the attributes of the tasks being executed. For example, pods in the same scheduling group may have the same dependent tasks. Since pods in the same scheduling group have the same dependent tasks, they may communicate frequently. Therefore, the load distribution of pods within the same scheduling group needs to be considered. Pods within the group should be deployed on different nodes in low-latency areas to ensure efficient network communication between different pods within the same scheduling group. A pod scheduling group is a collection of pods with strong communication dependencies. Pods within a group should be preferentially deployed in low-latency areas. The node latency information between the target pod and pods in the same group is the average network latency between each node where the target pod is scheduled and each node where the pods in the same group are scheduled. For example, determine that the target pod is scheduled on a first node and that the pods in the same group are scheduled on a second node. The average network latency between the first node and multiple second nodes is determined as the node latency information for the target pod scheduled on the first node. The node latency information for each first node scheduled on the target pod is determined using the same method. The first node is any node in the cloud native cluster.
[0037] In a feasible embodiment, determining resource utilization information between the target Pod and each node based on the Pod resource information of the target Pod and the node resource information of each node includes:
[0038] The first CPU parameter is determined based on the sum of the CPU utilization of each node and the CPU demand of the target Pod. The second CPU parameter is determined based on the ratio of the first CPU parameter to the remaining CPU capacity of the node. The CPU resource utilization information is determined based on the difference between the value 1 and the second CPU parameter.
[0039] A first memory parameter is determined based on the sum of the memory utilization of each node and the memory requirement of the target Pod. A second memory parameter is determined based on the ratio of the first memory parameter to the remaining memory capacity of the node. Memory resource utilization information is determined based on the difference between the value 1 and the second memory parameter.
[0040] The scheduling problem can be formally defined by sets, resource constraints, and network delay factors. Set P represents the set of Pods that need to be scheduled on cluster node N. Pods belong to a specific scheduling group G and represent dependent tasks. Since the cluster consists of multiple worker nodes distributed in different availability zones, resource constraints are the key factor in scheduling decisions. Each Pod in set P has specific resource requirements, including CPU requirements and memory requirements, which are represented by R cpu (p) and R mem (p), each Pod is assigned to any node through the function A(p), ensuring that the node has sufficient available resources. Each node n provides a fixed remaining CPU capacity C cpu (n) and the remaining memory capacity and C mem (n), the currently allocated resources are expressed by the CPU utilization U cpu (n) and memory utilization U mem (n) Tracking.
[0041] Use the following formula to determine CPU resource utilization information:
[0042] S cpu (p i ,n j )=1-(U cpu (n j )+R cpu (p i )) / C cpu (n j );
[0043] Memory resource utilization information is determined according to the following formula:
[0044] S mem (p i ,n j )=1-(U mem (n j )+R mem (p i )) / C mem (n j );
[0045] Among them, S cpu (p i ,n j ) represents the CPU resource utilization information between the i-th target Pod and the j-th node, S mem (p i ,n j ) represents the memory resource utilization information between the i-th target Pod and the j-th node, p i Indicates the i-th target Pod, n j Indicates the jth node to which the target Pod is to be bound, Ucpu (n j ) represents the CPU utilization of the jth node, C cpu (n j ) represents the remaining CPU capacity of the jth node, R cpu (p i ) represents the CPU requirement of the i-th target Pod, U mem (n j ) represents the memory utilization of the jth node, C mem (n j ) represents the remaining memory capacity of the jth node, R mem (p i ) represents the memory requirement of the i-th target Pod.
[0046] The CPU resource utilization information and memory resource utilization information represent the resource utilization information brought to each node by the target Pod when it is scheduled to each node, and represent the resource usage percentage when the target Pod is scheduled to each node. Maximizing the CPU and memory utilization information can ensure efficient workload distribution, that is, the target Pod is scheduled to the corresponding S on each node. cpu and S mem A higher value indicates more efficient resource utilization. By calculating the resource utilization information between each target Pod and each node, the scheduler is guided to maximize the resource utilization efficiency of the overall scheduling.
[0047] For example, a target optimization function is established to represent the sum of resource utilization information of each target Pod on each node for scheduling. Constraints are determined based on the target Pod and node attributes. The value of the target optimization function is maximized under the constraints. The final result is the scheduling node result of each target Pod.
[0048] In a feasible embodiment, the node resource information also includes the network delay between nodes;
[0049] Based on the Pod resource information of the target Pod and the node resource information of each node, the node latency information between the target Pod and the Pods in the same group is determined, including:
[0050] Identify the Pods in the same scheduling group as the target Pod, and determine the corresponding nodes for each Pod in the same group.
[0051] The node latency information is determined based on the average network latency between each node to which the target Pod is bound and each node in the same group.
[0052] The network delay between each node is determined in advance. For example, the network delay between nodes is measured periodically to generate a dynamically updated delay matrix. The measurement method is lightweight ICMP detection or link status collection based on SDN controller. The delay matrix L defines the communication delay between nodes, where L(ni ,n j ) represents node n i and n j The quantified result of the network delay between pods affects the scheduling and placement results of pods in the same group.
[0053] Since Pods in the same group G may need to communicate frequently, it is crucial to reduce the network latency of communication between Pods in the same scheduling group. The latency score measures the average network latency of the Pod to be scheduled with other Pods in the same group.
[0054] The scheduling problem involves efficiently mapping Pods to nodes while balancing resource utilization, minimizing cross-zone latency, and complying with node constraints, in order to optimize resource utilization and network efficiency while minimizing cross-zone communication costs.
[0055] In a feasible embodiment, node delay information is determined based on the average network delay between each node to which the target Pod is to be bound and each node in the same group, including:
[0056] The node delay information is determined according to the following formula:
[0057]
[0058] Among them, p i Indicates the i-th target Pod, n j Indicates the jth node to which the target Pod is to be bound, p k Indicates the kth Pod in the same group corresponding to the target Pod, A(p k ) represents the node in the same group corresponding to the kth Pod in the same group, and G represents the number of Pods in the scheduling group corresponding to the target Pod.
[0059] The result of this formula is the scored node n currently scheduled by the target Pod. j The average network latency between a pod and the nodes of other pods in the same group. A lower latency value indicates a better placement decision and minimizes the cost of cross-region communication.
[0060] S130 , determining a target node for scheduling the target Pod from among the nodes according to the resource utilization information and the node delay information.
[0061] A corresponding target node is determined for each target Pod based on the resource utilization information and the node latency information. Specifically, a node with high resource utilization information and low node latency information is determined as the target node for the target Pod.
[0062] Exemplarily, a first objective optimization function is established to represent the sum of resource utilization information of each target Pod on each node for scheduling, and a second objective optimization function is established to represent the sum of node delay information of each target Pod on each node for scheduling. Constraints are determined based on the target Pod and node attributes. Under the constraints, the value of the first objective optimization function is maximized and the value of the second objective optimization function is minimized. The final result is the scheduling node result of each target Pod.
[0063] The technical solution of this embodiment implements Pod scheduling between nodes in multiple regions through resource utilization constraints and same-group latency awareness, overcoming the limitations of ignoring node network topology and inter-node latency, and improving resource utilization and cross-region communication efficiency for multi-region cluster batch processing workloads based on scheduling allocation results.
[0064] Figure 2 This is a flowchart of another cloud native multi-region cluster dynamic scheduling method provided by an embodiment of the present invention. This embodiment further refines the target node determination process in the above embodiment. Figure 2 As shown, the method includes:
[0065] S210: Determine node resource information of multiple nodes in the cloud native cluster and Pod resource information of multiple Pods in a Pod set to be scheduled to the cloud native cluster.
[0066] S220 , determining resource utilization information between the target Pod and each node and node delay information between the target Pod and Pods in the same group based on the Pod resource information of the target Pod and the node resource information of each node.
[0067] S230 : Filter candidate nodes from each node according to resource utilization information and node delay information.
[0068] The nodes are sorted in descending order based on the resource utilization information, and a preset number of nodes ranked ahead of the target pod are determined as the first candidate nodes for the target pod. The nodes are sorted in ascending order based on the node latency information, and a preset number of nodes ranked ahead of the target pod are determined as the second candidate nodes for the target pod. The first and second candidate nodes are combined into a candidate node. Alternatively, the nodes are sorted in descending order based on the sum of the ratio of 1 to the resource utilization information and the node latency information, and a preset number of nodes ranked ahead of the target pod are determined as the candidate nodes for the target pod.
[0069] For example, first verify whether the remaining resource information of each node meets the CPU and memory requirements of the target Pod, filter out the nodes that do not meet the resource constraints, generate a list of feasible nodes corresponding to the target Pod, and then calculate the n of each node in the feasible node list. jIn the scheduling target Pod p i After the resource utilization information and node delay information are obtained, candidate nodes are screened out from the feasible node list according to the resource utilization information and node delay information.
[0070] S240: Determine a target node from candidate nodes using multiple optimization algorithms.
[0071] Specifically, multiple optimization algorithms are used to determine the scoring results between the target Pod and each candidate node; the scoring results are weighted and fused, and the target node is determined based on the fused scoring results.
[0072] Multiple optimization algorithms are used to calculate the scores between each target pod and each candidate node. The scores corresponding to the different optimization algorithms used to schedule each target pod to different candidate nodes are then weighted and combined to obtain a combined score between each target pod and each candidate node. A target node is then determined for each target pod based on the combined score. For example, the node with the highest combined score is selected as the target node for the target pod.
[0073] In a feasible embodiment, a target node is determined from candidate nodes through multiple optimization algorithms, including:
[0074] The scoring results between the target Pod and each candidate node are determined using the ant colony optimization algorithm, non-dominated sorting genetic algorithm, simulated annealing algorithm, and integer linear programming algorithm respectively;
[0075] The scoring results are weighted and fused, and the target node is determined based on the fused scoring results.
[0076] The scoring results between each target Pod and each candidate node are calculated using the ant colony optimization algorithm, non-dominated sorting genetic algorithm, simulated annealing algorithm, and integer linear programming algorithm respectively. The scores corresponding to different optimization algorithms used for scheduling each target Pod to different candidate nodes are obtained. The corresponding scores of different optimization algorithms corresponding to each target Pod being scheduled to different candidate nodes are weightedly fused to obtain the fusion score between each target Pod and each candidate node. The corresponding target node is determined for each target Pod based on the fusion score.
[0077] Specifically, the ant colony optimization (ACO) algorithm process:
[0078] Assign an initial pheromone value to each node and adjust the pheromone weight based on the node resource capacity and network delay data;
[0079] Ant path construction: Each "ant" represents a candidate pod scheduling solution. Ants select nodes based on probability, which is determined by pheromone strength (α = 1.0) and heuristic factor (β = 3.0). Random exploration (q0 = 0.5) is used to balance development and exploration.
[0080] Pheromone update: After completing a round of scheduling, the pheromone is updated based on the Pod placement effect. The volatility (rho = 0.1) controls the decay rate of the old pheromone.
[0081] Score calculation, which integrates resource utilization information and node delay information to generate the final score.
[0082] Non-dominated sorting genetic algorithm (NSGA-II) process:
[0083] Initialize the population and generate 50 initial individuals. Each individual represents a pod-to-node allocation scheme.
[0084] Iterative evolution was performed for 50 generations, each of which included: crossover: using simulated binary crossover (SBX, crossover rate 0.9, eta = 20) to mix parent features; mutation: perturbing individuals with a probability of 0.1, eta = 20 to control the perturbation amplitude; selection: retaining high-quality individuals through tournament selection (size 2).
[0085] Multi-objective optimization defines two competing objectives: resource objective: average CPU / memory utilization; latency objective: average network latency between pods in the same group; non-dominated sorting and congestion distance calculation ensure Pareto front diversity;
[0086] Scoring is calculated, and the individual with the largest crowding distance in the Pareto optimal solution is selected as the best solution.
[0087] Simulated annealing (SA) algorithm process:
[0088] Initial state generation, randomly generating the initial Pod allocation plan;
[0089] In the annealing process, the initial temperature is set to 100.0, the cooling coefficient is 0.95 per round, and the iteration is continued until the temperature is lower than 0.1;
[0090] Neighborhood search: Each iteration randomly swaps the node assignments of two Pods and calculates the energy value of the new solution (comprehensive resource efficiency and latency indicators);
[0091] State transfer, accepting inferior solutions according to the Metropolis criterion (the probability decreases as the temperature decreases);
[0092] Scoring calculation, maps the final energy value to the standard scoring range (0-MaxNodeScore).
[0093] Integer Linear Programming (ILP) algorithm flow:
[0094] Model construction, defining the binary allocation relationship between decision variables Pod and node, and converting the network delay constraint into an exponential decay approximation function;
[0095] Constrained coding, where the coding resource capacity is constrained as a linear inequality, converting the multi-region communication cost into an objective function weight;
[0096] Solve the ILP model using the simplex algorithm and verify the feasibility of the solution (satisfy all hard constraints);
[0097] Score calculation, extracts the node allocation scheme from the optimal solution and converts the objective function value into a standard scheduling score.
[0098] The technical solution of this embodiment determines the target node for scheduling for each Pod through a multi-algorithm parallel scoring strategy, thereby improving the accuracy of target node determination and being able to adapt to multi-region constraints to ensure optimal scheduling decisions in a geographically distributed environment, thereby improving resource utilization and cross-region communication efficiency for batch workloads in multi-region clusters.
[0099] To address three core issues with scheduling algorithms in multi-region distributed clusters in cloud-native environments: High cross-region communication latency: General scheduling algorithms focus only on the resource availability of a single node and fail to consider the network topology between nodes. This results in frequent cross-region communication for batch tasks, significantly increasing data transmission latency. Low global resource utilization: Static resource allocation strategies lead to unbalanced loads between nodes, causing some nodes to be overloaded while others are idle. Lack of multi-objective dynamic optimization: Existing scheduling strategies cannot simultaneously optimize multiple metrics such as resource efficiency, network latency, and energy consumption, making them difficult to adapt to dynamically changing cloud environments.
[0100] Traditional schedulers allocate resources based on CPU and memory constraints. Common scheduling algorithms in cloud-native environments allocate pods to cluster nodes while complying with constraints such as resource availability and affinity / anti-affinity rules. The default algorithm only considers the current optimal node selection. This heuristic algorithm-based strategy, which prioritizes immediate scheduling needs, can easily lead to local optimal solutions rather than global optimal solutions. It does not explicitly consider the underlying network topology or the interdependencies between distributed application components. Therefore, traditional scheduling algorithms have defects in resource utilization and network awareness, making them unsuitable for multi-region distributed batch processing scenarios.
[0101] The present invention proposes a network-aware scheduling plug-in that integrates heuristics, metaheuristics, and linear programming algorithms to optimize resource utilization and inter-regional communication latency for containerized workloads. Embodiments of the present invention introduce inter-node latency constraints and prioritize locality-aware scheduling, ensuring efficient Pod distribution while minimizing network overhead.
[0102] The core of this invention lies in the design and implementation of a series of network-aware scheduling plug-ins. By integrating multiple optimization algorithms, cross-regional Pod scheduling decisions are dynamically optimized. The plug-in architecture is based on the extension mechanism of the cloud native framework. The scheduling system of this invention mainly consists of three modules: dynamic delay monitoring module, resource status acquisition module and multi-algorithm scheduling module.
[0103] Dynamic delay monitoring module: Periodically measures network delays between nodes and generates a dynamically updated delay matrix. The measurement method is lightweight ICMP detection or link status collection based on the SDN controller.
[0104] Resource status collection module: real-time tracking of the CPU utilization and memory resource utilization of cluster nodes, as well as the remaining CPU capacity and remaining memory capacity.
[0105] Multi-algorithm scheduling module: loads the latency matrix and Pod group dependencies, initializes algorithm parameters, calls multiple algorithms in parallel to calculate node scores, and ultimately generates a globally optimal scheduling decision through weighted fusion.
[0106] The specific operation steps of the scheduling system of the present invention include:
[0107] Step 1 Initialization
[0108] All plug-ins intercept the PreScore phase in the scheduling cycle and perform the following operations: dynamically load inter-node network delay matrix data; collect Pod information belonging to the same scheduling group; and initialize the data structures required by the algorithm (such as pheromone matrix, population set, etc.).
[0109] Periodically measure the network delay between nodes and inject the delay data into the scheduling decision, giving priority to nodes in low-latency areas. For all Pods in Pod group G, calculate node n j The average latency to the node where the Pod is scheduled.
[0110] Verify whether the remaining resources of the node meet the CPU / memory requirements of the Pod, filter out nodes that do not meet the resource constraints, generate a list of feasible nodes, and then calculate the n of each node in the feasible node list j When scheduling Pod p i After the resource utilization rate is calculated, nodes with low resource fragmentation rate are given priority.
[0111] Step 2: Comprehensive scoring of multiple algorithms
[0112] The scoring results between the target Pod and each candidate node are determined by the ant colony optimization algorithm, non-dominated sorting genetic algorithm, simulated annealing algorithm and integer linear programming algorithm respectively.
[0113] Step 3: Decision and node binding
[0114] Parallel score calculation: All algorithm plug-ins simultaneously generate scores for candidate nodes, and the scores output by each algorithm are mapped to a standard score range (0-100). Result aggregation: The scores of each algorithm are weighted and summed according to the preset weights (the weight ratio is dynamically adjusted based on the scale of the cloud native cluster, and the specific weight values are not restricted here). Final decision: The node with the highest overall score is selected for Pod binding, and the cluster resource usage record and latency matrix are updated at the same time.
[0115] This paper designs a network-aware scheduling plug-in for cloud-native architectures. Through a latency-aware layout strategy, it overcomes the limitations of the default scheduling algorithm, which primarily optimizes local resource availability while ignoring network topology and inter-node latency. Compared with the default solution that only focuses on local node capacity, the scheduling plug-in of this invention can adapt to multi-region constraints, ensuring optimal scheduling decisions in geographically distributed environments, thereby improving resource utilization and cross-region communication efficiency for batch workloads in multi-region clusters.
[0116] Figure 3 A schematic diagram of the structure of a cloud native multi-region cluster dynamic scheduling device provided by an embodiment of the present invention. Figure 3 As shown, the device includes:
[0117] A resource determination module 310 is configured to determine node resource information of multiple nodes in a cloud native cluster and Pod resource information of multiple Pods in a Pod set to be scheduled to the cloud native cluster;
[0118] The resource calculation module 320 is used to determine the resource utilization information between the target Pod and each node and the node delay information between the target Pod and the Pods in the same group based on the Pod resource information of the target Pod and the node resource information of each node;
[0119] The target node determination module 330 is configured to determine a target node for scheduling the target Pod from among the nodes according to the resource utilization information and the node delay information.
[0120] The technical solution of this embodiment implements Pod scheduling between nodes in multiple regions through resource utilization constraints and same-group latency awareness, overcoming the limitations of ignoring node network topology and inter-node latency, and improving resource utilization and cross-region communication efficiency for multi-region cluster batch processing workloads based on scheduling allocation results.
[0121] Optionally, the node resource information includes CPU utilization, memory utilization, remaining CPU capacity and remaining memory capacity; the Pod resource information includes CPU demand and memory demand.
[0122] Optionally, the resource calculation module includes a resource utilization information determination unit, specifically configured to:
[0123] Determine a first CPU parameter based on the sum of the CPU utilization of each node and the CPU demand of the target Pod, determine a second CPU parameter based on a ratio of the first CPU parameter to the remaining CPU capacity of the node, and determine CPU resource utilization information based on a difference between a value of 1 and the second CPU parameter;
[0124] A first memory parameter is determined based on the sum of the memory utilization of each node and the memory requirement of the target Pod, a second memory parameter is determined based on the ratio of the first memory parameter to the remaining memory capacity of the node, and memory resource utilization information is determined based on the difference between the value 1 and the second memory parameter.
[0125] Optionally, the node resource information further includes network delays between nodes;
[0126] The resource calculation module includes a node delay information determination unit, including:
[0127] A same-group node determination subunit is used to determine the same-group Pods in the same scheduling group as the target Pod, and determine the same-group nodes corresponding to each of the same-group Pods;
[0128] The node delay determination subunit is used to determine the node delay information according to the average network delay between each of the nodes to be bound to the target Pod and each of the nodes in the same group.
[0129] Optionally, the node delay determination subunit is specifically configured to:
[0130] The node delay information is determined according to the following formula:
[0131]
[0132] Among them, p i Indicates the i-th target Pod, n j Indicates the jth node to which the target Pod is to be bound, p k Indicates the kth Pod in the same group corresponding to the target Pod, A(p k ) represents the node in the same group corresponding to the kth Pod in the same group, and G represents the number of Pods in the scheduling group corresponding to the target Pod.
[0133] Optionally, the target node determination module includes:
[0134] a candidate node screening unit, configured to screen candidate nodes from each node based on the resource utilization information and the node delay information;
[0135] The target node determination unit is configured to determine the target node from the candidate nodes using a plurality of optimization algorithms.
[0136] Optionally, the target node determination unit is specifically configured to:
[0137] Determine the scoring results between the target Pod and each of the candidate nodes using an ant colony optimization algorithm, a non-dominated sorting genetic algorithm, a simulated annealing algorithm, and an integer linear programming algorithm, respectively;
[0138] The scoring results are weighted and fused, and the target node is determined according to the fused scoring results.
[0139] The cloud-native multi-region cluster dynamic scheduling device provided in an embodiment of the present invention can execute the cloud-native multi-region cluster dynamic scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0140] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations and do not violate public order and good morals.
[0141] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0142] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0143] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0144] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0145] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the method for cloud-native multi-region cluster dynamic scheduling.
[0146] In some embodiments, the method for cloud-native multi-region cluster dynamic scheduling can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for cloud-native multi-region cluster dynamic scheduling described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the method for cloud-native multi-region cluster dynamic scheduling in any other appropriate manner (e.g., by means of firmware).
[0147] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific reference products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0148] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0149] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0151] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes switch components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, switch components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0152] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0153] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.
[0154] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0155] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A cloud-native multi-region cluster dynamic scheduling method, characterized in that: The method includes: Determine node resource information for multiple nodes in a cloud native cluster, and pod resource information for multiple pods in a set of pods to be scheduled to the cloud native cluster; Determine resource utilization information between the target Pod and each node, and node latency information between the target Pod and Pods in the same group, based on the Pod resource information of the target Pod and the node resource information of each node. A target node for scheduling is determined for the target Pod from each node according to the resource utilization information and the node delay information.
2. The method according to claim 1, characterized in that in, The node resource information includes CPU utilization, memory utilization, remaining CPU capacity and remaining memory capacity; the Pod resource information includes CPU demand and memory demand.
3. The method according to claim 2, characterized in that Determine resource utilization information between the target Pod and each node based on the Pod resource information of the target Pod and the node resource information of each node, including: Determine a first CPU parameter based on the sum of the CPU utilization of each node and the CPU demand of the target Pod, determine a second CPU parameter based on a ratio of the first CPU parameter to the remaining CPU capacity of the node, and determine CPU resource utilization information based on a difference between a value of 1 and the second CPU parameter; A first memory parameter is determined based on the sum of the memory utilization of each node and the memory requirement of the target Pod, a second memory parameter is determined based on the ratio of the first memory parameter to the remaining memory capacity of the node, and memory resource utilization information is determined based on the difference between the value 1 and the second memory parameter.
4. The method according to claim 2, characterized in that The node resource information also includes network delays between nodes; Determine the node latency between the target Pod and the Pods in the same group based on the Pod resource information of the target Pod and the node resource information of each node, including: Determine the Pods in the same scheduling group as the target Pod, and determine the nodes in the same group corresponding to each of the Pods in the same scheduling group; The node delay information is determined according to the average network delay between each of the nodes to be bound to the target Pod and each of the nodes in the same group.
5. The method according to claim 4, characterized in that Determining node delay information according to the average network delay between each of the nodes to be bound to the target Pod and each of the nodes in the same group includes: The node delay information is determined according to the following formula: Among them, p i Indicates the i-th target Pod, n j Indicates the jth node to which the target Pod is to be bound, p k Indicates the kth Pod in the same group corresponding to the target Pod, A(p k ) represents the node in the same group corresponding to the kth Pod in the same group, and G represents the number of Pods in the scheduling group corresponding to the target Pod.
6. The method according to claim 1, characterized in that Determining a target node for scheduling the target Pod from each node according to the resource utilization information and the node delay information, including: Filtering candidate nodes from each node according to the resource utilization information and the node delay information; A target node is determined from the candidate nodes by using multiple optimization algorithms.
7. The method according to claim 6, characterized in that Determining the target node from the candidate nodes through multiple optimization algorithms, including: Determine the scoring results between the target Pod and each of the candidate nodes using an ant colony optimization algorithm, a non-dominated sorting genetic algorithm, a simulated annealing algorithm, and an integer linear programming algorithm, respectively; The scoring results are weighted and fused, and the target node is determined according to the fused scoring results.
8. A cloud-native multi-region cluster dynamic scheduling device, characterized in that: The device includes: A resource determination module, configured to determine node resource information of multiple nodes in a cloud native cluster and pod resource information of multiple pods in a pod set to be scheduled to the cloud native cluster; A resource calculation module is used to determine the resource utilization information between the target Pod and each node, and the node delay information between the target Pod and the same group of Pods based on the Pod resource information of the target Pod and the node resource information of each node; A target node determination module is configured to determine a target node for scheduling the target Pod from among the nodes based on the resource utilization information and the node delay information.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cloud-native multi-region cluster dynamic scheduling method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement the cloud-native multi-region cluster dynamic scheduling method according to any one of claims 1 to 7 when executed.