Container scheduling method and related device

By referencing service level and maximum resource parameter values ​​in container scheduling, the resource usage of high-priority containers is limited, and resources are over-allocated to low-priority containers, thus solving the node overload problem and ensuring service reliability and resource utilization.

WO2026066393A1PCT designated stage Publication Date: 2026-04-02HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-06-28
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing technologies do not limit the value of limits in container scheduling, which may lead to node overload when business traffic surges or program failures occur, affecting service quality and reliability.

Method used

During container scheduling, the service level and maximum resource parameter value of the container are taken into account. The resources that can be allocated to the target server are limited to be partially or fully allocated to high-priority containers. The super-allocation mechanism is used to allocate more resources to low-priority containers to ensure the normal operation of high-priority services and the utilization rate of server resources.

Benefits of technology

This effectively avoids node overload, ensures service reliability and the normal operation of high-priority services, and improves server resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025105123_02042026_PF_FP_ABST
    Figure CN2025105123_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a container scheduling method and a related device, which are used for improving the reliability of services. The method is applied to a cloud platform, wherein the cloud platform is used for managing a server cluster. The method comprises: acquiring a first request, wherein the first request comprises at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container, and the at least one service level comprises a high-priority service; and on the basis of the at least one maximum resource parameter value and the at least one service level, scheduling the at least one container to a target server, wherein the target server is included in a server cluster, and at most some or all allocable resources of the target server are allocated for use by all containers of high-priority services that are scheduled by the target server.
Need to check novelty before this filing date? Find Prior Art

Description

A container scheduling method and related device

[0001] The present application claims priority to the Chinese patent application No. 202411375351.0, filed on September 29, 2024, and entitled "A container scheduling method and related device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the field of cloud computing, and in particular to a container scheduling method and related device. BACKGROUND

[0003] Kubernetes is an open source, used to manage the containerized applications on the hosts in the cloud platform, as a general base for container orchestration. Its abbreviation is K8s, which provides a mechanism for application deployment, planning, updating and maintenance.

[0004] In the related technical solution, the resource definition of the container is set, including the requests and limits used by the container. Among them, the requests represent the minimum resources that the container can obtain, and the limits represent the maximum resources that the container can obtain when the node is idle. When scheduling the container, the container scheduling request sent to the cloud platform includes the resource definition of each container, so that the cloud server allocates resources for the container accordingly.

[0005] In this technical solution, the resource range used by the container is defined based on the requests and limits, and the value of the limits is not limited. When the business traffic surges or the program fails, the resource occupation of the container may increase sharply due to the too large limits of the container, which may cause the node to be overloaded, and thus the quality of service is reduced or even the service is unavailable. SUMMARY

[0006] The present application provides a container scheduling method and related device, when at least one container is scheduled to a target server, the service level of the at least one container and the maximum resource parameter value of the at least one container are referred to. It is limited that part or all of the allocable resources of the target server are allocated to all high-priority containers scheduled by the target server. Then, even if the resources used by the high-priority service container reach the maximum resource parameter value, there are still available resources on the target server, or the needs of the high-priority service container can still be met, and the node will not be overloaded, so the quality of service will not be affected, and the reliability of the service is guaranteed.

[0007] In a first aspect, the application provides a container scheduling method. The method is applied to a cloud platform. The cloud platform manages a server cluster. The cloud platform obtains a first request. The first request includes at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container. The at least one service level includes a high-priority service. The maximum resource parameter value refers to a maximum resource value that can be used by the container when the server resource is sufficient. Each container has its own service level. The first request is used to request the cloud platform to schedule the at least one container. The cloud platform schedules the at least one container to a target server according to the at least one maximum resource parameter value of the at least one container and the at least one service level. The target server is included in the server cluster and is part or all of the servers in the server cluster. Moreover, the cloud platform allocates at most part or all of the allocable resources of the target server to all high-priority service containers scheduled by the target server. The allocable resources of the target server refer to all resources available to the containers. All high-priority service containers scheduled by the target server include high-priority service containers already scheduled on the target server before the first request is obtained and high-priority service containers indicated by the first request. In the application, the types of idle resources include computing resources, storage resources, etc., which are not limited here.

[0008] In the application, when scheduling the at least one container to the target server, the service level of the at least one container and the maximum resource parameter value of the at least one container are referred to. At most part or all of the allocable resources of the target server are allocated to all high-priority containers scheduled by the target server. Therefore, even if the resources used by the high-priority service containers reach the maximum resource parameter value, there are still available resources on the target server or the needs of the high-priority service containers can still be met, which will not cause node overload and will not affect the service quality, thereby ensuring the reliability of the service.

[0009] In some optional implementation forms of the first aspect, the at least one service level further includes a low-priority service. This means that the first request actually includes information of multiple containers, and each container includes a maximum resource parameter value and a service level. The multiple containers requested to be scheduled by the first request include containers providing high-priority services and containers providing low-priority services. The target server can allocate the difference between the target server allocatable resources and the sum of the maximum resource parameter values of all containers providing high-priority services scheduled by the target server to the containers providing low-priority services scheduled by the target server N times, where N>1. The containers providing low-priority services scheduled by the target server include containers providing low-priority services already scheduled by the target server before the first request is obtained and containers providing low-priority services indicated by the first request. N>1 means that the actual resources allocated to the containers providing low-priority services are greater than the remaining allocatable resources of the target server. The remaining allocatable resources of the target server are the difference between the target server allocatable resources and the sum of the maximum resource parameter values of all containers providing high-priority services scheduled by the target server, and can also be referred to as allocatable resources of the containers providing low-priority services.

[0010] In this application, the target server allocates the remaining allocatable resources of the target server N times to all containers providing low-priority services scheduled by the target server, so that more containers can be scheduled on the target server, and more low-priority services can be provided, thereby further improving the resource utilization of the target server.

[0011] In some optional implementation forms of the first aspect, part or all of the target server allocatable resources is x% of the target server allocatable resources, where x is in the range of (0, 100]. The cloud platform further obtains an actual resource utilization of the server cluster and a resource utilization threshold. At least one of x or N is adjusted according to the actual resource utilization and the resource utilization threshold.

[0012] In this application, x and N are adjustable, which means that the resources allocated to the containers providing high-priority services and the containers providing low-priority services by the target server are adjustable. This means that the resources available to containers of different priorities can be dynamically adjusted based on actual conditions, so that the resource utilization of the target server is higher.

[0013] In some optional implementation forms of the first aspect, the resource utilization threshold comprises a resource utilization lower threshold and a resource utilization upper threshold. The resource utilization lower threshold can be referred to as a low water line of the resource utilization, representing a minimum value or a value slightly greater than the minimum value of the acceptable resource utilization. That is, if the actual resource utilization is lower than the threshold, it means that the resource utilization of the current server cluster is too low. The resource utilization upper threshold can be referred to as a high water line of the resource utilization, representing a maximum value or a value slightly less than the maximum value of the acceptable resource utilization. That is, if the actual resource utilization is higher than the threshold, it means that the resource utilization of the current server cluster is too high. The cloud platform adjusts at least one of x or N based on the actual resource utilization and the resource utilization threshold. Specifically, it comprises: in the case that the actual resource utilization is less than or equal to the resource utilization lower threshold, increasing N and / or decreasing x. In the case that the actual resource utilization is greater than or equal to the resource utilization upper threshold, decreasing N and / or increasing x. In addition, it should be noted that the actual resource utilization of the server cluster can be determined by the actual resource utilization of each server in the server cluster. The resource utilization threshold is not only the resource utilization threshold of the server cluster, but also the resource utilization threshold of each server in the server cluster, that is, each server in the server cluster adopts a unified resource utilization threshold. In this application, the cloud platform adjusts x and / or N based on the actual resource utilization and the resource utilization threshold, so that the resources allocated by the server cluster to the high-priority containers and the low-priority containers are more in line with the actual application needs, and the realizability of the technical solution of the application is improved.

[0014] In some optional implementation forms of the first aspect, there are multiple possibilities in the case that the actual resource utilization is less than or equal to the resource utilization lower threshold. It can be that the actual resource utilization of a part of the servers in the server cluster is less than the resource utilization lower threshold, and the resource utilization threshold of another part of the servers is between the resource utilization lower threshold and the resource utilization upper threshold. It can also be that the server cluster comprises both servers whose actual resource utilization is less than the resource utilization lower threshold and servers whose resource utilization threshold is greater than the resource utilization upper threshold. In some optional implementation forms of the first aspect, the resource utilization threshold comprises a resource utilization lower threshold and a resource utilization upper threshold. The cloud platform adjusts at least one of x or N based on the actual resource utilization and the resource utilization threshold, and can further comprise: in the case that the actual resource utilization is greater than the resource utilization lower threshold, if the resources used by the containers of all the high-priority services invoked by the server cluster are x% of the distributable resources of the server, then x is increased, so that the server cluster can accommodate a larger number of high-priority containers.

[0015] In the present application, the cloud platform can also increase x, so that the server cluster can accommodate a larger number of high-priority containers, and thus provide a larger number of high-priority services.

[0016] In some optional implementations of the first aspect, the first request further includes at least one minimum resource parameter value of the at least one container. The minimum resource parameter value represents the minimum amount of resources required by the container, or in other words, the minimum amount of resources that can be used by the container. After obtaining the first request, the cloud platform can modify the minimum resource parameter value based on the different priorities of the containers. Specifically, the minimum resource parameter value of the container of the high-priority service in the at least one container is modified to the maximum resource parameter value of the container of the high-priority service. That is, for the modified container of the high-priority service, the minimum resource parameter value is equal to the maximum resource parameter value. The cloud platform also modifies the minimum resource parameter value of the container of the low-priority service in the at least one container to be much smaller than the maximum resource parameter value of the container of the low-priority service. That is, for the modified container of the low-priority service, the minimum resource parameter value is much smaller than the maximum resource parameter value.

[0017] In the present application, for the modified container of the high-priority service, the minimum resource parameter value is equal to the maximum resource parameter value, which means that the container can use the maximum resource parameter value, thereby ensuring the reliability of the high-priority service. For the modified container of the low-priority service, the minimum resource parameter value is much smaller than the maximum resource parameter value. Since the kubenetes native scheduling strategy limits the allocatable resources of the server cluster to be greater than or equal to the sum of the minimum resource parameter values of all containers, the modification allows the server cluster to allocate more containers.

[0018] In some optional implementations of the first aspect, before obtaining the first request, the cloud platform further obtains a second request, and the second request includes at least one initial maximum resource parameter value of the at least one container and at least one service level. That is, the second request can be understood as an initial request obtained by the cloud platform for requesting to schedule containers. If the service of the at least one container includes the same target service as the historical service, and the initial maximum resource parameter value of the target service included in the second request is not included in the resource parameter range of the historical service, it means that the initial maximum resource parameter value of the target service in the second request is unreasonable, and the cloud platform sends a first message indicating to reject to create the at least one container corresponding to the second request.

[0019] In the present application, for the unreasonable request, the cloud platform will reject to create the at least one container corresponding to the request, thereby ensuring that the creation of the container meets the needs of the actual application, and improving the practicality of the technical solution of the present application.

[0020] In some possible implementation of the first aspect, the first message further includes a maximum resource recommendation value of the target container, the target container being configured to provide the target service. That is, the cloud platform, when rejecting the creation of the target container, further recommends a maximum resource parameter value of the target container. Then, the maximum resource parameter value of the target container in the first request is the maximum resource recommendation value. For the initiator of the first request (i.e., the terminal), that is, based on the first message, the initial maximum resource parameter value of the target container in the second request is modified, and the first request is sent to the cloud platform again.

[0021] In some possible implementation of the first aspect, the cloud platform, after sending the first message, further sends a second message, the second message including a maximum resource recommendation value of the target container, the target container being configured to provide the target service. That is, the cloud platform, after rejecting the creation of the target container, further recommends a maximum resource parameter value of the target container. Then, the maximum resource parameter value of the target container in the first request is the maximum resource recommendation value. For the initiator of the first request (i.e., the terminal), that is, based on the second message, the initial maximum resource parameter value of the target container in the second request is modified, and the first request is sent to the cloud platform again.

[0022] In the present application, the cloud platform, when rejecting the creation of the at least one container corresponding to the second request, or after that, can send a maximum resource recommendation value of the target container, so that the terminal modifies the initial maximum resource parameter value of the target container based on the maximum resource recommendation value to obtain the first request. The cloud platform can send the maximum resource recommendation value of the target container in various possible ways, which enriches the implementation modes and application scenarios of the technical solutions of the present application. In addition, carrying the maximum resource recommendation value of the target container in the first message can also reduce the number of messages transmitted between the cloud platform and the terminal, and reduce the consumption of communication resources.

[0023] In a second aspect, the present application provides a cloud platform configured to manage a server cluster, the cloud platform comprising:

[0024] a transceiving unit configured to obtain a first request, the first request including at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container, the at least one service level including a high-priority service.

[0025] a processing unit configured to schedule the at least one container to a target server according to the maximum resource parameter value of the at least one container and the at least one service level, the target server being included in the server cluster, and at most part or all of allocable resources of the target server being allocated to containers of all high-priority services scheduled by the target server.

[0026] The cloud platform is configured to implement the method of the first aspect or any possible implementation of the first aspect.

[0027] In a third aspect, the present application provides a computing device, comprising a processor and a memory. The processor of the computing device is configured to execute instructions stored in the memory, so that the computing device implements the method according to the first aspect or any possible implementation of the first aspect.

[0028] In a fourth aspect, the present application provides a computing device cluster, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster implements the method according to the first aspect or any possible implementation of the first aspect.

[0029] In a fifth aspect, the present application provides a computer program product comprising instructions which, when executed by a computing device cluster, cause the computing device cluster to implement the method according to the first aspect or any possible implementation of the first aspect.

[0030] In a sixth aspect, the present application provides a computer-readable storage medium, having computer program instructions stored therein, which, when executed by a computing device cluster, cause the computing device cluster to implement the method according to the first aspect or any possible implementation of the first aspect.

[0031] The beneficial effects of any of the second aspect to the sixth aspect are similar to those of the first aspect or any possible implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0032] FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;

[0033] FIG. 2 is a schematic diagram of a container scheduling method according to an embodiment of the present application;

[0034] FIG. 3 is another schematic diagram of a container scheduling method according to an embodiment of the present application;

[0035] FIG. 4 is a schematic diagram of a cloud platform according to an embodiment of the present application;

[0036] FIG. 5 is another schematic diagram of a container scheduling method according to an embodiment of the present application;

[0037] FIG. 6 is another schematic diagram of a cloud platform according to an embodiment of the present application;

[0038] FIG. 7 is a schematic diagram of a computing device according to an embodiment of the present application;

[0039] FIG. 8 is a schematic diagram of a computing device cluster according to an embodiment of the present application;

[0040] FIG. 9 is another structural diagram of a computing device cluster provided by an embodiment of the present application. DETAILED DESCRIPTION

[0041] The present application provides a container scheduling method and related equipment. When at least one container is scheduled to a target server, the service level of the at least one container and the maximum resource parameter value of the at least one container are referred to. It is limited that at most x% of the allocable resources of the target server is allocated to all high-priority containers scheduled by the target server, and x is (0, 100]. That is, the containers of high-priority services use part or all of the allocable resources of the target server. Then, even if the resources used by the containers of high-priority services reach their maximum resource parameter values, there are still available resources on the target server, or the needs of the containers of high-priority services can still be met, which will not cause node overload and will not affect the quality of service, thereby ensuring the reliability of the service.

[0042] The embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art can know that, as technology develops and new scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0043] The terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is only a distinguishing way used in the description of the embodiments of the present application to describe the objects with the same attributes. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product, or equipment including a series of units does not have to be limited to those units, but can include other units not clearly listed or inherent to these processes, methods, products, or equipment. In addition, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0044] First, the specific terms and related concepts that may be involved in the embodiments of the present application are described.

[0045] 1) kubernetes, kubelet, pod:

[0046] Kubernetes, referred to as K8s, is an open source system for managing containerized applications on multiple hosts in a cloud platform. It provides mechanisms for application deployment, planning, updating and maintenance, and is committed to making the deployment of containerized applications simple and efficient. In the container scheduling method provided by the embodiments of the present application, the kubernetes system is used to manage the containers scheduled on the server in the cloud platform.

[0047] Kubelet is an important component in the kubernetes cluster, running on each server, responsible for managing containers and pods on the server. Kubelet ensures that the pod runs as expected by monitoring the state of the container, communicating with the application programming interface server (API server), and other ways. And it can also start, stop or restart the container on the server as needed. In addition, kubelet can also monitor the state of the server and report the state of the server to the API server.

[0048] Pod is the smallest unit of running deployment applications or services in the kubernetes cluster, which can support multiple containers. That is, multiple containers can share network addresses and file systems in a pod, and services can be provided through inter-process communication and file sharing.

[0049] 2) Webhook:

[0050] Webhook is a way to add or change web entries through custom callback functions. Among them, the callback function can be saved, modified and managed by third-party users or developers related to the original website or application.

[0051] 3) Cloud platform and infrastructure:

[0052] The cloud platform is used to manage the infrastructure of a cloud vendor, the infrastructure comprises a plurality of cloud data centers arranged in different regions, each region is provided with at least one cloud data center, the cloud platform can provide an interface, such as a configuration page or an API, related to cloud computing services for tenants to access the cloud services, the tenants can log in to the cloud management platform through a pre-registered account and password, and after successful login, select and purchase cloud services provided by the cloud data center in the predetermined region, such as object storage services, virtual machine services, container services or other known cloud services.

[0053] 4) tenant:

[0054] The top-level object for managing cloud services and / or cloud resources, the tenant registers a tenant account and sets a tenant password on the cloud platform through a local client (such as a browser), the local client remotely logs in to the cloud platform through the tenant account and sets the tenant password, and the cloud platform provides a configuration interface or API for the tenant to configure and use cloud services, wherein the cloud services are provided by the infrastructure managed by the cloud management platform as described above.

[0055] Next, refer to FIG. 1, which is a system architecture diagram provided by an embodiment of the present application.

[0056] As shown in FIG. 1, the tenant logs in to the cloud platform 30 through the client 10 via the Internet 20 through an account and password registered on the cloud platform 30. The cloud platform 30 manages the infrastructure, which includes a plurality of data centers arranged in different regions, for example, region 1 shown in FIG. 1 includes cloud data center 1 and cloud data center 2, and region 2 includes cloud data center 3 and cloud data center 4. Each cloud data center is provided with a plurality of servers, and the servers run business instances (including at least one of virtual machines, containers, and dedicated hosts).

[0057] In an embodiment of the present application, a container management service is deployed in the business instance, and after the tenant purchases the cloud service through the client 10 on the cloud platform 30, the tenant sends a call request to the cloud platform 30, the call request is used to request the cloud service from the cloud platform 30. The specific content of the cloud service includes container calling, container management and other services, which will be described later, and will not be described here.

[0058] It should be noted that the container scheduling method provided by the present application can be applied in various scenarios, including public cloud scenarios, private cloud scenarios, edge cloud scenarios, etc., and can be used as a container deployment and scheduling platform product, deployed in a customer room or a cloud computing vendor room, and provided as a cloud service. The cloud service can be sold based on the subscription mode shown above, or can be sold in the form of a software license, which is not limited here.

[0059] Please refer to FIG. 2, which is a flowchart of a container scheduling method provided by an embodiment of the present application, including the following steps.

[0060] 201. A first request is obtained, the first request including at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container, the at least one service level including a high-priority service.

[0061] The container scheduling method provided by the embodiment of the present application is applied to a cloud platform, the cloud platform being used to manage a server cluster, and the cloud platform managing containers scheduled on the server cluster based on a container management system. The server cluster includes at least one server. The cloud platform establishes a communication connection with a terminal, and receives a first request sent by the terminal, the first request being used to request the cloud platform to schedule at least one container corresponding to the first request through the server cluster managed by the cloud platform. The first request is used to request the cloud platform to deploy at least one service corresponding to at least one container through the server cluster managed by the cloud platform.

[0062] For example, taking the container management system as a kubernetes system, the first request can include one or more pods, and each pod includes a group of containers. One pod includes one service level and maximum resource parameter values of each container in the group of containers. The service level of each container is defined by the pod in which the container is located. In other words, the information carried by each pod includes one service level and a group of maximum resource parameter values. The service level is the service level corresponding to each container in the pod. The group of maximum resource parameter values are the maximum resource parameter values of the group of containers. In addition, each pod corresponds to a service, which means that the group of containers included in each pod is used to provide a service corresponding to the pod in which the group of containers is located. In other words, the service is deployed on the group of containers included in the pod. Therefore, the service level of one pod is the service level of each container included in the pod. The group of containers included in one pod can be one or more containers.

[0063] For example, assuming that a target pod includes one container 1, the target pod includes one service level and one maximum resource parameter value. The service level is the service level of the container 1, and the maximum resource parameter value is the maximum resource parameter value of the container 1.

[0064] For example, assuming that a target pod includes two containers, namely container 1 and container 2, the target pod includes one service level and two maximum resource parameter values. The service level can be understood as the service level of the container 1 and the container 2. The two maximum resource parameter values are the maximum resource parameter value of the container 1 and the maximum resource parameter value of the container 2, respectively.

[0065] It should be noted that in the scheme in which a pod includes multiple containers, the maximum resource parameter value of each container can be the same or different, which is not limited here. In general, the first request includes at least one maximum resource parameter value of at least one container and at least one service level corresponding to at least one container. Each container corresponds to a maximum resource parameter value and a service level. The maximum resource parameter value refers to the maximum resource value that the container can use when the server resource is sufficient, and the service level indicates the level of service provided by the container. Among the at least one container indicated by the first request, there is a container that provides high-priority service, which can be referred to as a high-priority container.

[0066] Among them, the resource mentioned in the embodiment of the application can be a computing resource or a storage resource. The computing resource includes various types of processor resources, such as central processing unit (CPU), graphics processing unit (GPU), neural processing unit (NPU), etc. Similarly, there are many possibilities for storage resources, including memory, hard disk, disk, optical disk, cloud storage, etc., which are not limited here.

[0067] 202. According to at least one maximum resource parameter value and at least one service level, at least one container is scheduled to a target server, the target server is included in the server cluster, and at most part or all of the allocable resources of the target server are allocated to all high-priority service containers scheduled by the target server.

[0068] After the cloud platform obtains the first request, the parameters included in the first request are comprehensively considered, and a target server for scheduling at least one container is determined from the server cluster managed by the cloud platform. The parameters included in the first request refer to the maximum resource parameter value and the service level included in the first request. Among them, the target server can be part or all of the servers in the server cluster.

[0069] Specifically, the cloud platform determines the container with high-priority service from at least one container based on the first request, that is, determines the high-priority container. In combination with the first request, the maximum resource parameter value of the high-priority container is obtained. The cloud platform obtains the resource usage of the server cluster, and in combination with the maximum resource parameter value of the high-priority container, at most part or all of the allocable resources of the target server are allocated to all high-priority service containers scheduled by the target server. In other words, at most x% of the allocable resources of the target server are allocated to all high-priority service containers scheduled by the target server, and x is (0, 100].

[0070] The value of x can be set based on prior experience, manually set, or determined based on the resource size and historical scheduling strategy of the server cluster, which is not limited here.

[0071] The target server schedules all high-priority containers of the service, including the high-priority container indicated by the first request and the high-priority container already scheduled on the target server before the first request. That is, for all high-priority containers scheduled on the target server, the resources allocated by the cloud platform satisfy: high-priority container allocated resources≤x% of target server allocatable resources…(1)

[0072] The target server allocatable resources refer to all resources available to the containers on the target server. x% of the target server allocatable resources can also be understood as the resources that the target server can allocate to the high-priority container, referred to as high-priority container allocatable resources. Therefore, the foregoing inequality (1) can also be expressed as: high-priority container allocated resources≤x% of target server allocatable resources=high-priority container allocatable resources…(2)

[0073] In addition, the high-priority container allocated resources is actually the sum of the maximum resource parameter values of the high-priority container. Therefore, the foregoing inequality (1) can also be expressed as: sum(maximum resource parameter values of high-priority container)≤x% of target server allocatable resources…(3)

[0074] Since the maximum resource parameter value of the container represents the maximum resource value that the container can use when the server resources are sufficient, it can be known from the foregoing inequality that the target server scheduled by the cloud platform can meet the running requirements of the high-priority container and ensure the normal operation of the high-priority container.

[0075] The foregoing resource usage of the server cluster includes the current resource utilization of each server in the server cluster, the allocatable resources of each server, and other information, which is not limited here. In some optional embodiments, when the cloud platform selects the target server from the server cluster, it can preferentially select a server with low current resource utilization in the cluster, or preferentially select a server with high allocatable resources in the cluster, or select in other ways that can balance the resource usage of each server in the cluster, which is not limited here.

[0076] In the embodiments of the present application, when the at least one container is scheduled to the target server, the service level of the at least one container and the maximum resource parameter value of the at least one container are referred to. It is defined that at most part or all of the allocable resources of the target server are allocated to use by all high-priority containers scheduled by the target server. Then, even if the resources used by the high-priority service container reach the maximum resource parameter value, in the scheme of at most part of the resources of the target server being allocated to use by all high-priority containers scheduled by the target server, there are still available resources on the target server. In the scheme of all resources of the target server being allocated to use by all high-priority containers scheduled by the target server, the target server can still meet the needs of the high-priority service container and will not cause node overload, so as not to affect the service quality, and the reliability of the service is ensured.

[0077] In some optional embodiments, the at least one service level included in the first request further includes a low-priority service, and a container providing the low-priority service can be referred to as a low-priority container. In the embodiments of the present application, the high and low of the service priority can be set based on actual application, can be preset, or can be manually specified, and the specific implementation is not limited herein.

[0078] For the low-priority container, the cloud platform sets an oversubscription mechanism, and the resources allocated to the low-priority container by the cloud platform are more than the allocable resources of the low-priority container. That is, for all low-priority containers scheduled by the target server, the resources allocated to the low-priority containers by the cloud platform satisfy: low-priority container allocable resources × N ≥ low-priority container allocated resources…(4)

[0079] It can be understood that the allocable resources of the target server are to be allocated to the high-priority containers and the low-priority containers scheduled by the target server. Then, the low-priority container allocable resources in the foregoing inequality (4) are actually the difference between the allocable resources of the target server and the allocated resources of all high-priority containers scheduled by the target server. Then, the foregoing inequality (4) can also be expressed as: (target server allocable resources - high-priority container allocated resources) × N ≥ low-priority container allocated resources…(5)

[0080] Among them, the difference between the allocable resources of the target server and the allocated resources of the high-priority container can also be referred to as the remaining allocable resources of the target server.

[0081] In addition, the low-priority container allocated resources are actually the sum of the maximum resource parameter values of the low-priority containers. Then, the foregoing inequality (5) can also be expressed as: (target server allocable resources - high-priority container allocated resources) × N ≥ sum(maximum resource parameter values of low-priority containers)…(6)

[0082] According to the foregoing inequality (1) and inequality (3), the high-priority container has allocated resources, which is actually the sum of the maximum resource parameter values of all high-priority service containers scheduled by the target server. Then, the oversubscription mechanism of the cloud platform can also be understood as follows: the difference between the allocable resources of the target server and the sum of the maximum resource parameter values of all high-priority service containers scheduled by the target server is oversubscribed N times to be used by all low-priority service containers scheduled by the target server.

[0083] It should be noted that N>1. The value of N can be set based on prior experience, manually set, or determined based on the resource scale and historical scheduling strategy of the server cluster, and the specific value is not limited here. In addition, all low-priority service containers scheduled by the target server include low-priority service containers that have been scheduled on the target server before the first request is obtained and low-priority service containers indicated by the first request.

[0084] It should be noted that the allocable resources of the target server are all resources available to the containers on the target server, which means that the allocable resources of the target server are greater than or equal to the allocated resources of all containers scheduled on the target server.

[0085] It can be understood that the resources used by the container in the process of providing services are not fixed, but dynamically change within the range of the maximum resource parameter value. Then, in the scenario of multiple low-priority containers, the time when the resources used by the multiple low-priority containers reach the maximum resource parameter value can be different, that is, the resources used by the multiple low-priority containers at the same time can include those that reach the maximum resource parameter value and those that do not reach the maximum resource parameter value. Then, oversubscribing the remaining allocable resources of the target server to the low-priority containers will not seriously affect the services run by the low-priority containers. In addition, the quality of service required by the low-priority service itself is not high, and oversubscribing the remaining allocable resources of the target server to the low-priority containers will not seriously affect the user experience. In addition, the oversubscription mechanism can be regarded as an extension of the allocable resources of the target server, so that the target server can create and schedule a larger number of low-priority containers.

[0086] In the embodiment of the application, the remaining allocable resources of the target server are oversubscribed N times to all low-priority service containers scheduled by the target server, so that more low-priority services can be issued on the target server, thereby further improving the resource utilization of the target server.

[0087] In some alternative embodiments, the resources allocated by the server cluster to the high-priority containers and the low-priority containers are dynamically adjustable, that is, after the step 202, the cloud platform can monitor the resource usage of the server cluster and adjust the allocation of the allocable resources of the server cluster based on the resource usage.

[0088] Specifically, the cloud platform obtains the actual resource utilization of the server cluster and the resource utilization threshold, and adjusts x and / or N based on the actual resource utilization and the resource utilization threshold. Wherein,

[0089] The actual resource utilization = the actually occupied resources of the server cluster / the allocable resources of the server cluster x 100%

[0090] The actual resource utilization reflects the actual resource usage of the server cluster. The resource utilization threshold represents the limit of the acceptable resource utilization.

[0091] It can be understood that adjusting x means adjusting the maximum resources that can be used by the high-priority containers. The larger x is, the more high-priority services can be scheduled to the server. The smaller x is, the fewer high-priority services can be scheduled to the server.

[0092] Similarly, adjusting N means adjusting the resources allocated to the low-priority containers. The larger N is, the more resources are allocated to the low-priority containers, and the more low-priority services can be scheduled to the server. The smaller N is, the fewer low-priority services can be scheduled to the server.

[0093] Further, the resource utilization threshold includes a minimum resource utilization threshold and a maximum resource utilization threshold. The minimum resource utilization threshold represents the minimum value or slightly larger than the minimum value of the acceptable resource utilization. The maximum resource utilization threshold represents the maximum value or slightly smaller than the maximum value of the acceptable resource utilization. The cloud platform adjusts x or N in different ways according to different possibilities of the actual resource utilization and the resource utilization threshold, which are described as follows:

[0094] In some alternative embodiments, if the actual resource utilization is less than or equal to the minimum resource utilization threshold, it means that the actual resource utilization is too low. The cloud platform adjusts the actual resource utilization by adjusting x and / or N. The cloud platform can increase N to schedule more low-priority services, and / or decrease x to reduce the allocable resources of the high-priority services, so as to increase the allocable resources of the low-priority containers and improve the resource utilization.

[0095] In some alternative embodiments, if the actual resource utilization is greater than or equal to the highest resource utilization threshold, indicating that the actual resource utilization is too high, the cloud platform can decrease N to reduce the allocatable resources for low-priority services, and / or increase x to schedule a larger number of high-priority services, avoiding the continuous issuance of low-priority services, so that the resource utilization is further improved.

[0096] In some alternative embodiments, the actual resource utilization threshold is less than the lowest resource utilization threshold. For example, the actual resource utilization threshold can be less than the lowest resource utilization threshold, and the resource utilization threshold of the other servers is between the lowest resource utilization threshold and the highest resource utilization threshold. Alternatively, the server cluster can include servers with actual resource utilization less than the lowest resource utilization threshold and servers with resource utilization threshold greater than the highest resource utilization threshold.

[0097] For example, assume that the server cluster includes server A and server B, both of which include 10 CPUs, and the current x is 80 and N is 3. There are 10 high-priority services scheduled on the two servers, of which the high-priority containers scheduled on server A use 8 CPUs, and the high-priority services scheduled on server B use 2 CPUs. Then, for server A, the low-priority containers can only use 2 CPUs, and the actual over-allocation is 6 CPUs. For server B, the low-priority containers can use 8 CPUs, and the actual over-allocation is 24 CPUs. In this scheme, the actual resource utilization of server A is too low, and the actual resource utilization of server B is too high, resulting in unbalanced load of the server cluster. Then, the cloud platform decreases x, for example, from 80 to 50. Then, after the cloud platform re-schedules, the high-priority containers scheduled on server A and server B both use 5 CPUs, balancing the load of the server cluster.

[0098] In some alternative embodiments, if the actual resource utilization is greater than the lowest resource utilization threshold, and the resource used by the high-priority service in at least one container is x% of the idle resources of the target server, it indicates that in the case of reasonable resource utilization, x% of the idle resources of the target server can be fully filled with high-priority services. Then, the cloud platform can increase x so that the target server can accommodate a larger number of high-priority services.

[0099] It can be understood that the ultimate purpose of the cloud platform adjusting x and / or N is to adjust the resources allocated by the server to high-priority services and low-priority services, so that the actual resource utilization of the server is within a reasonable range. The reasonable range includes [the lowest resource utilization threshold, the highest resource utilization threshold]. Before the actual resource utilization of the server is within the reasonable range, it can be adjusted multiple times.

[0100] In the embodiments of the present application, the cloud platform increases x, so that the server cluster can accommodate a larger number of high-priority containers, and thus can provide a larger number of high-priority services.

[0101] In general, in the embodiments of the present application, x and N are adjustable, which means that the resources allocated by the target server to the high-priority containers and the low-priority containers are adjustable, and thus the resources available to the containers of different priorities can be dynamically adjusted based on actual conditions, so that the resource utilization of the target server is higher. In addition, the cloud platform adjusts x and / or N based on the actual resource utilization and the resource utilization threshold, so that the resources allocated by the server cluster to the high-priority containers and the low-priority containers are more in line with the needs of actual applications, and the realizability of the technical solution of the present application is improved.

[0102] In some optional embodiments, in addition to the maximum resource parameter value of the container, the first request can also include at least one minimum resource parameter value of at least one container. That is, for each container, the first request includes the maximum resource parameter value, the minimum resource parameter value and the service level of the container. The minimum resource parameter value represents the minimum amount of resources required by the container, or the minimum amount of resources available to the container.

[0103] Further, the first request includes one or more pods, and each pod includes a group of containers. In addition to the service level and the maximum resource parameter value of each container in the group of containers as described above, a pod also includes the minimum resource parameter value of each container.

[0104] For example, assuming that a target pod includes two containers, container 1 and container 2, the target pod includes a service level, two maximum resource parameter values and two minimum resource parameter values. The service level can be understood as the service level of container 1 and container 2. The two maximum resource parameter values are the maximum resource parameter value of container 1 and the maximum resource parameter value of container 2, respectively. The two minimum resource parameter values are the minimum resource parameter value of container 1 and the minimum resource parameter value of container 2, respectively.

[0105] In the scheme in which the first request also includes the minimum resource parameter value, after obtaining the first request, the cloud platform can also modify the value of the minimum resource parameter value according to the service level of each container. Specifically, the cloud platform modifies the minimum resource parameter value of the high-priority service container in the at least one container to the maximum resource parameter value of the high-priority service container. The minimum resource parameter value of the low-priority service container in the at least one container is modified to be much smaller than the maximum resource parameter value of the low-priority service container.

[0106] For example, the maximum resource parameter value can be denoted as limits, and the minimum resource parameter value can be denoted as requests. Then, for the high-priority container, the cloud platform modifies the result as requests = limits. For the low-priority container, the cloud platform modifies the result as requests « limits. Optionally, for the low-priority container, requests can be set to 0.

[0107] In the embodiments of the present application, for the modified high-priority service container, the minimum resource parameter value is equal to the maximum resource parameter value, which means that the container can use the maximum resource parameter value, thereby ensuring the reliability of the high-priority service. For the modified low-priority service container, the minimum resource parameter value is much smaller than the maximum resource parameter value. Since the kubenetes native scheduling strategy limits the allocatable resources of the server cluster to be greater than or equal to the sum of the minimum resource parameter values of all containers, based on the modification, the server cluster can allocate more containers.

[0108] In general, the first request can include the minimum resource parameter value or not. For the former scheme, it can be understood that the first request includes two resource parameters, and after the cloud platform obtains the first request, the minimum resource parameter value is modified based on the above description and in reference to the service level of the container. For the latter scheme, it can be understood that the first request includes only one resource parameter.

[0109] For example, in the scheme in which the first request includes two resource parameters (i.e., the maximum resource parameter value and the minimum resource parameter value), the maximum resource parameter value can be denoted as limits, and the minimum resource parameter value can be denoted as requests.

[0110] For example, in the scheme in which the first request includes one resource parameter (i.e., the maximum resource parameter value), the maximum resource parameter value can be denoted as size. Then, for the high-priority container, the first request includes size, which is equivalent to modifying requests in the first request to be the same as limits. For the low-priority container, the first request includes size, which is equivalent to modifying requests in the first request to be much smaller than limits.

[0111] In some optional embodiments, the first request can be an initial request or a modified request for at least one container. The initial request referred to herein means that the services provided by the at least one container indicated by the first request are all first-time applied services. The modified request means that there is a service identical to a historical service in the services provided by the at least one container indicated by the first request, and each maximum resource parameter value indicated by the modified request is within a reasonable range.

[0112] It can be understood that the cloud platform can set a service admission mechanism. For a service that is applied for for the first time, a target server is determined based on the resource definition (including the maximum resource parameter value, or including the maximum resource parameter value and the minimum resource parameter value) carried in the request and the service level. For a service that has been applied for, the maximum resource parameter value in the resource definition is analyzed, and for a service with a maximum resource parameter value within a reasonable range, a target server is determined. For an unreasonable one, it is rejected to be scheduled. The following will be described in detail in combination with the schematic diagram. Please refer to FIG. 3, which is a flowchart of a container scheduling method provided by an embodiment of the present application.

[0113] 301. The terminal sends a second request to the cloud platform, the second request including at least one initial maximum resource parameter value of at least one container and at least one service level.

[0114] 302. The cloud platform sends a first message to the terminal, the first message indicating rejection of creation of at least one container corresponding to the second request.

[0115] The cloud platform analyzes the initial maximum resource parameter value of each container. If the service of at least one container includes the same target service as the historical service, and the initial maximum resource parameter value of the target service included in the second request is not included in the resource parameter range of the historical service, it indicates that the maximum resource parameter value of the target service of the second request is not within a reasonable range, and then the cloud platform rejects to create a container for the service. The cloud platform sends a first message to the terminal, the first message indicating rejection of creation of at least one container corresponding to the second request.

[0116] The resource parameter range of the historical service refers to the resource range used by the historical service when running. It can reflect the fluctuation range of the resources used by the historical service in the running process.

[0117] For example, it is assumed that the initial maximum resource parameter value of container A indicated by the second request is 1 CPU, and container A provides a voice service. In the historical service provided by the cloud platform, the resource parameter range used by the voice service is [5, 10]. Then, the maximum resource parameter value included in the second request is too small, and the cloud platform rejects to schedule container A.

[0118] In the embodiment of the present application, for an unreasonable request, the cloud platform rejects to create a container corresponding to the request, so as to ensure that the creation of the container meets the needs of the actual application, and improves the practicability of the technical scheme of the present application.

[0119] In some optional embodiments, the cloud platform carries the maximum resource recommendation value of the target container in the first request sent to the terminal, the target container being used to provide the target service. The terminal modifies the maximum resource parameter value of the target container in the second request based on the maximum resource recommendation value of the target container, to obtain the first request.

[0120] In some optional embodiments, after step 302, the cloud platform performs step 303. The cloud platform sends a second message to the terminal, the second message including the maximum resource recommendation value of the target container. The terminal modifies the maximum resource parameter value of the target container in the second request based on the maximum resource recommendation value of the target container, to obtain the first request.

[0121] Whether the maximum resource recommendation value of the target container is carried in the first message or the second message, the terminal can obtain the parameter value, and the maximum resource recommendation value of the target container is included in the resource parameter range of the historical service.

[0122] 304. The terminal sends a first request to the cloud platform, the maximum resource parameter value of the target container in the first request being the maximum resource recommendation value.

[0123] After the cloud platform obtains the maximum resource recommendation value of the target container, the terminal sends a first request to the cloud platform, the maximum resource parameter value of the target container in the first request being the maximum resource recommendation value. This means that in the first request, the maximum resource parameter value of each container is within the reasonable range corresponding to the container.

[0124] 305. The cloud platform schedules at least one container to the target server.

[0125] Step 305 is similar to step 202 in the embodiment shown in FIG. 2, and details are shown in the foregoing, which will not be described here.

[0126] In the embodiments of the present application, the cloud platform can send the maximum resource recommendation value of the target container at the same time or after rejecting the creation of at least one container corresponding to the second request, so that the terminal modifies the initial maximum resource parameter value of the target container based on the maximum resource recommendation value, to obtain the first request. The cloud platform can send the maximum resource recommendation value of the target container in various ways, which enriches the implementation modes and application scenarios of the technical solutions of the present application. In addition, carrying the maximum resource recommendation value of the target container in the first message can also reduce the number of messages transmitted between the cloud platform and the terminal, and reduce the consumption of communication resources.

[0127] In some optional embodiments, the cloud platform provided by the embodiments of the present application can adopt the structure shown in FIG. 4. Please refer to FIG. 4, which is a structure diagram of the cloud platform provided by the embodiments of the present application.

[0128] As shown in FIG. 4, the cloud platform 400 includes a service admission module 401, a container modification module 402, a scheduling module 403, a data collection module 404, and a parameter recommendation module 405.

[0129] The service admission module 401 is configured to implement the service admission mechanism described above, including analyzing the maximum resource parameter value of the container indicated by the container scheduling request. If the service provided by the container is the same as the historical service, and the maximum resource parameter value is not within the resource parameter range of the historical service, the container is rejected, and the recommended maximum resource value is returned. The service admission module 401 is also configured to estimate the resource utilization based on the historical data and the maximum resource parameter value. For a container scheduling request with an estimated resource utilization less than the minimum threshold of resource utilization, the container is rejected, and the recommended maximum resource parameter value is returned.

[0130] The container modification module 402 is configured to modify the minimum resource parameter value according to different service levels in the case where the container scheduling request includes the maximum resource parameter value and the minimum resource parameter value. For a high-priority service container, the maximum resource parameter value is the same as the minimum resource parameter value. For a low-priority service container, the minimum resource parameter value is much smaller than the maximum resource parameter value.

[0131] The scheduling module 403 is configured to set a scheduling strategy for the resources, thereby determining the target server for scheduling the container. The scheduling strategy includes setting the high-priority service to use x% of the idle resources of the target server. The scheduling strategy can also include setting the difference between the idle resources of the target server and the sum of the maximum resource parameter value of the high-priority service, and N times the over-allocated resources for the low-priority container.

[0132] The data collection module 404 is configured to collect historical data, network data, resource utilization threshold values, etc. The historical data includes the maximum resource parameter value of the historical service, the historical resource utilization of at least one server managed by the cloud platform, etc. The network data includes the resource utilization of the current server, etc. The resource utilization threshold values include the minimum threshold of resource utilization, the maximum threshold of resource utilization, etc. The data collected by the data collection module 404 can provide a reference for the service admission module 401 to determine whether to reject the container scheduling request, and can also provide a reference for the values of x and N output by the parameter recommendation module 405.

[0133] The parameter recommendation module 405 is configured to adjust the values of x and / or N according to the actual resource utilization and the resource utilization threshold values, and feed back to the scheduling module 403, so that the scheduling module 403 adjusts the scheduling strategy.

[0134] It should be noted that the service admission module 401 and the container modification module 402 are optional modules. In a cloud platform including the service admission module 401, the cloud platform is provided with the service admission mechanism described above. The cloud platform analyzes the maximum resource parameter value of each container of the request based on the module. In a cloud platform not including the service admission module 401, the cloud platform directly schedules the container to the server after obtaining the container scheduling request. In a cloud platform including the container modification module 402, the container scheduling request includes the maximum resource parameter value and the minimum resource parameter value. In a cloud platform not including the container modification module 402, the container scheduling request does not include the minimum resource parameter value, or in other words, the container scheduling request includes one resource parameter.

[0135] In addition, the container scheduling request of the embodiment shown in FIG. 4 can be the first request or the second request in the foregoing embodiments.

[0136] Based on the cloud platform shown in FIG. 4, an example of the container scheduling method provided by the embodiments of the present application is shown in FIG. 5. Please refer to FIG. 5, which is a flowchart of the container scheduling method provided by the embodiments of the present application.

[0137] As shown in FIG. 5, the service operator or user operates the terminal to trigger the terminal to send a container scheduling request to the cloud platform. This process can also be understood as issuing a container to the kubernetes cluster managed by the cloud platform, or requesting the cloud platform to issue a service based on the kubernetes system. In the subsequent description, the former scenario is taken as an example.

[0138] The kube-APIserver component in the cloud platform receives the container scheduling request and calls the webhook of the service admission module to analyze the maximum resource parameter value included in the container scheduling request. If the service to which the container scheduling request is directed is the first time to be issued, the service admission module directly passes the container scheduling request. If the service to which the container scheduling request is directed includes a target service same as a historical service, the service admission module obtains the utilization rate of the historical service and analyzes whether the value of the maximum resource parameter value of the target service is reasonable. If it is reasonable, the container scheduling request is passed; if it is not reasonable, the container scheduling request is rejected, including rejecting to issue a container for the target service. The service admission module also returns a recommended maximum resource value. The terminal modifies the maximum resource parameter value of the target service in the container scheduling request based on the recommended maximum resource value to obtain a modified container scheduling request. The modified container scheduling request is sent to the cloud platform again. The service admission module analyzes again until the issuance is allowed. The maximum resource parameter value of each container in the container scheduling request allowed to be issued is within a reasonable range.

[0139] After the container scheduling request is passed, the kube-APIserver component can also call the webhook of the container modification module, and the container modification module modifies the resource definition of the container scheduling request based on the service level included in the container scheduling request. Specifically, the minimum resource parameter value of the high-priority container is modified to be the same as the maximum resource parameter value, and the minimum resource parameter value of the low-priority container is modified to be much smaller than the maximum resource parameter value. The kube-APIserver component saves the modified resource definition (that is, the container information to be scheduled) in the etcd.

[0140] The parameter recommendation module obtains the resource utilization information from the data collection module, including the actual resource utilization of the server and the resource utilization threshold, etc., to determine the values of x and N. The values of x and N are sent to the scheduling module.

[0141] The scheduling module obtains the container information to be scheduled and the values of x and N, so as to select a target server for scheduling the container from at least one server managed by the cloud platform. The scheduling information of the container is sent to the kube-APIserver component. The kube-APIserver component saves the scheduling information of the container in the etcd by accessing the etcd. The scheduling information of the container includes the scheduling strategy of the container corresponding to the current container scheduling request.

[0142] The kubelet on the target server obtains the container information to be scheduled from the etcd through the kube-APIserver component, and schedules the container on the target server. The scheduled container is the container indicated by the modified container scheduling request in the embodiment shown in FIG. 5.

[0143] Next, the related device provided by the embodiments of the present application is described.

[0144] Please refer to FIG. 6, which is a structural schematic diagram of a cloud platform provided by an embodiment of the present application. In the embodiments of the present application, the cloud platform is used to manage a server cluster, and the cloud platform manages the containers scheduled on the server cluster based on a container management system. As shown in FIG. 6, the cloud platform 600 includes a transceiver unit 601 and a processing unit 602.

[0145] In some optional embodiments, the transceiver unit 601 is configured to obtain a first request, the first request including at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container, the at least one service level including a high-priority service.

[0146] The processing unit 602 is configured to schedule the at least one container to a target server according to the at least one maximum resource parameter value and the at least one service level, the target server being included in the server cluster, and at most a part or all of the allocable resources of the target server being allocated to all high-priority service containers scheduled by the target server.

[0147] In some optional embodiments, the at least one service level further comprises a low-priority service. A difference between the allocable resources of the target server and a sum of the maximum resource parameter values of all high-priority service containers scheduled by the target server is N times allocated to all low-priority service containers scheduled by the target server, N > 1.

[0148] In some optional embodiments, the part or all of the allocable resources of the target server is x% of the allocable resources of the target server, x being (0, 100].

[0149] The transceiver 601 is further configured to acquire an actual resource utilization rate of the server cluster and a resource utilization rate threshold.

[0150] The processing unit 602 is further configured to adjust at least one of x or N according to the actual resource utilization rate and the resource utilization rate threshold.

[0151] In some optional embodiments, the resource utilization rate threshold comprises a lowest resource utilization rate threshold and a highest resource utilization rate threshold.

[0152] The processing unit 602 is specifically configured to: if the actual resource utilization rate is less than or equal to the lowest resource utilization rate threshold, increase N and / or decrease x; and / or if the actual resource utilization rate is greater than or equal to the highest resource utilization rate threshold, decrease N and / or increase x.

[0153] In some optional embodiments, the resource utilization rate threshold comprises a lowest resource utilization rate threshold and a highest resource utilization rate threshold.

[0154] The processing unit 602 is specifically configured to: if the actual resource utilization rate is greater than the lowest resource utilization rate threshold and the resources used by all high-priority service containers invoked by the server cluster are x% of the allocable resources of the server, increase x.

[0155] In some optional embodiments, the first request further comprises at least one minimum resource parameter value of the at least one container.

[0156] The processing unit 602 is further configured to: modify the minimum resource parameter value of a high-priority service container in the at least one container to the maximum resource parameter value of the high-priority service container; and modify the minimum resource parameter value of a low-priority service container in the at least one container to a value much smaller than the maximum resource parameter value of the low-priority service container.

[0157] In some optional embodiments, the transceiver 601 is further configured to: obtain a second request, the second request comprising at least one initial maximum resource parameter value of at least one container and a service level of the at least one container; and if the service of the at least one container comprises a same target service as the historical service and the initial maximum resource parameter value of the target service comprised in the second request is not contained in the resource parameter range of the historical service, send a first message, the first message indicating rejection of creation of the at least one container corresponding to the second request.

[0158] In some optional embodiments, the first message further comprises a maximum resource recommended value of a target container, the target container being configured to provide a target service. The maximum resource parameter value of the target container in the first request is the maximum resource recommended value.

[0159] In some optional embodiments, the transceiver 601 is further configured to: send a second message, the second message comprising a maximum resource recommended value of a target container, the target container being configured to provide a target service. The maximum resource parameter value of the target container in the first request is the maximum resource recommended value.

[0160] The transceiver 601 and the processing unit 602 can be implemented by software or by hardware. For example, the implementation of the processing unit 602 is described below.

[0161] As an example of a software functional unit, the processing unit 602 can include code running on a computing instance. The computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Further, the computing instance can be one or more. For example, the processing unit 602 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers running the code can be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers running the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers in close geographical proximity. Generally, one region can include multiple AZs.

[0162] Likewise, the plurality of hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Among them, usually one VPC is set in one region, and communication between two VPCs in the same region and between VPCs in different regions needs to set a communication gateway in each VPC to realize the interconnection between VPCs through the communication gateway.

[0163] As an example of a hardware functional unit, the processing unit 602 can include at least one computing device, such as a server, etc. Alternatively, the processing unit 602 can also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc. Among them, the above-mentioned PLD can be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0164] The plurality of computing devices included in the processing unit 602 can be distributed in the same region or in different regions. The plurality of computing devices included in the processing unit 602 can be distributed in the same AZ or in different AZs. Likewise, the plurality of computing devices included in the processing unit 602 can be distributed in the same VPC or in multiple VPCs. Among them, the plurality of computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0165] It should be noted that the transceiver unit 601 and the processing unit 602 respectively implement different steps in the container scheduling method to realize all the functions of the data cloud platform 600. The cloud platform 600 is used for the operations performed by the cloud platform in the embodiments shown in FIGS. 1 to 5 to realize the container scheduling method provided by the embodiments of the present application, which will not be described here.

[0166] Referring to FIG. 7, FIG. 7 is a structural schematic diagram of a computing device provided by an embodiment of the present application. The computing device 700 includes a processor 701, a communication interface 702, a bus 703 and a memory 704. The processor 701, the communication interface 702 and the memory 704 communicate with each other through the bus 703, and in actual application, communication can also be realized through wireless transmission and other means, which is not limited here.

[0167] The computing device 700 can be a server or a terminal device, and it should be understood that the number of processors and memories in the computing device 700 is not limited by the present application.

[0168] The processor 701 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP) and the like.

[0169] The communication interface 702 uses a transceiver module such as but not limited to a network interface card, a transceiver, and the like to realize communication between the computing device 700 and other devices or communication networks.

[0170] The bus 703 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus and the like. The bus can be divided into an address bus, a data bus, a control bus and the like. For ease of representation, only one line is shown in FIG. 7, but it does not mean that there is only one bus or only one type of bus. The bus 703 can include a path for transmitting information between various components (for example, the memory 704, the processor 701, the communication interface 702) of the computing device 700.

[0171] The memory 704 can include a volatile memory such as a random access memory (RAM). The memory 704 can also include a non-volatile memory such as a read-only memory (ROM), a flash memory, a mechanical hard disk drive (HDD) or a solid state drive (SSD).

[0172] The executable program code stored in the memory 704 is executed by the processor 701 to implement the functions of the aforementioned transceiving unit 601 and processing unit 602 respectively, thereby implementing the container scheduling method. That is, the memory 704 stores instructions for executing the container scheduling method.

[0173] The embodiments of the present application also provide a computing device cluster, which includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some optional embodiments, the computing device can also be a terminal device, such as a desktop computer, a notebook computer, or a smart phone.

[0174] Please refer to FIG. 8 and FIG. 9, both of which are structural diagrams of the computing device cluster provided by the embodiments of the present application.

[0175] As shown in FIG. 8, the computing device cluster includes at least one computing device 700. The memory 704 in one or more computing devices 700 in the computing device cluster can store the same instructions for executing the container scheduling method provided by the embodiments of the present application.

[0176] In some possible embodiments, the memory 704 in one or more computing devices 700 in the computing device cluster can also respectively store partial instructions for executing the container scheduling method. In other words, the combination of one or more computing devices 704 can collectively execute the instructions for executing the container scheduling method.

[0177] It should be noted that the memories 704 in different computing devices 700 in the computing device cluster can store different instructions, respectively used for executing partial functions of the cloud platform. That is, the instructions stored in the memories 704 in different computing devices 700 can implement the functions of one or more units in the transceiving unit 601 and the processing unit 602.

[0178] In some possible implementations, one or more computing devices in the computing device cluster can be connected through a network. The network can be a wide area network or a local area network, etc. FIG. 9 shows one possible implementation. As shown in FIG. 9, two computing devices 700A and 700B are connected through a network. Specifically, the communication interface in each computing device is connected to the network. In this type of possible implementation, the memory 704 in the computing device 700A stores instructions for executing the functions of the transceiving unit 601. Meanwhile, the memory 704 in the computing device 700B stores instructions for executing the functions of the processing unit 602.

[0179] The connection between the computing device cluster shown in FIG. 9 can be that the processing operation and the operation other than the processing operation are executed separately in the container scheduling method provided in the present application, that is, the function of the transceiving unit 601 is thus executed by the computing device 700A, and the function of the processing unit 602 is executed by the computing device 700B.

[0180] It should be understood that the function of the computing device 700A shown in FIG. 9 can also be completed by a plurality of computing devices 700. Similarly, the function of the computing device 700B can also be completed by a plurality of computing devices 700.

[0181] The present application also provides another computing device cluster. The connection between the computing devices in the computing device cluster can be similar to the connection of the computing device cluster described with reference to FIG. 8 and FIG. 9, which will not be described here.

[0182] The present application also provides a computer program product containing instructions. The computer program product can be a software or program product containing instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to execute the container scheduling method described above.

[0183] The present application also provides a computer readable storage medium. The computer readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium includes instructions that instruct the computing device to execute the container scheduling method described above.

[0184] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0185] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A container dispatching method characterized by comprising: The method is applied to a cloud platform for managing a server cluster, and comprises: obtaining a first request, the first request comprising at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container, the at least one service level comprising a high-priority service; scheduling the at least one container to a target server according to the at least one maximum resource parameter value and the at least one service level, the target server being included in the server cluster, and at most a part or all of allocable resources of the target server being allocated to containers of all high-priority services scheduled by the target server.

2. The method of claim 1, wherein, The at least one service level further comprises a low-priority service. A difference between the allocable resources of the target server and a sum of maximum resource parameter values of all high-priority service containers scheduled by the target server is N times of an over-allocated resource of all low-priority service containers scheduled by the target server, N>1.

3. The method of claim 2, wherein, The part or all of the allocable resources of the target server is x% of the allocable resources of the target server, x being (0, 100]; the method further comprises: obtaining an actual resource utilization rate of the server cluster and a resource utilization rate threshold value; adjusting at least one of the x or the N according to the actual resource utilization rate and the resource utilization rate threshold value.

4. The method of claim 3, wherein, The resource utilization rate threshold value comprises a resource utilization rate minimum threshold value and a resource utilization rate maximum threshold value; adjusting at least one of the x or the N according to the actual resource utilization rate and the resource utilization rate threshold value, comprising: if the actual resource utilization rate is less than or equal to the resource utilization rate minimum threshold value, increasing the N and / or decreasing the x; if the actual resource utilization rate is greater than or equal to the resource utilization rate maximum threshold value, decreasing the N and / or increasing the x.

5. The method according to claim 3 or 4, characterized in that, The resource utilization rate threshold value comprises a resource utilization rate minimum threshold value and a resource utilization rate maximum threshold value; adjusting at least one of the x or the N according to the actual resource utilization rate and the resource utilization rate threshold value, comprising: if the actual resource utilization rate is greater than the resource utilization rate minimum threshold value and resources used by all high-priority service containers invoked by the server cluster are x% of allocable resources of the server cluster, increasing the x.

6. The method according to any one of claims 1 to 5, characterized in that, The first request further comprises at least one minimum resource parameter value of the at least one container; after the obtaining of the first request, the method further comprises: modifying the minimum resource parameter value of a high-priority service container in the at least one container to the maximum resource parameter value of the high-priority service container; modifying the minimum resource parameter value of a low-priority service container in the at least one container to a value much smaller than the maximum resource parameter value of the low-priority service container.

7. The method according to any one of claims 1 to 6, characterized in that, before the obtaining of the first request, the method further comprises: obtaining a second request, the second request comprising at least one initial maximum resource parameter value of the at least one container and the at least one service level; If the service of the at least one container comprises a same target service as a historical service, and an initial maximum resource parameter value of the target service comprised in the second request is not included in a resource parameter range of the historical service, a first message is sent, the first message indicating rejection of creation of the at least one container corresponding to the second request.

8. The method of claim 7, wherein, The first message further comprises a maximum resource recommendation value of a target container for providing the target service. The maximum resource parameter value of the target container in the first request is the maximum resource recommendation value.

9. The method of claim 7, wherein, After the sending of the first message, the method further comprises: sending a second message, the second message comprising a maximum resource recommendation value of a target container for providing the target service; The maximum resource parameter value of the target container in the first request is the maximum resource recommendation value.

10. A cloud platform, characterized by The cloud platform is used for managing a server cluster, and the cloud platform comprises: a transceiving unit configured to obtain a first request, the first request comprising at least one maximum resource parameter value of at least one container and at least one service level corresponding to the at least one container, the at least one service level comprising a high-priority service; a processing unit configured to schedule the at least one container to a target server according to the at least one maximum resource parameter value and the at least one service level, the target server being included in the server cluster, and at most a part or all of allocable resources of the target server being allocated for use by containers of all high-priority services scheduled to the target server.

11. The cloud platform of claim 10, wherein, The at least one service level further comprises a low-priority service. A difference between the allocable resources of the target server and a sum of maximum resource parameter values of the containers of all high-priority services scheduled to the target server is N times of an over-allocated amount for use by containers of all low-priority services scheduled to the target server, N>1.

12. The cloud platform of claim 11, wherein, The part or all of the allocable resources of the target server is x% of the allocable resources of the target server, x being (0, 100]; The transceiving unit is further configured to obtain an actual resource utilization rate of the server cluster and a resource utilization rate threshold value; The processing unit is further configured to adjust at least one of the x or the N according to the actual resource utilization rate and the resource utilization rate threshold value.

13. The cloud platform of claim 12, wherein, The resource utilization rate threshold value comprises a lowest resource utilization rate threshold value and a highest resource utilization rate threshold value; The processing unit is specifically configured to: if the actual resource utilization rate is less than or equal to the lowest resource utilization rate threshold value, increase the N and / or decrease the x; and / or if the actual resource utilization rate is greater than or equal to the highest resource utilization rate threshold value, decrease the N and / or increase the x.

14. The cloud platform of claim 12 or 13, wherein, The resource utilization rate threshold value comprises a lowest resource utilization rate threshold value and a highest resource utilization rate threshold value; The processing unit is specifically configured to, if the actual resource utilization rate is greater than the lowest resource utilization rate threshold value and resources used by all high-priority service containers invoked by the server cluster are x% of allocable resources of the server cluster, increase the x.

15. The cloud platform of any one of claims 10 to 14, wherein, The first request further comprises at least one minimum resource parameter value of the at least one container; The processing unit is further configured to: modify the minimum resource parameter value of a container of high priority service in the at least one container to a maximum resource parameter value of the container of high priority service; modify the minimum resource parameter value of a container of low priority service in the at least one container to a value much less than a maximum resource parameter value of the container of low priority service.

16. The cloud platform of any one of claims 10 to 15, wherein, The transceiving unit is further configured to: obtain a second request, the second request comprising at least one initial maximum resource parameter value of the at least one container and at least one service level; if the service of the at least one container comprises a target service same as a historical service, and the initial maximum resource parameter value of the target service comprised in the second request is not included in a resource parameter range of the historical service, send a first message, the first message indicating rejection of creation of the at least one container corresponding to the second request.

17. The cloud platform of claim 16, wherein, The first message further comprises a maximum resource recommendation value of a target container, the target container being used to provide the target service. The maximum resource parameter value of the target container in the first request is the maximum resource recommendation value.

18. The cloud platform of claim 16, wherein, The transceiving unit is further configured to: send a second message, the second message comprising a maximum resource recommendation value of a target container, the target container being used to provide the target service; The maximum resource parameter value of the target container in the first request is the maximum resource recommendation value.

19. A cluster of computing devices, characterized in that, The at least one computing device comprises a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9.

20. A computer program product comprising instructions, characterized in that, When the instructions are executed by the computing device cluster, the computing device cluster is caused to execute the method according to any one of claims 1 to 9.

21. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer program instructions, when the computer program instructions are executed by the computing device cluster, the computing device cluster is caused to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Container balanced deployment method and device, electronic equipment and storage medium

    CN111666130A

  • Resource allocation method and device, equipment and storage medium

    CN115964166A

  • Resource scheduling method and device, electronic equipment and storage medium

    CN117492977A

  • Low-risk server consolidation

    US20140196027A1