Container instance scheduling method, device and system

By dynamically scheduling container instances, the resource utilization of virtual machine nodes is ensured, which solves the problem of wasting container instance resources in cloud computing and achieves normal operation under high business load conditions.

CN115098223BActive Publication Date: 2024-10-01CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210757855.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-10-01
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In cloud computing, container instances only run with high business load for a short period of time and with low business load for a long time, resulting in a waste of resources of virtual machine nodes.

Method used

By obtaining the remaining resources of the virtual machine node and the resource information occupied by the container instance, the container instance is dynamically scheduled to ensure that the remaining amount of each type of resource of the target virtual machine node is not less than the second threshold, thereby reducing resource waste.

Benefits of technology

It enables the normal operation of container instances under high business load, avoids waste of virtual machine node resources, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115098223B_ABST
    Figure CN115098223B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device and system for scheduling container instances, which relate to the field of cloud computing technology. The method comprises: obtaining first information, wherein the first information comprises each type of resource currently remaining in each of a plurality of virtual machine nodes; obtaining second information, wherein the second information comprises each type of resource currently occupied by each container instance running on each of the plurality of virtual machine nodes; and performing scheduling according to the first information and the second information, comprising: scheduling a first group of container instances running on a first group of virtual machine nodes whose currently remaining at least one type of resource is less than a first threshold to corresponding target virtual machine nodes, so that each type of resource remaining in the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than a second threshold, and the second threshold is not less than the first threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a method, device and system for scheduling a container instance. Background Art

[0002] In cloud computing technology, services are carried by container instances (e.g., Pods) running on virtual machine nodes. As service loads change, the resources occupied by container instances also change.

[0003] In the related art, when creating a virtual machine node, it is necessary to configure the virtual machine node to have sufficient resources to ensure that the container instance on the virtual machine node can operate normally under a high business load. Summary of the invention

[0004] However, the inventors have noticed that, in practice, the container instance only runs in a high-traffic load state for a short period of time, and runs in a low-traffic load state for a long period of time. In this case, a large amount of resources of the virtual machine node cannot be effectively utilized for a long time, which causes a waste of resources of the virtual machine node.

[0005] In order to solve the above problems, the embodiments of the present disclosure propose the following solutions.

[0006] According to one aspect of an embodiment of the present disclosure, a method for scheduling a container instance is provided, comprising: obtaining first information, the first information including each type of resource currently remaining for each of a plurality of virtual machine nodes; obtaining second information, the second information including each type of resource currently occupied by each container instance running on each of the plurality of virtual machine nodes; and performing scheduling according to the first information and the second information, comprising: scheduling a first group of container instances running on a first group of virtual machine nodes whose currently remaining at least one type of resource is less than a first threshold to corresponding target virtual machine nodes, so that each type of resource remaining for the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than a second threshold, and the second threshold is not less than the first threshold.

[0007] In some embodiments, the second threshold is greater than the first threshold.

[0008] In some embodiments, performing scheduling according to the first information and the second information also includes: when the number of virtual machine nodes in the second group is greater than a preset number, scheduling the second group of container instances running on the third group of virtual machine nodes to the corresponding target virtual machine nodes, so that each type of resource remaining of the target virtual machine nodes corresponding to the third group of virtual machine nodes and the second group of container instances is not less than the second threshold, wherein each type of resource currently remaining of each virtual machine node in the second group of virtual machine nodes is not less than the first threshold and at least one type of resource is less than the second threshold, and the third group of virtual machine nodes includes at least one virtual machine node in the second group of virtual machine nodes.

[0009] In some embodiments, the third group of virtual machine nodes includes the second group of virtual machine nodes.

[0010] In some embodiments, scheduling the second group of container instances running on the third group of virtual machine nodes to the corresponding target virtual machine nodes includes: scheduling each container instance in the second group of container instances to the corresponding target virtual machine node in turn.

[0011] In some embodiments, the second set of container instances includes each container instance running on each virtual machine node in the plurality of virtual machine nodes.

[0012] In some embodiments, scheduling a first group of container instances running on a first group of virtual machine nodes whose remaining at least one type of resources is less than a first threshold to corresponding target virtual machine nodes includes: scheduling each container instance in the first group of container instances to the corresponding target virtual machine node in turn.

[0013] In some embodiments, the target virtual machine node corresponding to any one of the container instances in the first group of container instances is determined in the following manner: determining an evaluation value of each virtual machine node in the fourth group of virtual machine nodes, wherein the evaluation value is positively correlated with each type of resource currently remaining; and determining the virtual machine node with the highest evaluation value in the fourth group of virtual machine nodes as the target virtual machine node corresponding to the any one of the container instances.

[0014] In some embodiments, each type of resource currently remaining in each virtual machine node in the fourth group of virtual machine nodes is not less than the resource of that type currently occupied by any one container instance.

[0015] According to another aspect of an embodiment of the present disclosure, a scheduling device for a container instance is provided, including: an acquisition module, configured to acquire first information, the first information including each type of resource currently remaining for each virtual machine node in a plurality of virtual machine nodes; acquire second information, the second information including each type of resource currently occupied by each container instance running on each virtual machine node in the plurality of virtual machine nodes; and an execution module, configured to perform scheduling according to the first information and the second information, including: scheduling a first group of container instances running on a first group of virtual machine nodes whose currently remaining at least one type of resource is less than a first threshold to corresponding target virtual machine nodes, so that each type of resource remaining for the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than a second threshold, and the second threshold is not less than the first threshold.

[0016] According to another aspect of an embodiment of the present disclosure, a scheduling device for a container instance is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method described in any one of the above embodiments based on instructions stored in the memory.

[0017] According to another aspect of an embodiment of the present disclosure, a scheduling system for a container instance is provided, comprising: the scheduling device for a container instance as described in any one of the above embodiments; and the multiple virtual machine nodes.

[0018] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, comprising computer program instructions, wherein when the computer program instructions are executed by a processor, the method described in any one of the above embodiments is implemented.

[0019] According to another aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0020] In the disclosed embodiment, scheduling is performed based on the acquired first information and second information, so that when the remaining amount of at least one type of resource of the first group of virtual machine nodes is less than the first threshold, the first group of container instances running on the first group of virtual machine nodes are automatically rescheduled to the corresponding target virtual machine nodes, and it is ensured that after the rescheduling, the remaining amount of each type of resource of the first group of virtual machine nodes and the corresponding target virtual machine nodes is increased to be no less than the second threshold. In this way, the container instances can be guaranteed to run normally under high business load through flexible and dynamic rescheduling without configuring the virtual machine nodes with enough resources. In this way, the waste of resources of virtual machine nodes can be reduced.

[0021] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 is a flowchart of a method for scheduling a container instance according to some embodiments of the present disclosure;

[0024] Figure 2 is a schematic diagram of the structure of a scheduling device for a container instance according to some embodiments of the present disclosure;

[0025] Figure 3 is a schematic diagram of the structure of a scheduling device for a container instance according to other embodiments of the present disclosure;

[0026] Figure 4 It is a structural diagram of a scheduling system for container instances according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0028] The relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0029] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0030] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0031] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0032] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0033] Figure 1 It is a flowchart of a method for scheduling container instances according to some embodiments of the present disclosure.

[0034] like Figure 1 As shown, the method for scheduling a container instance includes steps 102 to 106.

[0035] In step 102, first information is obtained. Here, the first information includes each type of resource currently remaining in each of the multiple virtual machine nodes.

[0036] The virtual machine node can be deployed on a physical machine node and has at least one type of resource among multiple types of resources such as central processing unit (CPU) resources, memory resources, and hard disk storage resources possessed by the physical machine node.

[0037] One or more container instances can run on each VM node. Multiple VM nodes can form a VM cluster.

[0038] As some implementations, the first information may be obtained from a virtual machine node management platform. For example, the virtual machine node management platform may monitor each type of resource remaining in each virtual machine node in real time.

[0039] As some implementations, resource utilization can be used to represent each type of resource currently remaining in a virtual machine node. The smaller the current remaining amount of a certain type of resource in a virtual machine node, the higher the current resource utilization rate of the resource; the larger the current remaining amount of a certain type of resource in a virtual machine node, the lower the current resource utilization rate of the resource.

[0040] In step 104, second information is obtained. Here, the second information includes each type of resource currently occupied by each container instance running on each virtual machine node in the plurality of virtual machine nodes.

[0041] A container instance can include one or more containers. When a container instance runs on a virtual machine node, it occupies various resources of the virtual machine node to carry corresponding services.

[0042] It can be understood that the higher the business load of the container instance, the more resources of the virtual machine node are occupied; the lower the business load of the container instance, the fewer resources of the virtual machine node are occupied.

[0043] As some implementations, a monitoring plug-in is installed on each virtual machine node, and the monitoring plug-in can be configured to monitor in real time each type of resource occupied by each container instance running on the virtual machine node. The second information can be obtained from the monitoring plug-in installed on each virtual machine node.

[0044] In step 106, scheduling is performed according to the first information and the second information.

[0045] The executed scheduling includes: scheduling a first group of container instances running on a first group of virtual machine nodes whose remaining at least one type of resources is less than a first threshold to corresponding target virtual machine nodes, so that each type of resource remaining on the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than a second threshold.

[0046] Here, the second threshold value is not less than the first threshold value. For example, the second threshold value may be equal to the first threshold value. For another example, the second threshold value may be greater than the first threshold value.

[0047] The first group of virtual machine nodes may include one or more virtual machine nodes among the multiple virtual machine nodes. For example, each virtual machine node among the multiple virtual machine nodes whose remaining at least one type of resource is less than a first threshold value may be determined as the first group of virtual machine nodes according to the first information.

[0048] The first group of container instances includes at least one container instance running on each virtual machine node in the first group of virtual machine nodes. For example, at least one container instance running on the virtual machine node can be determined as the first group of container instances based on the second information.

[0049] For the convenience of explanation, the above scheduling is referred to as scheduling performed according to the first scheduling strategy in the following text.

[0050] At least one type of resource currently remaining in a certain virtual machine node is less than a first threshold, which means that the business load of the container instance running on the virtual machine node is very high and the remaining amount of at least one type of resource in the virtual machine node is very small, that is, the resource utilization rate of at least one type of resource is very high.

[0051] In this case, at least one container instance running on this virtual machine node is scheduled to the corresponding target virtual machine node (i.e., other virtual machine nodes among the multiple virtual machine nodes) so that each type of resource remaining in the target virtual machine node corresponding to the first group of virtual machine nodes and at least one container instance is not less than the second threshold.

[0052] That is, after scheduling is performed according to the first scheduling strategy, the remaining amount of each type of resource of each virtual machine node in the first group of virtual machine nodes is increased to no less than the second threshold, and the remaining amount of each type of resource of the target virtual machine node corresponding to the first group of container instances is no less than the second threshold. That is, after scheduling is performed according to the first scheduling strategy, the resource utilization rate of each virtual machine node in the first group of virtual machine nodes is reduced.

[0053] It should be understood that the target virtual machine nodes corresponding to different container instances in the first group of container instances may be the same or different.

[0054] It should also be understood that the first thresholds corresponding to different types of resources of the same virtual machine node may be different, and the first thresholds corresponding to the same type of resources of different virtual machine nodes may be the same or different. Similarly, the second thresholds corresponding to different types of resources of the same virtual machine node may be different, and the second thresholds corresponding to the same type of resources of different virtual machine nodes may be the same or different. That is, a certain type of resource of a certain virtual machine node may have a corresponding first threshold and second threshold.

[0055] In the above embodiment, scheduling is performed based on the acquired first information and second information, so that when the remaining amount of at least one type of resource of the first group of virtual machine nodes is less than the first threshold, the first group of container instances running on the first group of virtual machine nodes are automatically rescheduled to the corresponding target virtual machine nodes, and it is ensured that after the rescheduling, the remaining amount of each type of resource of the first group of virtual machine nodes and the corresponding target virtual machine nodes is increased to be no less than the second threshold. In this way, the container instance can be guaranteed to run normally under high business load through flexible and dynamic rescheduling without configuring the virtual machine node with enough resources. In this way, the waste of resources of the virtual machine node can be reduced.

[0056] The following further describes the method for scheduling container instances according to an embodiment of the present disclosure.

[0057] In some embodiments, the first group of container instances includes the container instance that occupies the most resources and runs on each virtual machine node in the first group of virtual machine nodes. In this way, the number of container instances that need to be rescheduled can be reduced as much as possible while the container instances are flexibly and dynamically rescheduled, thereby reducing processing pressure.

[0058] In some embodiments, the second threshold is greater than the first threshold.

[0059] In these embodiments, the following scheduling may also be performed according to the first information and the second information.

[0060] That is, when the number of virtual machine nodes in the second group is greater than a preset number, the second group of container instances running on the third group of virtual machine nodes are scheduled to the corresponding target virtual machine nodes, so that each type of remaining resources of the target virtual machine nodes corresponding to the third group of virtual machine nodes and the second group of container instances are not less than the second threshold.

[0061] Here, each type of resource currently remaining in each virtual machine node in the second group of virtual machine nodes is not less than the first threshold and at least one type of resource is less than the second threshold.

[0062] The second group of virtual machine nodes may include one or more virtual machine nodes in the plurality of virtual machine nodes. For example, based on the first information, each virtual machine node in the plurality of virtual machine nodes whose remaining resources of each type are not less than the first threshold and whose at least one type of resource is less than the second threshold may be determined as the second group of virtual machine nodes.

[0063] The third group of virtual machine nodes includes at least one virtual machine node in the second group of virtual machine nodes. For example, the third group of virtual machine nodes may include one virtual machine node in the second group of virtual machine nodes. For another example, the third group of virtual machine nodes may include each virtual machine node in the second group of virtual machine nodes. For another example, the third group of virtual machine nodes may include multiple virtual machine nodes in step 102.

[0064] The second group of container instances includes at least one container instance running on each virtual machine node in the third group of virtual machine nodes. For example, at least one container instance running on the virtual machine node can be determined as the second group of container instances based on the second information.

[0065] For the convenience of explanation, the above scheduling will be referred to as scheduling performed according to the second scheduling strategy in the following text.

[0066] The remaining amount of each type of resource of a certain virtual machine node is not less than the first threshold, and at least one type of resource is less than the second threshold, which means that the service load of the container instance running on the virtual machine node is lower than the service load of the container instance running on the first group of virtual machine nodes, but is still relatively high. That is, the remaining amount of at least one type of resource of the virtual machine node is less than the second threshold, that is, the resource utilization rate of at least one type of resource is high.

[0067] The number of the second group of virtual machine nodes is greater than the preset number, which indicates that the business loads of the container instances running on more of the multiple virtual machine nodes are relatively high, that is, the multiple virtual machine nodes may have a global load imbalance at this time. In this case, the second group of container instances running on the third group of virtual machine nodes are scheduled to the corresponding target virtual machine nodes, so that each type of remaining resources of the target virtual machine nodes corresponding to the third group of virtual machine nodes and the second group of container instances are not less than the second threshold.

[0068] That is, after scheduling is performed according to the second scheduling strategy, the remaining amount of each type of resource of at least one virtual machine node in the second group of virtual machine nodes increases to no less than the second threshold, and the remaining amount of each type of resource of the target virtual machine node corresponding to the second group of container instances is also no less than the second threshold.

[0069] In other words, after scheduling is performed according to the second scheduling strategy, the number of virtual machine nodes with higher resource utilization is reduced.

[0070] It should be understood that, similar to the first group of container instances, the target virtual machine nodes corresponding to different container instances in the second group of container instances may be the same or different.

[0071] In the above embodiment, scheduling is performed based on the first information and the second information obtained, so that when the number of the second group of virtual machine nodes whose remaining amount of at least one type of resource is less than the second threshold is large, the second group of container instances running on the third group of virtual machine nodes are rescheduled to the corresponding target virtual machine nodes, and it is ensured that after rescheduling, the remaining amount of each type of resource of the third group of virtual machine nodes and the corresponding target virtual machine nodes is not less than the second threshold. In this way, the number of the second group of virtual machine nodes with higher resource utilization can be reduced through flexible and dynamic rescheduling. In this way, the phenomenon of global load imbalance of multiple virtual machine nodes can be alleviated.

[0072] In some embodiments, the third group of virtual machine nodes includes the second group of virtual machine nodes. That is, the third group of virtual machine nodes includes each virtual machine node in the second group of virtual machine nodes.

[0073] In this way, scheduling is performed according to the second scheduling strategy, which can eliminate the number of the second group of virtual machine nodes with higher resource utilization among the multiple virtual machine nodes. In this way, the phenomenon of global load imbalance of the multiple virtual machine nodes can be further alleviated.

[0074] In some embodiments, the second group of container instances includes each container instance running on each virtual machine node in the plurality of virtual machine nodes. That is, in this manner, each global container instance can be rescheduled when the global load of the plurality of virtual machine nodes is unbalanced. In the process of rescheduling each global container instance, each container instance can be scheduled to the optimal target virtual machine node, which is conducive to fundamentally solving the problem of global load imbalance of the plurality of virtual machine nodes.

[0075] In some embodiments, when each type of resource currently remaining on the virtual machine node is not less than the second threshold, there is no need to schedule the container instance running on the virtual machine node.

[0076] The remaining resources of each type on the virtual machine node are not less than the second threshold, which indicates that the business load of the container instance running on the virtual machine node is relatively low and the resource utilization of the virtual machine node is low. In this case, it is not necessary to schedule the container instance running on the virtual machine node. In this way, invalid scheduling can be reduced and processing pressure can be alleviated.

[0077] In some embodiments, when the number of the second group of virtual machine nodes is not greater than a preset number, there is no need to schedule the container instances running on the virtual machine nodes.

[0078] The number of VM nodes in the second group is not greater than the preset number, which indicates that the global load of multiple VM nodes is relatively balanced. In this case, it is not necessary to schedule the container instances running on the VM nodes. In this way, invalid scheduling can be reduced and processing pressure can be alleviated.

[0079] Some implementations of scheduling the first group of container instances and the second group of container instances to corresponding target virtual machine nodes are described below.

[0080] In some implementations, each container instance in the first group of container instances may be sequentially scheduled to a corresponding target virtual machine node. In other implementations, each container instance in the second group of container instances may be sequentially scheduled to a corresponding target virtual machine node.

[0081] In these implementations, each container instance is scheduled to the corresponding target virtual machine node in turn, rather than being scheduled to the corresponding target virtual machine node as a whole at once. In this way, each container instance can be scheduled to the optimal target virtual machine node for the container instance, which is conducive to achieving global load balancing.

[0082] In some embodiments, each container instance in the first group of container instances and the second group of container instances can be scheduled to the corresponding target virtual machine node in the following manner.

[0083] First, a fourth group of virtual machine nodes may be determined. The fourth group of virtual machine nodes may include one or more candidate virtual machine nodes from the plurality of virtual machine nodes. It should be understood that the fourth group of virtual machine nodes corresponding to different container instances may be different.

[0084] Then, the evaluation value of each virtual machine node in the fourth group of virtual machine nodes can be determined. The evaluation value is positively correlated with each type of resource currently remaining in the virtual machine node.

[0085] For example, the evaluation value and the virtual machine node may be negatively correlated with the current resource utilization of each type of resource. In these examples, the evaluation value S of the virtual machine node j in the fourth group of virtual machine nodes may be calculated according to the following formula: j :

[0086]

[0087] Where t represents the type of resource. Indicates the current priority coefficient of the t-type resource of virtual machine node j, represents the current resource utilization of the t-type resources of the virtual machine node j, and m represents the number of virtual machine nodes in the fourth group.

[0088] The current priority coefficient of the t-type resource of the virtual machine node j may be negatively correlated with the current resource utilization of the t-type resource. For example, the priority coefficient of each type of resource of the virtual machine node j is 1 by default; if the current resource utilization of a certain type of resource of the virtual machine node j is between 60% and 70%, the priority coefficient of the resource of this type may be adjusted to 0.6; if the current resource utilization of a certain type of resource of the virtual machine node j is between 70% and 80%, the priority coefficient of the resource of this type may be adjusted to 0.3; if the current resource utilization of a certain type of resource of the virtual machine node j is between 80% and 90%, the priority coefficient of the resource of this type may be adjusted to 0.1; if the current resource utilization of a certain type of resource of the virtual machine node j is greater than 90%, the priority coefficient of the resource of this type may be adjusted to 0.

[0089] Finally, the virtual machine node with the highest evaluation value in the fourth group of virtual machine nodes can be determined as the target virtual machine node corresponding to the container instance. For example, the target virtual machine node corresponding to the determined container instance can be sent to the container management platform, and the container management platform completes the corresponding scheduling.

[0090] In the above embodiment, each container instance in the first group of container instances and the second group of container instances is sequentially scheduled to the target virtual machine node with the highest evaluation value, so that the optimal match between the container instance and the target virtual machine node to be scheduled can be achieved.

[0091] In some embodiments, each type of resource currently remaining in each virtual machine node in the fourth group of virtual machine nodes is not less than the resource of that type currently occupied by the container instance.

[0092] For example, in the process of determining the fourth group of virtual machine nodes, the current remaining amount of each type of resource of each virtual machine node in the multiple virtual machine nodes in step 102 can be compared with the resources currently occupied by the container instance, and each virtual machine node whose current remaining amount of each type of resource is not less than the amount of that type of resource currently occupied by the container instance is determined as the fourth group of virtual machine nodes.

[0093] In this way, there is no need to determine the evaluation value of each virtual machine node among multiple virtual machine nodes, thereby reducing processing pressure. In addition, it can also avoid that a virtual machine node whose remaining at least one type of resource is less than the resource currently occupied by the container instance is determined as the target virtual machine node, avoiding the failure of container instance scheduling and improving the success rate of scheduling.

[0094] Figure 2 It is a structural diagram of a scheduling device for a container instance according to some embodiments of the present disclosure.

[0095] like Figure 2 As shown, the scheduling device 200 for a container instance includes an acquisition module 201 and an execution module 202 .

[0096] The acquisition module 201 may be configured to acquire first information and second information.

[0097] The first information may include each type of resource currently remaining in each of the multiple virtual machine nodes. The second information may include each type of resource currently occupied by each container instance running on each of the multiple virtual machine nodes.

[0098] The execution module 202 may be configured to perform scheduling according to the first information and the second information, including: scheduling the first group of container instances running on the first group of virtual machine nodes whose remaining at least one type of resource is less than the first threshold to the corresponding target virtual machine nodes, so that each type of resource remaining on the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than the second threshold. The second threshold is not less than the first threshold.

[0099] It should be understood that the container instance scheduling device 200 may also include various other modules to execute the container instance scheduling method of any of the above embodiments.

[0100] Figure 3 It is a structural schematic diagram of a scheduling device for a container instance according to some other embodiments of the present disclosure.

[0101] like Figure 3 As shown, the scheduling device 300 for a container instance includes a memory 301 and a processor 302 coupled to the memory 301 , and the processor 302 is configured to execute the scheduling method for a container instance of any one of the above embodiments based on instructions stored in the memory 301 .

[0102] The memory 301 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.

[0103] The scheduling device 300 of the container instance may also include an input / output interface 303, a network interface 304, a storage interface 305, etc. These interfaces 303, 304, 305, and the memory 301 and the processor 302 may be connected, for example, via a bus 306. The input / output interface 303 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 304 provides a connection interface for various networked devices. The storage interface 305 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0104] Figure 4 It is a structural diagram of a scheduling system for container instances according to some embodiments of the present disclosure.

[0105] like Figure 4 As shown, the scheduling system of the container instance includes the scheduling device of the container instance of any one of the above embodiments (for example, the scheduling device 200 / 300 of the container instance) and multiple virtual machine nodes 401 ( Figure 4 3 are schematically shown in FIG. 3 ). See Figure 4 , one or more container instances 402 can run on each virtual machine node 401.

[0106] The embodiments of the present disclosure further provide a computer-readable storage medium, comprising computer program instructions, which implement the method of any one of the above embodiments when executed by a processor.

[0107] The embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the method of any one of the above embodiments when executed by a processor.

[0108] So far, various embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0109] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device and system embodiments, since they basically correspond to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0110] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0111] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions specified in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0114] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A method for scheduling a container instance, comprising: Acquire first information, where the first information includes each type of resource currently remaining in each of the multiple virtual machine nodes; Acquire second information, where the second information includes each type of resource currently occupied by each container instance running on each virtual machine node among the multiple virtual machine nodes; and Performing scheduling according to the first information and the second information includes: Scheduling a first group of container instances running on a first group of virtual machine nodes whose remaining at least one type of resource is less than a first threshold to corresponding target virtual machine nodes, so that each type of resource remaining on the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than a second threshold, and the second threshold is greater than the first threshold; and When the number of the second group of virtual machine nodes is greater than the preset number, the second group of container instances running on the third group of virtual machine nodes are scheduled to the corresponding target virtual machine nodes, so that each type of remaining resources of the third group of virtual machine nodes and the target virtual machine nodes corresponding to the second group of container instances are not less than the second threshold value. Among them, each type of resource currently remaining in each virtual machine node in the second group of virtual machine nodes is not less than the first threshold and at least one type of resource is less than the second threshold, and the third group of virtual machine nodes includes at least one virtual machine node in the second group of virtual machine nodes.

2. The method according to claim 1, wherein: The third group of virtual machine nodes includes the second group of virtual machine nodes.

3. The method according to claim 1, wherein: Scheduling the second group of container instances running on the third group of virtual machine nodes to the corresponding target virtual machine nodes includes: Schedule each container instance in the second group of container instances to the corresponding target virtual machine node in sequence.

4. The method according to claim 3, wherein: The second set of container instances includes each container instance running on each virtual machine node in the plurality of virtual machine nodes.

5. The method according to any one of claims 1 to 4, wherein: Scheduling the first group of container instances running on the first group of virtual machine nodes whose remaining at least one type of resources is less than a first threshold to the corresponding target virtual machine nodes includes: Schedule each container instance in the first group of container instances to the corresponding target virtual machine node in sequence.

6. The method according to claim 5, wherein: The target virtual machine node corresponding to any one of the first group of container instances is determined in the following manner: Determining an evaluation value of each virtual machine node in the fourth group of virtual machine nodes, the evaluation value being positively correlated with each type of currently remaining resources; and The virtual machine node with the highest evaluation value in the fourth group of virtual machine nodes is determined as the target virtual machine node corresponding to any one container instance.

7. The method according to claim 6, wherein: Each type of resource currently remaining in each virtual machine node in the fourth group of virtual machine nodes is not less than the resource of the type currently occupied by any one of the container instances.

8. A scheduling device for a container instance, comprising: An acquisition module is configured to acquire first information, wherein the first information includes each type of resource currently remaining in each of the multiple virtual machine nodes; Acquire second information, where the second information includes each type of resource currently occupied by each container instance running on each virtual machine node among the multiple virtual machine nodes; and An execution module is configured to perform scheduling according to the first information and the second information, including: scheduling a first group of container instances running on a first group of virtual machine nodes whose remaining at least one type of resource is less than a first threshold to a corresponding target virtual machine node, so that each type of resource remaining on the first group of virtual machine nodes and the target virtual machine nodes corresponding to the first group of container instances is not less than a second threshold, and the second threshold is greater than the first threshold; and when the number of the second group of virtual machine nodes is greater than a preset number, scheduling a second group of container instances running on a third group of virtual machine nodes to the corresponding target virtual machine nodes, so that each type of resource remaining on the third group of virtual machine nodes and the target virtual machine nodes corresponding to the second group of container instances is not less than the second threshold, Among them, each type of resource currently remaining in each virtual machine node in the second group of virtual machine nodes is not less than the first threshold and at least one type of resource is less than the second threshold, and the third group of virtual machine nodes includes at least one virtual machine node in the second group of virtual machine nodes.

9. A scheduling device for a container instance, comprising: Memory; as well as A processor coupled to the memory is configured to execute the method according to any one of claims 1 to 7 based on instructions stored in the memory.

10. A container instance scheduling system, comprising: The scheduling device for the container instance as claimed in claim 8 or 9; as well as The multiple virtual machine nodes.

11. A computer-readable storage medium comprising computer program instructions, wherein: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

12. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.