Node scheduling method, device, equipment and medium of container orchestration system

By determining the specified hash ring for the persistent volume declaration and using hash operations to select the target hash point, the problem of insufficient storage resources in the Kubernetes scheduling algorithm is solved, and the balanced allocation of storage resources and the successful creation of scheduling units are achieved.

CN115291997BActive Publication Date: 2026-07-14CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2022-07-19
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In multi-availability-domain scenarios, Kubernetes (K8S) scheduling algorithms ignore backend storage resources, causing Pods to fail to be created because storage resources are insufficient to meet the needs of scheduling units.

Method used

By determining a specific hash ring for each persistent volume declaration, selecting a target hash point using hash operations, and selecting nodes based on the recommended availability domain corresponding to the target hash point, a balanced allocation of storage resources is ensured.

Benefits of technology

This avoids scheduling unit creation failures due to insufficient storage resources, achieves a more balanced consumption of storage resources, and ensures the successful creation of scheduling units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115291997B_ABST
    Figure CN115291997B_ABST
Patent Text Reader

Abstract

The application discloses a node scheduling method, device, equipment and medium of a container orchestration system. The method comprises the following steps: after determining the specified hash ring according to the resource type of the scheduling unit and the persistent volume declaration, the identification code of the persistent volume declaration is input into the specified hash ring for hash operation to determine the corresponding hash point of the identification code in the hash ring. The specified hash ring is determined based on the storage resources of the resource type in each available domain, and each hash point in the ring corresponds to a unique available domain, so that the recommended available domain corresponding to the identification code can be determined according to the corresponding hash point. Then, according to the comparison result of the recommended available domain and the available domain of each to-be-allocated node, the specified node for executing the scheduling unit process is selected from each to-be-allocated node. Through the above process, the storage resource consumption of each available domain is more balanced, and the situation that the scheduling unit fails to be created due to insufficient backend storage resources is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a node scheduling method, apparatus, device, and medium for a container orchestration system. Background Technology

[0002] In the container orchestration system Kubernetes (K8S), a Pod is the smallest unit of scheduling and can contain multiple containers. K8S provides the concept of a Persistent Volume (PV), which has a lifecycle independent of any Pod that uses the PV. The backend of a Persistent Volume typically interfaces with network storage, i.e., distributed storage.

[0003] In multi-availability zone scenarios, Pods cannot directly use pre-created PVs. Instead, Kubernetes (K8S) schedulers determine the worker node for the Pod, and then the availability zone of that node determines the storage cluster to be used, where volumes are created. Current K8S scheduling algorithms often filter based on the weight of computing resources corresponding to each availability zone within the system, neglecting the available resources of the backend storage cluster. After the node is selected using the above scheduling algorithm, its corresponding availability zone is also fixed. If the storage resources are insufficient to meet the Pod's needs, the Pod will fail to be created. Summary of the Invention

[0004] This application provides a node scheduling method, apparatus, device, and medium for a container orchestration system, which allocates nodes based on the storage resource requirements of the scheduling unit, avoiding the failure of scheduling unit creation due to insufficient backend storage resources.

[0005] In a first aspect, embodiments of this application provide a node scheduling method for a container orchestration system, the method comprising:

[0006] In response to a resource scheduling request, the scheduling information of the scheduling unit and the nodes to be allocated are obtained; wherein, the scheduling information includes at least a plurality of persistent volume declarations contained within the scheduling unit, and the resource type of the storage resources requested by each persistent volume declaration; the nodes to be allocated are candidate nodes in the available domain of the system that meet the computing resource requirements of the scheduling unit.

[0007] For each persistent volume declaration, a designated hash ring is determined based on the resource type of the persistent volume declaration; a target hash point corresponding to the persistent volume declaration on the designated hash ring is determined by performing a hash operation on the identifier of the persistent volume declaration, and a recommended availability domain is determined based on the target hash point; wherein, the designated hash ring has multiple hash points, each hash point corresponds to a unique availability domain in the system, and the number of hash points of each availability domain in the designated hash ring is positively correlated with the capacity of the storage resources of the resource type in the availability domain;

[0008] Based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, a designated node for executing the scheduling unit process is selected from each of the nodes to be allocated.

[0009] This application embodiment determines a designated hash ring based on the resource type declared in the scheduling unit and the persistent volume declaration. The identifier of the persistent volume declaration is input into the designated hash ring for hash calculation, obtaining the target hash point corresponding to the identifier within the designated hash ring. Then, based on the comparison results between the recommended availability domain corresponding to the target hash point and each node to be allocated, a designated node for executing the scheduling unit process is selected. The designated hash ring is determined based on the storage resources of this resource type in each availability domain, and each node to be allocated is a candidate node in the system whose availability domain meets the computing resource requirements of the scheduling unit. This process achieves a more balanced consumption of storage resources across availability domains, avoiding scheduling unit creation failures due to insufficient backend storage resources.

[0010] In some possible embodiments, the scheduling information further includes the resource capacity corresponding to the resource type of the persistent volume declaration; before selecting the designated node for executing the scheduling unit process from each of the nodes to be allocated, the method further includes:

[0011] For each resource type, a first score is determined based on a first ratio of the resource capacity corresponding to the resource type to the total resource capacity required by the scheduling unit; wherein, the first score is positively correlated with the first ratio;

[0012] The second score of the persistent volume declaration is determined based on the first score and the second ratio of the resource capacity of the persistent volume declaration to the target capacity; wherein, the target capacity is the resource capacity of all persistent volume declarations with the same resource type as the persistent volume declaration within the scheduling unit, and the second score is positively correlated with the second ratio;

[0013] The step of selecting a designated node for executing the scheduling unit process from among the nodes to be allocated, based on the comparison result between the recommended available domain and the available domain corresponding to the node to be allocated, includes:

[0014] A third score is determined based on the comparison results. The total score of the scheduling unit on the node to be assigned is determined based on the first score, the second score, and the third score. The node to be assigned with the highest total score is selected as the designated node. The third score indicates whether the recommended availability domain is the same as the availability domain corresponding to the node to be assigned.

[0015] In some possible embodiments, before selecting the designated node from the nodes to be allocated for executing the scheduling unit process, the method further includes:

[0016] Based on the resource type and resource capacity corresponding to each persistent volume declaration, a target availability domain that meets the resource type and resource capacity requirements of all persistent volume declarations within the scheduling unit is selected from the system.

[0017] The fourth score of the node to be assigned is determined based on the comparison results between the available domain corresponding to the node to be assigned and each of the target available domains; the fourth score indicates whether the available domain corresponding to the node to be assigned is the target available domain.

[0018] After determining the first score, the second score, and the third score, the method further includes:

[0019] The sum of the first score, the second score, the third score, and the fourth score is taken as the total score of the node to be assigned, and the node with the highest total score is taken as the designated node.

[0020] In some possible embodiments, the designated hash ring is constructed as follows:

[0021] The available capacity of storage resources of the resource type in each available domain within the system is determined, and a consistent hashing algorithm is used to construct a consistent hashing ring with a preset number of hash points; the consistent hashing ring contains the preset number of hash points.

[0022] Based on the available capacity of each available domain, determine the corresponding hash point on the consistent hash ring for each available domain; after determining the correspondence between the hash points and each available domain, use the consistent hash ring as the designated hash ring.

[0023] In some possible embodiments, determining the hash point corresponding to each available domain on the consistent hash ring based on the available capacity of each available domain includes:

[0024] A preset weight for each available domain is determined based on its available capacity; wherein, the larger the available capacity, the higher the preset weight.

[0025] For each availability domain, the hash point corresponding to the availability domain on the specified hash ring is determined based on the unique identifier of the availability domain and the preset weight.

[0026] In some possible embodiments, determining the target hash point corresponding to the persistent volume declaration on the specified hash ring by hashing the identifier of the persistent volume declaration includes:

[0027] Determine the location region on the specified hash ring corresponding to the hash operation result;

[0028] The hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region is taken as the target hash point.

[0029] In some possible embodiments, before selecting the hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region as the target hash point, the method further includes:

[0030] The availability domain corresponding to the hash point is determined as the target availability domain; wherein, the target availability domain is the availability domain in the system that satisfies the resource type and resource capacity requirements corresponding to all persistent volume declarations within the scheduling unit;

[0031] The method further includes:

[0032] If the availability domain corresponding to the hash point is not the target availability domain, then the availability domains of the remaining hash points located on the specified direction side of the hash point are compared with the target availability domain in turn, until the availability domain of the target hash point is determined from the remaining hash points.

[0033] Secondly, embodiments of this application provide a node scheduling device for a container orchestration system, the device comprising:

[0034] The information acquisition module is configured to respond to a resource scheduling request by acquiring scheduling information of the scheduling unit and nodes to be allocated; wherein, the scheduling information includes at least multiple persistent volume declarations contained within the scheduling unit, and the resource type of storage resources requested by each persistent volume declaration; the nodes to be allocated are candidate nodes in the available domain of the system that meet the computing resource requirements of the scheduling unit.

[0035] The recommended availability zone module is configured to perform the following actions for each persistent volume declaration: determine a specified hash ring based on the resource type of the persistent volume declaration; determine the target hash point corresponding to the persistent volume declaration on the specified hash ring by performing a hash operation on the identifier of the persistent volume declaration; and determine the recommended availability zone based on the target hash point. The specified hash ring contains multiple hash points, each hash point corresponds to a unique availability zone within the system, and the number of hash points for each availability zone within the specified hash ring is positively correlated with the capacity of the storage resources of the specified resource type in the availability zone.

[0036] The node selection module is configured to select a designated node from the nodes to be allocated, based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, for executing the scheduling unit process.

[0037] In some possible embodiments, the scheduling information further includes the resource capacity corresponding to the resource type of the persistent volume declaration; before executing the selection of a designated node from the nodes to be allocated for executing the scheduling unit process, the node selection module is further configured to:

[0038] For each resource type, a first score is determined based on a first ratio of the resource capacity corresponding to the resource type to the total resource capacity required by the scheduling unit; wherein, the first score is positively correlated with the first ratio;

[0039] For each persistent volume declaration, a second score is determined based on the first score and a second ratio of the resource capacity of the persistent volume declaration to the target capacity; wherein, the target capacity is the resource capacity of all persistent volume declarations within the scheduling unit that have the same resource type as the persistent volume declaration, and the second score is positively correlated with the second ratio;

[0040] Based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, a designated node for executing the scheduling unit process is selected from the nodes to be allocated. The node selection module is configured as follows:

[0041] A third score is determined based on the comparison results. The total score of the scheduling unit on the node to be assigned is determined based on the first score, the second score, and the third score. The node to be assigned with the highest total score is selected as the designated node. The third score indicates whether the recommended availability domain is the same as the availability domain corresponding to the node to be assigned.

[0042] In some possible embodiments, before performing the selection of a designated node from the nodes to be allocated for executing the scheduling unit process, the node selection module is further configured to:

[0043] Based on the resource type and resource capacity corresponding to each persistent volume declaration, a target availability domain that meets the resource type and resource capacity requirements of all persistent volume declarations within the scheduling unit is selected from the system.

[0044] The fourth score of the node to be assigned is determined based on the comparison results between the available domain corresponding to the node to be assigned and each of the target available domains; the fourth score indicates whether the available domain corresponding to the node to be assigned is the target available domain.

[0045] After determining the first score, the second score, and the third score, the node selection module is further configured to:

[0046] The sum of the first score, the second score, the third score, and the fourth score is taken as the total score of the node to be assigned, and the node with the highest total score is taken as the designated node.

[0047] In some possible embodiments, the device further includes:

[0048] The hash ring building module is configured to build the specified hash ring in the following manner:

[0049] The available capacity of storage resources of the resource type in each available domain within the system is determined, and a consistent hashing algorithm is used to construct a consistent hashing ring with a preset number of hash points; the consistent hashing ring contains the preset number of hash points.

[0050] Based on the available capacity of each available domain, determine the corresponding hash point on the consistent hash ring for each available domain; after determining the correspondence between the hash points and each available domain, use the consistent hash ring as the designated hash ring.

[0051] In some possible embodiments, the hash ring construction module is configured to perform the determination of the hash point corresponding to each available domain on the consistent hash ring based on the available capacity of each available domain.

[0052] A preset weight for each available domain is determined based on its available capacity; wherein, the larger the available capacity, the higher the preset weight.

[0053] For each availability domain, the hash point corresponding to the availability domain on the specified hash ring is determined based on the unique identifier of the availability domain and the preset weight.

[0054] In some possible embodiments, the recommended availability domain module is configured to determine the target hash point corresponding to the persistent volume claim on the specified hash ring by performing a hash operation on the identifier of the persistent volume claim.

[0055] Determine the location region on the specified hash ring corresponding to the hash operation result;

[0056] The hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region is taken as the target hash point.

[0057] In some possible embodiments, before executing the step of selecting the hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region as the target hash point, the recommended availability domain module is further configured to:

[0058] The availability domain corresponding to the hash point is determined as the target availability domain; wherein, the target availability domain is the availability domain in the system that satisfies the resource type and resource capacity requirements corresponding to all persistent volume declarations within the scheduling unit;

[0059] The recommended availability domain module is also configured as follows:

[0060] If the availability domain corresponding to the hash point is not the target availability domain, then the availability domains of the remaining hash points located on the specified direction side of the hash point are compared with the target availability domain in turn, until the availability domain of the target hash point is determined from the remaining hash points.

[0061] Thirdly, embodiments of this application provide an electronic device, including:

[0062] Memory, used to store program instructions;

[0063] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.

[0064] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.

[0065] Fifthly, embodiments of this application provide a computer program product comprising: computer program code, which, when executed on a computer, causes the computer to perform the method described in any of the first aspects. Attached Figure Description

[0066] Figure 1 A flowchart illustrating the node scheduling method of the container orchestration system provided in this application embodiment;

[0067] Figure 2 This is a schematic diagram showing the resource types corresponding to each persistent declaration within the scheduling unit provided in the embodiments of this application;

[0068] Figure 3 This is a schematic diagram of the specified hash ring construction process provided in the embodiments of this application;

[0069] Figure 4 This is a schematic diagram of hash point selection provided in an embodiment of this application;

[0070] Figure 5 A flowchart for establishing the correspondence between hash points and available domains provided in this application embodiment;

[0071] Figure 6 A schematic diagram illustrating the calculation of the first and second scores provided in this application embodiment;

[0072] Figure 7 This application provides an overall flowchart for determining a specified node in its embodiments.

[0073] Figure 8 A structural diagram of a node scheduling device 800 for a container orchestration system provided in this application embodiment;

[0074] Figure 9 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0076] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses. The term "multiple" in this application can mean at least two, for example, two, three, or more, and is not limited by the embodiments of this application.

[0077] As mentioned earlier, in a multi-availability-domain scenario, it is necessary to determine the worker node corresponding to the Pod based on the Kubernetes scheduler, and then determine the storage cluster to be used based on the availability domain corresponding to that node and create volumes within it.

[0078] Specifically, Kubernetes (K8S) uses Pod topology spread constraints to control the distribution of Pods across availability zones within the cluster. That is, by labeling all worker nodes in the system with topology zone tags, nodes from multiple availability zones are selected based on these tags when a Pod is created. The specific node selection is handled by the K8S scheduler. For each newly created Pod or an unscheduled Pod, the scheduler filters and selects candidate nodes that represent a certain proportion of the total number of worker nodes in the system based on the scheduling requirements of the persistent volume claims (PVCs) within the Pod. These candidate nodes are then scored according to a series of preset functions, and the node with the highest score is selected to run the scheduled Pod.

[0079] The aforementioned scheduling algorithm ensures that the selected nodes meet the computational resource requirements declared for each persistent volume within the scheduling unit, and maintains a balance in computational resource usage among the resource pools corresponding to each availability domain within the system as much as possible. However, it overlooks the capacity issue of backend storage resources. If the storage resources corresponding to the selected nodes are insufficient to support the use of the scheduling unit, the scheduling unit will fail to be created successfully.

[0080] To address the aforementioned issues, the inventive concept of this application is as follows: A designated hash ring is determined based on the resource type declared for each persistent volume within the scheduling unit. This designated hash ring is determined based on the storage resources of that resource type in each availability domain. By inputting the identifier of the persistent volume declaration into the designated hash ring for hashing, the target hash point corresponding to the identifier within the designated hash ring can be obtained. Then, based on the comparison results between the recommended availability domain corresponding to the target hash point and each node to be allocated, a designated node for executing the scheduling unit process is selected. Each node to be allocated is a candidate node in the system whose availability domain meets the computing resource requirements of the scheduling unit. This process allows for a more balanced consumption of storage resources across each availability domain, avoiding scheduling unit creation failures due to insufficient backend storage resources.

[0081] See Figure 1 , Figure 1 A flowchart of a node scheduling method for a container orchestration system provided in this application embodiment is included, specifically comprising the following steps:

[0082] Step 101: In response to a resource scheduling request, obtain the scheduling information of the scheduling unit and the nodes to be allocated; wherein, the scheduling information includes at least a plurality of persistent volume declarations contained in the scheduling unit, and the resource type of the storage resources requested by each persistent volume declaration; the nodes to be allocated are candidate nodes in the available domain of the system that meet the computing resource requirements of the scheduling unit.

[0083] First, a brief explanation of scheduling information: scheduling information refers to the resource types of storage resources required by each persistent volume within the scheduling unit Pod. For example... Figure 2 As shown, a Pod in Kubernetes contains multiple PVCs, and each PVC requires only one type of storage resource. Storage resource types can include hard disk drives (HDDs), solid-state drives (SSDs), etc. The following section will introduce the nodes to be allocated.

[0084] As mentioned earlier, this application aims to allocate nodes based on the storage resource requirements of the scheduling unit while ensuring computing resources. The nodes to be allocated in step 101 above can be candidate nodes selected in Kubernetes based on the computing resource usage of resource pools within each availability zone.

[0085] Furthermore, considering that Kubernetes (K8S) allows users to customize scheduling, its scheduling framework supports the use of custom scoring plugins at any stage to replace or add new plugins, enabling nodes to be scheduled according to custom logic. The K8S scheduler calls each scoring plugin for each node, with a well-defined integer range representing the minimum and maximum scores. After the standardized scoring phase, the scheduler merges the node scores of all plugins based on the configured plugin weights to select the optimal node. Therefore, the nodes to be assigned can also be the N candidate nodes with the highest scores obtained from the computing resource-based scoring plugins. This application does not limit this, only requiring that the computing resources of the available domain corresponding to each node to be assigned meet the requirements of the scheduling unit.

[0086] Step 102: For each persistent volume declaration, determine a designated hash ring based on the resource type of the persistent volume declaration; determine the target hash point corresponding to the persistent volume declaration on the designated hash ring by performing a hash operation on the identifier of the persistent volume declaration, and determine the recommended availability domain based on the target hash point; wherein, the designated hash ring has multiple hash points, each hash point corresponds to a unique availability domain in the system, and the number of hash points of each availability domain in the designated hash ring is positively correlated with the capacity of the storage resources of the resource type in the availability domain;

[0087] The designated hash ring in this application embodiment is constructed as follows: First, the available capacity of storage resources of resource types in each availability domain within the system is determined, and a consistent hashing algorithm is used to construct a consistent hash ring with a preset number of hash points. Then, based on the available capacity of each availability domain, the hash points corresponding to each availability domain on the consistent hash ring are determined; after determining the correspondence between hash points and each availability domain, the consistent hash ring is used as the designated hash ring.

[0088] In implementation, a designated hash ring is established for each storage resource type. This designated hash ring is implemented using a consistent hashing algorithm through a consistent hash ring structure, and the integer distribution range of the entire ring is [0, 2]. 32-1 The aforementioned consistent hash ring contains a preset number of hash points, each hash point corresponding to a unique available domain.

[0089] Next, the preset weight of each availability domain is determined based on its available capacity; the larger the available capacity, the higher the preset weight. Then, for each availability domain, the hash point corresponding to the availability domain on the specified hash ring is determined according to the unique identifier of the availability domain and the preset weight. Specifically, the available capacity of the resource type of the storage resource corresponding to each availability domain can be determined by the following formula (1):

[0090] C Di =S Di ×PDi -U Di (1)

[0091] Where Di represents the i-th resource type, and C Di S represents the available capacity of storage resources of type Di. Di P represents the total capacity of storage resources of type Di. Di S represents Di Usable security thresholds, U Di This indicates the amount of storage space that has been used for the Di type storage resource.

[0092] Next, for each resource type Di, the preset weight W of the Di type storage resource in each availability zone Z is determined by the following formula (2). Di :

[0093]

[0094] Next, a specific hash ring is constructed for each storage type Di. Specifically, the SHA1 hash algorithm is used to hash the corresponding Key, and then 4 bytes of the hash value are extracted to generate an integer value. All integers generated for each Key are sorted and mapped to a space with 2^32 hash points, i.e., [0, 2^32]. 32-1 In the digital space, the closed ring formed by connecting the beginning and end of these numbers is the aforementioned hash ring.

[0095] Because the number of available domains is not very large, and consistent hashing works best in environments with more than 1000 hash points, it is necessary to add virtual hash points within the ring. Specifically, as follows... Figure 3 As shown, assuming there are 5 availability domains A to E in the system, then there are only 5 hash points obtained based on the availability domain name within the consistent hash ring, i.e. Figure 3 The solid-line circles indicate hash points A through E. It should be understood that the specific positions of these hash points A through E within the consistent hash ring are based on the hash calculation performed on the available domain names, and are located in the ring's numeric space [0, 2...]. 32-1 The corresponding position of ] is determined.

[0096] The next step is to add virtual hash points within the ring to ensure that the hash points are distributed as evenly as possible within the hash ring. These virtual hash points are... Figure 3The positions and numbers of the virtual hash points A to E marked by dashed lines in the consistent hash ring are determined as follows. In implementation, the total number of hash points in the ring can be set according to actual conditions (e.g., 1000). Then, the number of virtual hash points K to be added to the ring is determined based on the difference between the set total number and the actual hash points corresponding to the available domain. Then, the number of hash points corresponding to each available domain Z in the consistent hash ring is determined using the following formula (3):

[0097] N zj =k×W zj (3)

[0098] Where Zj represents the j-th available domain, N zj Zj represents the number of virtual hash points, k represents the total number of virtual hash points, and W represents the number of virtual hash points. zj The weight of the Di type storage resource corresponding to availability zone Zj (i.e., the W of availability zone Zj). Di Next, using the name of the available domain Z and the hash point number belonging to Z as the key, a hash operation is performed and the hash point is marked on the ring, so that each hash point in the ring corresponds to a unique available domain.

[0099] After determining the availability domain corresponding to each hash point within the consistent hash ring through the above process, this consistent hash ring is used as the designated hash ring for resource type Di. In summary, for storage resources of resource type Di, the larger the available capacity of the storage resource of availability domain Di, the higher its preset weight, and the more hash points it corresponds to on the designated hash ring.

[0100] In this embodiment, the Universally Unique Identifier (UUID) of the persistent volume declaration is used as input, and the target hash point within the specified hash ring is determined based on the hash operation result of the UUID. The availability domain corresponding to this target hash point is the recommended availability domain selected in step 102 above. In practice, after determining the location region corresponding to the hash operation result on the specified hash ring, the hash point within the specified hash ring that is adjacent to this location region and located on the specified directional side of that location region is taken as the target hash point.

[0101] Furthermore, as mentioned above, this application aims to allocate nodes based on the storage resource requirements of the scheduling unit, while ensuring sufficient computing resources. Therefore, before determining the target hash point through the hash operation result based on the UUID, it is necessary to ensure that the availability domain corresponding to the target hash point meets the resource requirements of all persistent volume declarations within the scheduling unit.

[0102] In some possible embodiments, the scheduling information of the scheduling unit also includes the resource capacity of the resource type corresponding to each persistent volume declaration. Before performing steps 101 to 102 above on the scheduling unit, a target availability domain form for a given period of time needs to be retrieved through a custom function. This form is a set of all target availability domains in Kubernetes that meet the resource requirements of all persistent volume declarations within the scheduling unit within the given period of time.

[0103] After determining the corresponding hash point within the specified hash ring based on the hash calculation result of the UUID, it is necessary to first compare whether the availability domain corresponding to the hash point is in the target availability domain list. If it is not in the list, it indicates that the availability domain corresponding to the hash point cannot meet the resource requirements of the scheduling unit. At this point, the availability domains of the remaining hash points located on the specified direction side of the hash point need to be compared with the target availability domain in turn, until the availability domain is determined to be the target hash point of the target availability domain from the remaining hash points on the specified hash ring.

[0104] Specifically, such as Figure 4 As shown, Figure 4 The diagram illustrates the specified hash ring corresponding to resource type Di. Assuming the hash result of the UUID corresponds to the region indicated by the arrow within the ring, the nearest hash point E to this region is found clockwise. Then, it is determined whether the availability domain corresponding to hash point E is in the target availability domain list. If it is, hash point A is determined as the target hash point; otherwise, hash points E, D, E, B… are traversed clockwise sequentially until the target hash point corresponding to an availability domain in the target availability domain list is found.

[0105] Furthermore, since the cluster capacity and the number of each availability zone change in stages, it is necessary to update the specified hash ring periodically. That is, every preset interval, the storage resources of each availability zone in the K8S system are statistically analyzed, and the specified hash ring corresponding to each resource type is updated based on the statistical results.

[0106] See details Figure 5 , Figure 5 The process of periodically updating each specified hash ring at preset intervals, as illustrated in the embodiments of this application, includes:

[0107] Step 501: Obtain the status of all availability zones in Kubernetes and the storage resources in the resource pools of each availability zone;

[0108] Step 502: Traverse each resource type of the storage resources; for each resource type, construct the specified hash ring corresponding to that resource type through the following steps.

[0109] Step 503: Determine the available capacity of the storage resources corresponding to the current resource type in the resource pool of each availability domain;

[0110] Step 504: Determine the preset weight of the availability domain based on the available capacity;

[0111] Step 505: Determine the hash points corresponding to each availability domain within the specified hash ring according to the preset weights. This completes the update of the specified hash ring corresponding to the current resource type. Next, return to step 502 above to update the specified hash ring for the next resource type.

[0112] Step 103: Based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, select a designated node from the nodes to be allocated to execute the scheduling unit process.

[0113] This application embodiment selects a designated node for executing the scheduling unit process from among the nodes to be allocated based on a preset scoring mechanism. The specific scoring rules are as follows:

[0114] First, for each type of storage resource, a first score is determined based on a first ratio of the resource capacity within the scheduling unit; wherein the first score is positively correlated with the first ratio. Then, for each persistent volume declaration, a second score is determined based on the aforementioned first score and a second ratio of the resource capacity of the persistent volume declaration to the target capacity; wherein the target capacity is the resource capacity of all persistent volume declarations within the scheduling unit that correspond to the same resource type as the persistent volume declaration, and the second score is positively correlated with the second ratio.

[0115] Specifically, since the resource types corresponding to persistent volume declarations within the same scheduling unit are different, the final score of 0 needs to be weighted through multiple PVCs. The maximum score for nodes to be allocated is set to S. max After summarizing the persistent volume declarations within the scheduling unit, the total resource capacity for the storage resource requirement of persistent volume declaration with resource type Di is obtained, which is C. Di Then the first score S mentioned above Di It can be shown in the following formula (4):

[0116]

[0117] Next, for each Di type persistent volume declaration, the required resource capacity C can be determined using the following formula (5). Vi To calculate the second score W for each persistent volume declaration Vi :

[0118]

[0119] To facilitate understanding of the specific calculation process for the first and second scores mentioned above, the details are as follows: Figure 6 As shown. Figure 6The scheduling unit Pod shown contains three persistent volume declarations PVC1 to PVC3. PVC1 and PVC2 are of HDD resource type, PVC3 is of SSD resource type, PVC1 and PVC2 each have a resource capacity of 20G, and PVC3 has a resource capacity of 60G.

[0120] Assume the maximum score S for each node to be assigned max Assuming a score of 100, the first score for HDD can be calculated using formula (4) as [(20+20) / (20+20+60)]×100 points = 40 points, and the first score for SSD is [60 / (20+20+60)]×100 points = 60 points. Next, based on the first score for HDD, the second scores for PVC1 and PVC2 corresponding to HHD are calculated. Since the resource capacity of PVC1 and PVC2 is 20G, their second scores are both [20 / (20+20)]×40 points = 20 points, while the second score for PVC3 should be [60 / 60]×60 points = 60 points. Through the above process, each resource type of storage resource in the scheduling unit corresponds to a first score, and each persistent volume declaration under each resource type corresponds to a second score.

[0121] Since the first and second scores mentioned above are determined based on the resource requirements of the scheduling unit itself and do not involve each node to be allocated, the third score needs to be determined next based on the comparison between the recommended availability domain selected by the specified hash ring in step 102 and the corresponding availability domain of the node to be allocated. The third score can be represented by a weight coefficient. If the recommended availability domain is the same as the availability domain of the node to be allocated, a higher coefficient KH is assigned to it; otherwise, a lower coefficient KL is assigned (KL < KH ≤ 1).

[0122] Furthermore, a fourth score is determined based on the comparison results between the availability domain corresponding to the node to be allocated and each target availability domain. The fourth score indicates whether the availability domain corresponding to the node to be allocated is a target availability domain. The target availability domain is any availability domain in the target availability domain table mentioned above. Here, it means that if the availability domain corresponding to the node to be allocated is a target availability domain, it means that the storage resources of the node to be allocated meet the requirements of the scheduling unit, and the node to be allocated can be given 100 points; otherwise, it is given 0 points.

[0123] Through the above process, the first, second, third, and fourth scores corresponding to the node to be allocated, calculated based on a persistent volume declaration in the scheduling unit, can be obtained. In implementation, the first to fourth scores for each persistent volume declaration can be calculated for the node to be allocated, and then the sum of the first to fourth scores for the N sets of nodes to be allocated corresponding to the N sets of persistent volume declarations can be used as the total score for that node. The specific process is as follows: Figure 7 As shown, it includes:

[0124] Step 701: Obtain the nodes to be assigned and the scheduling units waiting to be processed;

[0125] The nodes to be allocated can be multiple candidate nodes selected in K8S based on the computing resource usage of resource pools in each availability domain, or the N candidate nodes with the highest scores obtained by the computing resource scoring plugin. This application does not limit this, only requiring that the computing resources of the availability domain corresponding to each node to be allocated meet the requirements of the scheduling unit.

[0126] Step 702: Classify the persistent volume declarations within the scheduling unit according to the resource type of the storage resources;

[0127] The target availability domain form is the set of all availability domains in Kubernetes that meet the storage resource requirements (including resource type and resource capacity) of the scheduling unit.

[0128] Step 703: Call the preset interface to obtain the target available domain form;

[0129] Step 704: Determine whether the node to be assigned is within the target availability domain form, and give the fourth score to the node to be assigned based on the determination result;

[0130] Next, each persistent volume declaration within the scheduling unit is traversed through steps 705 to 709 to determine the first score, second score, and third score of the node to be allocated based on the storage resource requirements corresponding to the persistent volume declaration.

[0131] Step 705: Based on the resource type corresponding to the persistent volume declaration, determine the first score of the resource type by the ratio of the resource capacity of that resource type to the total resource capacity occupied within the scheduling unit;

[0132] Step 706: Determine the second score of the persistent volume declaration based on the first score of the resource type and the second ratio of the resource capacity of the persistent volume declaration corresponding to the resource type to the target capacity; wherein, the target capacity is the resource capacity of all persistent volume declarations with the same resource type as the persistent volume declaration within the scheduling unit.

[0133] Step 707: Determine the specified hash ring based on the resource type declared in the persistent volume, and determine the recommended availability domain from the specified hash ring based on the UUID;

[0134] Step 708: Determine whether the availability domain of the node to be assigned is the same as the recommended availability domain, and give a third score based on the determination result.

[0135] Step 709: The sum of the first score, the second score, the third score, and the fourth score is taken as the total score of the node to be assigned corresponding to the persistent declaration;

[0136] Step 710: Determine whether all persistent volume declarations within the scheduling unit have been traversed;

[0137] Step 711: If the traversal is complete, the total score of all pending nodes corresponding to all persistent volume declarations is taken as the final total score of the pending node. Otherwise, for the remaining persistent volume declarations in the scheduling unit, steps 705 to 709 above are executed respectively to obtain the pending nodes corresponding to the remaining persistent volume declarations.

[0138] Step 712: Determine whether the traversal of each node to be assigned has ended;

[0139] Step 713: If yes, select the node with the highest final total score as the designated node; otherwise, perform steps 704 to 712 above on the remaining nodes to be assigned to obtain the final total score of each remaining node to be assigned.

[0140] The above process ensures sufficient computing resources while balancing the storage resource consumption of each availability domain in Kubernetes, thus avoiding the failure of scheduling unit creation due to insufficient backend storage resources.

[0141] Based on the same inventive concept, embodiments of this application provide a node scheduling device 800 for a container orchestration system, such as... Figure 8 As shown, it includes:

[0142] The information acquisition module 801 is configured to respond to a resource scheduling request by acquiring scheduling information of a scheduling unit and nodes to be allocated; wherein, the scheduling information includes at least a plurality of persistent volume declarations contained within the scheduling unit, and the resource type of storage resources requested by each persistent volume declaration; the nodes to be allocated are candidate nodes in the system whose availability domains meet the computing resource requirements of the scheduling unit.

[0143] The recommended availability zone module 802 is configured to perform the following actions for each persistent volume claim: determine a specified hash ring based on the resource type of the persistent volume claim; determine the target hash point corresponding to the persistent volume claim on the specified hash ring by performing a hash operation on the identifier of the persistent volume claim; and determine the recommended availability zone based on the target hash point. The specified hash ring contains multiple hash points, each hash point corresponds to a unique availability zone within the system, and the number of hash points for each availability zone within the specified hash ring is positively correlated with the capacity of the storage resources of the specified resource type in the availability zone.

[0144] The node selection module 803 is configured to select a designated node from the nodes to be allocated, based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, for executing the scheduling unit process.

[0145] In some possible embodiments, the scheduling information further includes the resource capacity corresponding to the resource type of the persistent volume declaration; before executing the selection of a designated node from the nodes to be allocated for executing the scheduling unit process, the node selection module 803 is further configured to:

[0146] For each resource type, a first score is determined based on a first ratio of the resource capacity corresponding to the resource type to the total resource capacity required by the scheduling unit; wherein, the first score is positively correlated with the first ratio;

[0147] For each persistent volume declaration, a second score is determined based on the first score and a second ratio of the resource capacity of the persistent volume declaration to the target capacity; wherein, the target capacity is the resource capacity of all persistent volume declarations within the scheduling unit that have the same resource type as the persistent volume declaration, and the second score is positively correlated with the second ratio;

[0148] Based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, a designated node for executing the scheduling unit process is selected from the nodes to be allocated. The node selection module 803 is configured as follows:

[0149] A third score is determined based on the comparison results. The total score of the scheduling unit on the node to be assigned is determined based on the first score, the second score, and the third score. The node to be assigned with the highest total score is selected as the designated node. The third score indicates whether the recommended availability domain is the same as the availability domain corresponding to the node to be assigned.

[0150] In some possible embodiments, before performing the selection of a designated node from the nodes to be allocated for executing the scheduling unit process, the node selection module 803 is further configured to:

[0151] Based on the resource type and resource capacity corresponding to each persistent volume declaration, a target availability domain that meets the resource type and resource capacity requirements of all persistent volume declarations within the scheduling unit is selected from the system.

[0152] The fourth score of the node to be assigned is determined based on the comparison results between the available domain corresponding to the node to be assigned and each of the target available domains; the fourth score indicates whether the available domain corresponding to the node to be assigned is the target available domain.

[0153] After determining the first score, the second score, and the third score, the node selection module 803 is further configured to:

[0154] The sum of the first score, the second score, the third score, and the fourth score is taken as the total score of the node to be assigned, and the node with the highest total score is taken as the designated node.

[0155] In some possible embodiments, the device 800 further includes:

[0156] The hash ring building module is configured to build the specified hash ring in the following manner:

[0157] The available capacity of storage resources of the resource type in each available domain within the system is determined, and a consistent hashing algorithm is used to construct a consistent hashing ring with a preset number of hash points; the consistent hashing ring contains the preset number of hash points.

[0158] Based on the available capacity of each available domain, determine the corresponding hash point on the consistent hash ring for each available domain; after determining the correspondence between the hash points and each available domain, use the consistent hash ring as the designated hash ring.

[0159] In some possible embodiments, the hash ring construction module is configured to perform the determination of the hash point corresponding to each available domain on the consistent hash ring based on the available capacity of each available domain.

[0160] A preset weight for each available domain is determined based on its available capacity; wherein, the larger the available capacity, the higher the preset weight.

[0161] For each availability domain, the hash point corresponding to the availability domain on the specified hash ring is determined based on the unique identifier of the availability domain and the preset weight.

[0162] In some possible embodiments, the recommended availability domain module 802 is configured to perform a hash operation on the identifier of the persistent volume claim to determine the target hash point corresponding to the persistent volume claim on the specified hash ring.

[0163] Determine the location region on the specified hash ring corresponding to the hash operation result;

[0164] The hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region is taken as the target hash point.

[0165] In some possible embodiments, before executing the step of selecting the hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region as the target hash point, the recommended availability domain module 802 is further configured to:

[0166] The availability domain corresponding to the hash point is determined as the target availability domain; wherein, the target availability domain is the availability domain in the system that satisfies the resource type and resource capacity requirements corresponding to all persistent volume declarations within the scheduling unit;

[0167] The recommended availability zone module 802 is also configured to:

[0168] If the availability domain corresponding to the hash point is not the target availability domain, then the availability domains of the remaining hash points located on the specified direction side of the hash point are compared with the target availability domain in turn, until the availability domain of the target hash point is determined from the remaining hash points.

[0169] The following reference Figure 9 To describe an electronic device 130 according to this embodiment of the present application. Figure 9 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0170] like Figure 9 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).

[0171] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.

[0172] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.

[0173] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0174] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0175] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 132 including instructions, which can be executed by a processor 131 of the device 400 to perform the above-described method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0176] In an exemplary embodiment, a computer program product is also provided, including a computer program / instructions that, when executed by a processor 131, implement any of the methods in the node scheduling method of a container orchestration system provided in this application.

[0177] In an exemplary embodiment, various aspects of the node scheduling method for a container orchestration system provided in this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps in the node scheduling method for a container orchestration system according to various exemplary embodiments of this application described above.

[0178] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0179] The program product for node scheduling in a container orchestration system according to embodiments of this application can be a portable compact disc read-only memory (CD-ROM) and include program code, and can run on an electronic device. However, the program product of this application is not limited thereto. In this application, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0180] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take many forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0181] The program code contained on the readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wired, fiber optic, RF, etc., or any suitable combination thereof.

[0182] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as Java or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0183] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0184] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0185] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0186] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable image scaling device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable image scaling device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0187] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable image scaling device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0188] These computer program instructions can also be loaded onto a computer or other programmable image scaling device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process; secondly, the instructions executing on the computer or other programmable device provide for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0189] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0190] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A node scheduling method for a container orchestration system, characterized in that, The method includes: In response to a resource scheduling request, the scheduling information of the scheduling unit and the nodes to be allocated are obtained; the scheduling information includes at least a plurality of persistent volume declarations contained in the scheduling unit, and the resource type and resource capacity of the storage resources requested by each persistent volume declaration; the nodes to be allocated are candidate nodes in the available domain of the system that meet the computing resource requirements of the scheduling unit. For each persistent volume declaration, a designated hash ring is determined based on the resource type of the persistent volume declaration; a target hash point corresponding to the persistent volume declaration on the designated hash ring is determined by performing a hash operation on the identifier of the persistent volume declaration, and a recommended availability domain is determined based on the target hash point; wherein, the designated hash ring has multiple hash points, each hash point corresponds to a unique availability domain in the system, and the number of hash points of each availability domain in the designated hash ring is positively correlated with the capacity of the storage resources of the resource type in the availability domain; For each resource type, a first score is determined based on a first ratio of the resource capacity corresponding to the resource type to the total resource capacity required by the scheduling unit; wherein, the first score is positively correlated with the first ratio; For each persistent volume declaration, a second score is determined based on the first score and a second ratio of the resource capacity of the persistent volume declaration to the target capacity; wherein, the target capacity is the resource capacity of all persistent volume declarations within the scheduling unit that have the same resource type as the persistent volume declaration, and the second score is positively correlated with the second ratio; Based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, a designated node for executing the scheduling unit process is selected from each of the nodes to be allocated: The step of selecting a designated node for executing the scheduling unit process from among the nodes to be allocated, based on the comparison result between the recommended available domain and the available domain corresponding to the node to be allocated, includes: A third score is determined based on the comparison results. The total score of the scheduling unit on the node to be assigned is determined based on the first score, the second score, and the third score. The node to be assigned with the highest total score is selected as the designated node. The third score indicates whether the recommended availability domain is the same as the availability domain corresponding to the node to be assigned.

2. The method according to claim 1, characterized in that, Before selecting the designated node for executing the scheduling unit process from the nodes to be allocated, the method further includes: Based on the resource type and resource capacity corresponding to each persistent volume declaration, a target availability domain that meets the resource type and resource capacity requirements of all persistent volume declarations within the scheduling unit is selected from the system. The fourth score of the node to be assigned is determined based on the comparison results between the available domain corresponding to the node to be assigned and each of the target available domains; the fourth score indicates whether the available domain corresponding to the node to be assigned is the target available domain. After determining the first score, the second score, and the third score, the method further includes: The sum of the first score, the second score, the third score, and the fourth score is taken as the total score of the node to be assigned, and the node with the highest total score is taken as the designated node.

3. The method according to claim 1, characterized in that, The specified hash ring is constructed as follows: The available capacity of storage resources of the resource type in each available domain within the system is determined, and a consistent hashing algorithm is used to construct a consistent hashing ring with a preset number of hash points; the consistent hashing ring contains the preset number of hash points. The hash point corresponding to each available domain on the consistent hash ring is determined based on the available capacity of each available domain. After determining the correspondence between hash points and each available domain, the consistent hash ring is used as the designated hash ring.

4. The method according to claim 3, characterized in that, The step of determining the hash point corresponding to each available domain on the consistent hash ring based on the available capacity of each available domain includes: A preset weight for each available domain is determined based on its available capacity; wherein, the larger the available capacity, the higher the preset weight. For each availability domain, the hash point corresponding to the availability domain on the specified hash ring is determined based on the unique identifier of the availability domain and the preset weight.

5. The method according to claim 3, characterized in that, The step of determining the target hash point corresponding to the persistent volume declaration on the specified hash ring by hashing the identifier of the persistent volume declaration includes: Determine the location region on the specified hash ring corresponding to the hash operation result; The hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region is taken as the target hash point.

6. The method according to claim 5, characterized in that, Before selecting the hash point within the specified hash ring that is adjacent to the location region and located on the specified directional side of the location region as the target hash point, the method further includes: The availability domain corresponding to the hash point is determined as the target availability domain; wherein, the target availability domain is the availability domain in the system that satisfies the resource type and resource capacity requirements corresponding to all persistent volume declarations within the scheduling unit; The method further includes: If the availability domain corresponding to the hash point is not the target availability domain, then the availability domains of the remaining hash points located on the specified direction side of the hash point are compared with the target availability domain in turn, until the availability domain of the target hash point is determined from the remaining hash points.

7. A node scheduling device for a container orchestration system, characterized in that, The device includes: The information acquisition module is configured to respond to a resource scheduling request by acquiring scheduling information of the scheduling unit and nodes to be allocated; the scheduling information includes at least multiple persistent volume declarations contained in the scheduling unit, and the resource type and resource capacity of the storage resources requested by each persistent volume declaration; the nodes to be allocated are candidate nodes in the available domain of the system that meet the computing resource requirements of the scheduling unit. The recommended availability zone module is configured to perform the following actions for each persistent volume declaration: determine a specified hash ring based on the resource type of the persistent volume declaration; determine the target hash point corresponding to the persistent volume declaration on the specified hash ring by performing a hash operation on the identifier of the persistent volume declaration; and determine the recommended availability zone based on the target hash point. The specified hash ring contains multiple hash points, each hash point corresponds to a unique availability zone within the system, and the number of hash points for each availability zone within the specified hash ring is positively correlated with the capacity of the storage resources of the specified resource type in the availability zone. The node selection module is configured to perform a first score for each resource type based on a first ratio of the resource capacity corresponding to the resource type to the total resource capacity required by the scheduling unit; wherein the first score is positively correlated with the first ratio. For each persistent volume declaration, a second score is determined based on the first score and a second ratio of the resource capacity of the persistent volume declaration to the target capacity; wherein, the target capacity is the resource capacity of all persistent volume declarations within the scheduling unit that have the same resource type as the persistent volume declaration, and the second score is positively correlated with the second ratio; Based on the comparison results between the recommended available domain and the available domain corresponding to the node to be allocated, a designated node for executing the scheduling unit process is selected from each of the nodes to be allocated. Based on the comparison results between the recommended availability domain and the availability domain corresponding to the node to be allocated, a designated node for executing the scheduling unit process is selected from the nodes to be allocated. The node selection module is configured as follows: A third score is determined based on the comparison results. The total score of the scheduling unit on the node to be assigned is determined based on the first score, the second score, and the third score. The node to be assigned with the highest total score is selected as the designated node. The third score indicates whether the recommended availability domain is the same as the availability domain corresponding to the node to be assigned.

8. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-6 in accordance with the obtained program instructions.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-6.