Resource scheduling method and apparatus

WO2026219136A1PCT designated stage Publication Date: 2026-10-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/090176
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-04-14
Filing Date
2026-04-13
Publication Date
2026-10-22

Smart Images

  • Figure CN2026090176_22102026_PF_FP_ABST
    Figure CN2026090176_22102026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a resource scheduling method and apparatus, relating to the technical field of cloud computing. A cloud management platform acquires an instance creation request, and creates a first application instance and a second application instance in a resource pool on the basis of the instance creation request, the instance creation request indicating a dependency relationship between the first application instance and the second application instance. Then, the cloud management platform acquires a first usage amount of a first hardware resource by the first application instance and a second usage amount of a second hardware resource by the second application instance, and schedules the first application instance and the second application instance on the basis of a magnitude relationship between the first usage amount and a first preset value or a magnitude relationship between the second usage amount and a second preset value. Because the instance creation request further carries a dependency relationship between a plurality of application instances, the plurality of application instances are scheduled together, that is, scheduling of the plurality of application instances is considered as a whole, thereby improving running efficiency of a service comprising the plurality of application instances.
Need to check novelty before this filing date? Find Prior Art

Description

A resource scheduling method and apparatus

[0001] This application claims priority to Chinese Patent Application No. 202510466462.0, filed on April 14, 2025, entitled “A Resource Scheduling Method and Apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of cloud computing technology, and in particular to a resource scheduling method and apparatus. Background Technology

[0003] Elastic scheduling refers to dynamically adjusting the allocation and use of resources (computing resources, storage resources, etc.) based on the load and resource requirements of a cloud computing platform. Taking the scheduling of instances deployed in a Kubernetes cluster as an example, if the scheduling is based solely on the relationship between instance A's hardware resource usage and a threshold, only instance A will be scheduled. However, if instance A has collaborative relationships with other instances, scheduling only instance A means that the scheduling of instance A and other instances is considered only in a single way, thus affecting the operational efficiency of services involving both instance A and other instances. Summary of the Invention

[0004] This application provides a resource scheduling method and apparatus to address the problem that when multiple instances have a collaborative relationship, scheduling is performed on only a single instance, meaning that scheduling of the aforementioned multiple instances is only considered in a single way, which in turn affects the operational efficiency of services involving the aforementioned multiple instances.

[0005] Firstly, this application provides a resource scheduling method. This resource scheduling method can be applied to a computer system or to a computing device that supports the implementation of the resource scheduling method in the computer system, such as a server. In one possible example, the resource scheduling method is applied to a cloud management platform, which manages a resource pool for deploying application instances. The resource scheduling method includes: the cloud management platform obtaining an instance creation request, and creating a first application instance and a second application instance in the resource pool according to the instance creation request. Furthermore, the cloud management platform obtains a first usage of a first hardware resource by the first application instance and a second usage of a second hardware resource by the second application instance, and schedules the first application instance and the second application instance according to the relationship between the first usage and a first preset value, or the relationship between the second usage and a second preset value. The instance creation request requests the creation of an application instance with predetermined hardware resource requirements in the resource pool. The instance creation request carries the first predetermined hardware resource requirements of the first application instance and the second predetermined hardware resource requirements of the second application instance, indicating the dependency relationship between the first application instance and the second application instance. The first application instance uses the first hardware resource in the resource pool, and the first hardware resource matches the first predetermined hardware resource requirement. The second application instance uses the second hardware resource in the resource pool, and the second hardware resource matches the second predetermined hardware resource requirement.

[0006] In this application, the instance creation request carries the predetermined hardware resource requirements of multiple application instances, thereby enabling the cloud management platform to create multiple application instances based on a single instance creation request, thus improving the deployment efficiency of application instances. Furthermore, since the instance creation request also carries the dependencies between multiple application instances, when scheduling application instances, multiple application instances will be scheduled together (scheduling both the first and second application instances). This means that the scheduling of multiple application instances is considered holistically, enabling the overall scheduling of services comprising multiple application instances and improving the operational efficiency of services comprising multiple application instances.

[0007] In one possible scenario, the above application example could be a functional example.

[0008] In one possible scenario, the instance creation request indicates dependencies between multiple application instances. In one possible example, these dependencies indicate that multiple application instances collaborate to implement the same service.

[0009] For example, the above multiple application instances include a first application instance and a second application instance, and the dependency relationship between the first application instance and the second application instance is that the first application instance and the second application instance are used to implement the same service.

[0010] In another possible example, the dependency between multiple application instances is used to indicate: the recursive relationship between multiple application instances.

[0011] For example, the dependency relationship between the first application instance and the second application instance is that the first application instance and the second application instance are at the same level or different levels in the recursive relationship of multiple application instances.

[0012] For example, the first application instance is the root application instance, and the second application instance is the child application instance.

[0013] For example, the first application instance and the second application instance are sub-application instances under the same root application instance.

[0014] In one possible implementation, the cloud management platform schedules the first application instance and the second application instance based on the relationship between the first usage and the first preset value, or the second usage and the second preset value, including: if the first usage is greater than or equal to the first preset value, or the second usage is greater than or equal to the second preset value, the first application instance and the second application instance are expanded.

[0015] In this application, since the instance creation request carries the dependencies between multiple application instances, when the first usage is greater than or equal to the first preset value, or when the second usage is greater than or equal to the second preset value, the multiple application instances (including the first application instance and the second application instance) are simultaneously scaled up, thereby scaling up the service as a whole that includes multiple application instances and improving the operating efficiency of the service that includes multiple application instances.

[0016] In one possible example, the above expansion can be any one or more of the following: horizontal expansion, vertical expansion.

[0017] In one possible example, the ratio of the difference between the hardware resources occupied by the expanded first application instance and the first hardware resources to the difference between the hardware resources occupied by the expanded second application instance and the second hardware resources is a third preset value.

[0018] For example, if the first application instance is at the level above the second application instance in the recursive relationship, then the third preset value is the scaling ratio carried in the instance scheduling request.

[0019] In one possible implementation, the cloud management platform schedules the first application instance and the second application instance based on the relationship between the first usage and the first preset value, or the second usage and the second preset value, including: if the first usage is less than the first preset value, or the second usage is less than the second preset value, scaling down the first application instance and the second application instance.

[0020] In this application, since the instance creation request carries the dependencies between multiple application instances, when the first usage is less than the first preset value, or the second usage is less than the second preset value, the multiple application instances (including the first application instance and the second application instance) are synchronously scaled down. This achieves overall scaling down of the service including multiple application instances, reduces the hardware resource consumption of the service including multiple application instances, and improves the hardware resource utilization of the service including multiple application instances.

[0021] In one possible example, the above shrinkage includes one or more of the following: horizontal shrinkage, vertical shrinkage.

[0022] In one possible example, the ratio of the difference between the hardware resources occupied by the scaled-down first application instance and the first hardware resources to the difference between the hardware resources occupied by the scaled-down second application instance and the second hardware resources is a fourth preset value.

[0023] For example, if the first application instance is at the level above the second application instance in the recursive relationship, then the above-mentioned fourth preset value is the scaling ratio carried in the instance scheduling request.

[0024] In one possible implementation, the instance creation request carries information indicating the degree of affinity between multiple application instances. Based on the degree of affinity between the multiple application instances indicated by this information, it is determined whether the multiple application instances are in the same placement domain.

[0025] In one possible example, the instance creation request carries first information indicating the degree of affinity between the first application instance and the second application instance; based on the degree of affinity between the first application instance and the second application instance indicated by the first information, it is determined whether the first application instance and the second application instance are in the same placement domain.

[0026] In this application, by deploying a first application instance and a second application instance with affinity to the same placement domain, network latency between the first application instance and the second application instance can be reduced, thereby improving the operational efficiency of the services including the first application instance and the second application instance. Furthermore, the monitoring, log collection, and configuration management of application instances within the same placement domain are more centralized, reducing operational complexity.

[0027] For example, the degree of affinity between the first application instance and the second application instance indicated by the first information is: affinity or anti-affinity. Affinity further includes strong affinity or weak affinity.

[0028] For example, if the first information is used to indicate that the affinity between the first application instance and the second application instance is strong affinity, then the cloud management platform determines that the first application instance and the second application instance are in the same placement domain in the resource pool.

[0029] For example, if the first information is used to indicate that the affinity between the first application instance and the second application instance is weak, then the cloud management platform will prioritize placing the first application instance and the second application instance in the same placement domain in the resource pool.

[0030] For example, if the first information is used to indicate that the affinity between the first application instance and the second application instance is anti-affinity, then the cloud management platform determines that the first application instance and the second application instance are in different placement domains in the resource pool.

[0031] For example, the affinity level mentioned above also includes latency sensitivity, bandwidth density, etc. For instance, if the first information is used to indicate that the affinity level between the first application instance and the second application instance is latency sensitive and bandwidth dense, then the cloud management platform determines that the first application instance and the second application instance are in different placement domains in the resource pool.

[0032] In one possible example, the placement domain is used to indicate any of the following: container, virtual machine, virtual machine cluster, programmable switch, physical machine, rack, data center, availability zone (AZ).

[0033] In one possible implementation, the instance creation request carries the weight of the application instance, which is used to indicate the importance of the application instance. The sum of the weights of application instances in the same placement domain in the resource pool is less than or equal to a fifth preset value.

[0034] In this application, by limiting the sum of the weights of application instances in the same placement domain to be less than or equal to a fifth preset value, the affected application instances are kept within a controllable range when the placement domain fails, thereby improving the operational stability of services that include multiple application instances.

[0035] In one possible example, the weight of an application instance can be any value between 1 and 10, with larger values ​​indicating higher importance.

[0036] In one possible scenario, the sum of the weights of all application instances in the same placement domain is less than or equal to the fifth preset value.

[0037] In another possible scenario, the sum of the weights of application instances with weights of 6-10 in the same placement domain is less than or equal to the fifth preset value.

[0038] In another possible scenario, the values ​​of application instances with weights of 6-10 in the same placement domain must be less than or equal to the threshold.

[0039] In one possible example, the weights of the above application instances could change over time. For example, they could decrease proportionally over time, or increase proportionally over time.

[0040] In another possible example, the weights of the application instances described above are updated by the user. For instance, the cloud management platform receives a weight update request from the terminal.

[0041] It is worth noting that after the weights are updated, the cloud management platform will reschedule the application instances according to the updated weights, so that the sum of the weights of application instances in the same placement domain is less than or equal to the fifth preset value.

[0042] In one possible implementation, the first application instance and the second application instance are located in a placement domain included in the preheating resource pool, which is used to preheat the first application instance and the second application instance.

[0043] In one possible example, a set of placement domains can form a preheating resource pool, which is used to initialize and execute programs related to application instances in advance, and then deploy the first application instance and / or the second application instance to the placement domains included in the preheating resource pool, thereby reducing deployment latency.

[0044] In one possible scenario, another set of placement domains can form a working resource pool. The cloud management platform can convert certain preheated instances in the preheated resource pool into working instances after completing all the initialization required to create application instances, and move the placement domains of these instances from the preheated resource pool to the working resource pool.

[0045] In one possible scenario, if the load on some placement domains in the working resource pool is relatively light, the cloud management platform may migrate all the load on these placement domains to other placement domains in the working resource pool as needed, thereby moving these placement domains back to the preheating resource pool or releasing them to the cloud management platform.

[0046] In one possible implementation, the instance creation request carries second information of the first application instance and third information of the second application instance. If the second information indicates that the first application instance is merging-compatible, and the third information indicates that the second application instance is merging-compatible, then the first application instance and the second application instance are merged to obtain a third application instance. The third application instance is a new instance, or it is either the first application instance or the second application instance.

[0047] In this application, by merging application instances, discrete application instances can be merged into application instances that consume more resources, thereby reducing the resource fragmentation rate of the resource pool and improving the resource utilization rate of application instances.

[0048] In one possible example, the above fusion is either a horizontal fusion or a vertical fusion.

[0049] In one possible example, the cloud management platform obtains the resource fragmentation rate of the resource pool. If the resource fragmentation rate is greater than or equal to a threshold, the cloud management platform merges the application instances in the resource pool.

[0050] In another possible example, the cloud management platform receives an instance fusion request and then responds by fusioning the application instances deployed in the resource pool.

[0051] For example, the instance fusion request mentioned above is triggered periodically by the cloud management platform, or sent to the cloud management platform by the user's terminal.

[0052] In one possible scenario, the second information is used to indicate the elastic scaling method of the first application instance, and the third information is used to indicate the elastic scaling method of the second application instance. If the elastic scaling method of the first application instance is the same as that of the second application instance, it indicates that the first application instance and the second application instance are compatible.

[0053] Furthermore, the second information of the first application instance and the third information of the second application instance are used to indicate whether the first application instance and the second application instance are at the same level or different levels in the recursive relationship, and the affinity between the first application instance and the second application instance is affinity.

[0054] In one possible scenario, the deployment of the above-mentioned merged application instances still needs to satisfy the condition that the sum of the weights of application instances in the same placement domain is less than or equal to the fifth preset value. If this condition is not met, the cloud management platform 110 needs to reschedule the application instances until the sum of the weights of application instances in the same placement domain is less than or equal to the fifth preset value.

[0055] In one possible implementation, a fourth application instance is deployed in the resource pool, and the cloud management platform manages the fourth information of the fourth application instance. If the fourth information is used to indicate that the fourth application instance is mergingable, then the third application instance and the fourth application instance are merged to obtain a fifth application instance. The fifth application instance is a new instance, or one of the third and fourth application instances.

[0056] In this application, by continuously merging application instances, an application instance with a large resource consumption is gradually obtained, which can further reduce the resource fragmentation rate of the resource pool and thus improve the resource utilization rate of the application instance.

[0057] In one possible implementation, a sixth application instance is deployed in the resource pool, and the instance creation request carries fifth information indicating the degree of affinity between the first application instance and the sixth application instance; based on the degree of affinity between the first application instance and the sixth application instance indicated by the fifth information, it is determined whether the first application instance is deployed to the placement domain where the sixth application instance is located.

[0058] In this application, when deploying a new application instance (the first application instance), the affinity between the already deployed application instance (the sixth application instance) and the new application instance needs to be considered, so as to determine whether the first application instance and the sixth application instance need to be deployed to the same placement domain, in order to reduce the network latency between the first application instance and the sixth application instance.

[0059] In one possible scenario, when the cloud management platform determines whether the first application instance and the sixth application instance are deployed in the same placement domain, it also needs to consider that the sum of the weights of application instances placed in the same placement domain is less than or equal to the fifth preset value.

[0060] Secondly, this application provides a resource scheduling apparatus. This resource scheduling apparatus is applied to a computer system or to a computing device that supports the implementation of the resource scheduling apparatus in the computer system. The resource scheduling apparatus includes modules for executing the resource scheduling method in the first aspect or any optional implementation of the first aspect. In one possible example, the resource scheduling apparatus includes:

[0061] The first acquisition module is used to acquire instance creation requests. Instance creation requests are used to request the creation of application instances with predetermined hardware resource requirements in the resource pool. The instance creation request carries the first predetermined hardware resource requirements for a first application instance and the second predetermined hardware resource requirements for a second application instance. The instance creation request indicates the dependency relationship between the first and second application instances. The resource pool is managed by the cloud management platform.

[0062] The creation module is used to create a first application instance and a second application instance in the resource pool based on the instance creation request. The first application instance uses a first hardware resource in the resource pool, which matches a first predetermined hardware resource requirement. The second application instance uses a second hardware resource in the resource pool, which matches a second predetermined hardware resource requirement.

[0063] The second acquisition module is used to acquire the first usage of the first hardware resource by the first application instance and the second usage of the second hardware resource by the second application instance.

[0064] The scheduling module is used to schedule the first application instance and the second application instance according to the relationship between the first usage and the first preset value, or the second usage and the second preset value.

[0065] For more detailed implementation information regarding the resource scheduling device, please refer to the description of any of the implementation methods in the first aspect above, as well as the content of the specific implementation methods below, which will not be repeated here.

[0066] Thirdly, this application provides a chip. The chip includes: a processor and an interface circuit; the interface circuit is used to acquire first data, and the processor is used to execute the method in the first aspect or any possible implementation of the first aspect based on the first data.

[0067] Fourthly, this application provides a computing device cluster. The computing device cluster includes at least one computing device, which includes a memory and a processor. The memory stores computer instructions; when the processor executes the computer instructions, it implements the method described in the first aspect or any possible implementation of the first aspect.

[0068] Fifthly, this application provides a computer-readable storage medium. The storage medium stores a computer program or instructions that, when executed by a processing device, implement the method described in the first aspect or any possible implementation thereof.

[0069] Sixthly, this application provides a computer program product. The computer program product includes a computer program or instructions that, when executed by a processing device, implement the method described in the first aspect or any possible implementation thereof.

[0070] The beneficial effects of aspects two through six above can be referred to in the first aspect or any possible implementation of the first aspect, and will not be elaborated here. Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. Attached Figure Description

[0071] Figure 1 is a schematic diagram of a computer system provided in this application;

[0072] Figure 2 is a schematic diagram of a system architecture provided in this application;

[0073] Figure 3 is a flowchart illustrating a resource scheduling method provided in this application;

[0074] Figure 4 is a schematic diagram of the structure of a resource scheduling device provided in this application;

[0075] Figure 5 is a schematic diagram of the structure of a computing device provided in this application;

[0076] Figure 6 is a schematic diagram of the structure of a computing device cluster provided in this application;

[0077] Figure 7 is a schematic diagram of the connection between computing devices provided in this application. Detailed Implementation

[0078] To facilitate understanding, the technical terms used in this application will be introduced first.

[0079] Function as a Service (FaaS) is a cloud computing service model that allows developers to deploy and run code in a serverless manner. Its core idea is to break down business logic into independent functions, with the cloud platform dynamically scheduling resources, managing the runtime environment, and executing code only when a function is triggered by an event, with billing based on actual resource consumption.

[0080] Functional resource consumers (FRCs), also known as functional instances, are the basic units of resource consumption in the FaaS model. A created functional instance is responsible for executing one or more ephemeral functional logic tasks. The input to each task is dynamically generated by specific requests or events, and the output of the task is the result of the function logic call.

[0081] A placement domain (PD) is used to define the physical or logical scope of compute, storage, or network resources to meet performance optimization, fault tolerance isolation, or policy compliance requirements. Examples of placement domains include: containers, virtual machines, virtual machine clusters, programmable switches, physical machines, racks, data centers, and availability zones (AZs).

[0082] Virtual network functions (VNFs) are software-implemented network services that can run on general-purpose hardware (such as servers and cloud platforms), replacing traditional dedicated hardware devices (such as physical firewalls and routers). VNFs are a core component of network functions virtualization (NFV), aiming to improve network flexibility, reduce costs, and accelerate service deployment through virtualization technology. A VNF instance can be a functional instance.

[0083] To address the issue of scheduling only a single instance when multiple instances have collaborative relationships, thus impacting the operational efficiency of services involving multiple instances, this application provides a resource scheduling method. This method is applied to a cloud management platform, which manages a resource pool for deploying application instances. The method includes: the cloud management platform obtaining an instance creation request and, based on the request, creating a first application instance and a second application instance in the resource pool. Furthermore, the cloud management platform obtains a first usage of a first hardware resource by the first application instance and a second usage of a second hardware resource by the second application instance, and schedules the first and second application instances based on the relationship between the first usage and a first preset value, or the relationship between the second usage and a second preset value. The instance creation request requests the creation of an application instance with predetermined hardware resource requirements in the resource pool. The request carries the first predetermined hardware resource requirements of the first application instance and the second predetermined hardware resource requirements of the second application instance, indicating the dependency relationship between the first and second application instances. The first application instance uses the first hardware resource in the resource pool, and the first hardware resource matches the first predetermined hardware resource requirement. The second application instance uses the second hardware resource in the resource pool, and the second hardware resource matches the second predetermined hardware resource requirement.

[0084] In this application, the instance creation request carries the predetermined hardware resource requirements of multiple application instances, thereby enabling the cloud management platform to create multiple application instances based on a single instance creation request, thus improving the deployment efficiency of application instances. Furthermore, since the instance creation request also carries the dependencies between multiple application instances, when scheduling application instances, multiple application instances will be scheduled together (scheduling both the first and second application instances). This means that the scheduling of multiple application instances is considered holistically, enabling the overall scheduling of services comprising multiple application instances and improving the operational efficiency of services comprising multiple application instances.

[0085] Next, the resource scheduling method provided in this application will be described in detail with reference to the accompanying drawings.

[0086] Referring to Figure 1, which is a schematic diagram of a computer system provided in this application, the computer system includes a resource pool 100 and a cloud management platform 110.

[0087] The resource pool 100 includes multiple computing devices, such as computing device 101, computing device 102, and computing device 103. Computing devices 101, 102, and 103 can communicate with each other via wired or wireless means.

[0088] The aforementioned computing devices can be servers, terminals, etc., and the cloud management platform 110 can also be called a management node.

[0089] The cloud management platform 110 is deployed on the resource pool 100 in the form of software. This software can be an application, plugin, microservice, component, or other. For example, taking the cloud management platform 110 as an application, the cloud management platform 110 is deployed on the computing device 101 in the resource pool 100, and then the computing device 101 obtains the instance creation request input by the user to execute the resource scheduling method shown in the following embodiments.

[0090] For example, taking cloud management platform 110 as a microservice, the various functions implemented in cloud management platform 110 are supported by multiple microservices deployed on computing device 101.

[0091] The software form of the cloud management platform 110 described above is merely an optional method provided in the embodiments of this application and should not be construed as limiting this application. In the following embodiments, this application uses the deployment of the cloud management platform 110 as software on the resource pool 100 as an example to exemplify the resource scheduling method provided in the embodiments of this application.

[0092] The aforementioned cloud management platform 110 is used to manage resource pool 100, which includes computing resources, storage resources, and network resources provided by computing devices 101, 102, 103, or computing devices 101, 102, and 103. In one possible example, resource pool 100 may also include a storage device cluster (not shown in Figure 1), etc.

[0093] In this application, the cloud management platform 110 provides a request retrieval interface (such as an application programming interface (API)). This interface can be used to retrieve user-inputted instance creation requests. A detailed description of the instance creation request is provided in Figure 2 below and will not be repeated here.

[0094] The aforementioned wired communication methods can include: Ethernet, fiber optic, and various peripheral component interconnect express (PCIe) buses, universal serial buses (USB) or unified buses (Ubus or UB), compute express links (CXL), cache coherent interconnect for accelerators (CCIX), etc., which are set up inside the computer system to connect computing devices.

[0095] The aforementioned wireless communication methods can include: the Internet, wireless fidelity (WIFI), and ultra-wideband (UWB) technology, etc.

[0096] In one possible example, at least one of the aforementioned computing devices is equipped with one or more application instances, such as application instance a in computing device 102 and application instance b in computing device 103.

[0097] For example, application instance a and application instance b are deployed in containers or virtual machines in resource pool 100.

[0098] The above application examples can be functional examples.

[0099] In one possible example, the aforementioned computer system could be referred to as a distributed system, a cloud computing platform, or a cloud environment.

[0100] In one possible example, the computer system described above may also include terminal 120, terminal 130, and terminal 140.

[0101] Terminals 120, 130, and 140 can be mobile phones, tablets, handheld computers, personal computers (PCs), cellular phones, personal digital assistants (PDAs), wearable devices (such as smartwatches), smart home devices (such as televisions), in-vehicle computers, game consoles, and augmented reality (AR) / virtual reality (VR) devices, etc. This application does not impose any special restrictions on the specific device form of terminals 120, 130, and 140.

[0102] In another possible example, terminals 120, 130, and 140 are set up independently and communicate with the computer system, i.e., the distributed system.

[0103] It should be noted that the computer system architecture shown in Figure 1 is merely an example. The types or number of devices within the system can be configured according to actual needs, and this application embodiment does not limit this. For example, the computer system may also include more computing devices.

[0104] Based on the computer system shown in Figure 1, Figure 2 below illustrates the system architecture deployed on the computer system shown in Figure 1. As shown in Figure 2, Figure 2 is a schematic diagram of a system architecture provided by this application. Figure 2 includes a load scheduler 111, a resource scheduler 112, and a resource manager 113 deployed on the cloud management platform 110.

[0105] The load scheduler 111 receives requests (such as instance creation requests, scheduling requests, etc.) and converts the requests into resource scheduling requirements (such as extracting the resource plan from the request). The resource scheduler 112 and the resource manager 113 work together to allocate, schedule, and monitor resources. The load scheduler 111 is located in the load layer of the cloud management platform, and the resource scheduler 112 is located in the resource layer of the cloud management platform 110.

[0106] Figure 2 also includes application instances deployed in resource pool 100, such as application instance a-application instance d. Multiple application instances can constitute a logical instance, such as application instance a and application instance b constituting a logical instance, and application instance c and application instance d constituting a logical instance. Figure 2 illustrates the application instances deployed in virtual machines as an example. In other embodiments of this application, application instances can also be deployed in containers.

[0107] In one possible example, the cloud management platform 110 also includes a monitor 114, which detects the resource usage of application instances and reports the usage to the resource scheduler 112.

[0108] In one possible scenario, resource scheduler 112 receives a request from terminal 120.

[0109] The implementation of the resource scheduling method provided in this application embodiment will be described in detail below, based on the computer system shown in Figure 1 and the software architecture shown in Figure 2, with further reference to the accompanying drawings.

[0110] Figure 3 is a flowchart illustrating a resource scheduling method provided in this application. The method provided in this embodiment can be applied to the computer system shown in Figure 1. Here, the resource scheduling method shown in this application is illustrated by example, which is executed by a cloud management platform 110. The cloud management platform 110 is used to manage the resource pool 100, and the resource pool 100 is used to deploy application instances.

[0111] In this embodiment, application instance a can be referred to as the first application instance, predetermined hardware resource requirement 1 can be referred to as the first predetermined hardware resource requirement, hardware resource 1 can be referred to as the first hardware resource, application instance b can be referred to as the second application instance, predetermined hardware resource requirement 2 can be referred to as the second predetermined hardware resource requirement, hardware resource 2 can be referred to as the second hardware resource, preset value A can be referred to as the first preset value, and preset value B can be referred to as the second preset value. As shown in Figure 3, the resource scheduling method includes the following steps S310-S340.

[0112] S310 and cloud management platform 110 receive instance creation requests.

[0113] The instance creation request is used to request the creation of an application instance with predetermined hardware resource requirements in resource pool 100.

[0114] In one possible scenario, the instance creation request carries the pre-defined hardware resource requirements for multiple application instances.

[0115] In one possible example, the instance creation request carries the pre-defined hardware resource requirement 1 for application instance a and the pre-defined hardware resource requirement 2 for application instance b.

[0116] For example, the predetermined hardware resource requirements include any one of the following: computing resource requirements, storage resource requirements, network bandwidth resource requirements, etc. For instance, predetermined hardware resource requirement 1 includes computing resource requirement 1 (e.g., 4 processor cores) and storage resource requirement 1 (e.g., 50 gigabytes (GB) of storage space), and predetermined hardware resource requirement 2 includes computing resource requirement 2 (e.g., 2 processor cores) and storage resource requirement 2 (e.g., 20GB of storage space).

[0117] In one possible scenario, the instance creation request also indicates the dependencies between the aforementioned application instances, which collaborate to implement the same service.

[0118] In one possible example, the instance creation request indicates the dependency between application instance a and application instance b.

[0119] For example, the dependency between application instance a and application instance b is as follows: application instance a and application instance b are used to implement the same service. For instance, application instance a implements function 1 in service A, and application instance b implements function 2 in service A.

[0120] In one possible example, the dependency relationship between multiple application instances is a recursive relationship. For example, the recursive relationship between multiple application instances is a tree structure, with the multiple application instances including a root application instance and child application instances.

[0121] For example, the dependency relationship between application instance a and application instance b is as follows: application instance a and application instance b are at the same level or different levels in the recursive relationship of multiple application instances. Multiple application instances include application instance a and application instance b, and these multiple application instances are used to implement the same service. For example, application instance a is the root application instance, and application instance b is a child application instance.

[0122] For example, application instance a and application instance b are sub-application instances under the same root application instance.

[0123] It is worth noting that the above only illustrates a two-level tree structure for the recursive relationship between multiple application instances. In other embodiments of this application, the recursive relationship between multiple application instances is a three-level or higher tree structure. Furthermore, the recursive relationship between the aforementioned multiple application instances can also be represented by lists, graph structures, or other forms.

[0124] In one possible implementation, the cloud management platform 110 obtains the instance creation request, including: the cloud management platform 110 obtains the instance creation request sent by the terminal 120 through the API provided by the cloud management platform 110.

[0125] In one possible scenario, terminal 120 uses a REST API to pass the instance creation request to cloud management platform 110.

[0126] In another possible implementation, the cloud management platform 110 obtains the instance creation request, including: the terminal 120 accesses the cloud management platform 110 through an API provided by the cloud management platform 110, thereby displaying a user interface on the terminal 120. Then, the user triggers control components on the user interface through various input devices (keyboard, mouse, touchscreen, etc.) connected to the terminal 120. Based on the triggering operation, the terminal 120 obtains the instance creation request and then sends the instance creation request to the cloud management platform 110.

[0127] Two possible examples are provided below for the specific implementation of the triggering operation.

[0128] Example 1: This trigger operation can be a user confirmation of the control component via the keyboard, such as pressing the Enter key to confirm the user-configured parameters. These parameters are carried in the instance creation request, such as the application instance's pre-defined hardware resource requirements and dependencies between application instances.

[0129] Example 2: The trigger action can be a user clicking on the control component with the mouse.

[0130] For example, the user interface displays multiple control components corresponding to candidate options. Users can click on the aforementioned control components with the mouse to determine the candidate option corresponding to the clicked control component, such as the specific value of the predetermined hardware resource requirement or the dependency relationship between application instances.

[0131] For example, the multiple options mentioned above are various values ​​of the predetermined hardware resource requirements, the dependencies between application instances, etc. The values ​​of the predetermined hardware resource requirements indicated by the multiple options include the predetermined hardware resource requirement 1 and the predetermined hardware resource requirement 2. The dependencies between application instances indicated by the multiple options include the dependency between application instance a and application instance b.

[0132] It is worth noting that the above content is merely an example and should not be construed as limiting this application. In other examples of this application, the triggering operation may be a user input operation via a keyboard into the control unit, such as inputting a specific value for a predetermined hardware resource requirement.

[0133] In another possible implementation, the cloud management platform 110 obtains the instance creation request, including: the cloud management platform 110 obtains the instance creation request sent by the terminal 120 through a command-line tool.

[0134] Based on the instance creation request, S320 and cloud management platform 110 create application instance a and application instance b in resource pool 100.

[0135] In this case, application instance a uses hardware resource 1 in resource pool 100, and hardware resource 1 matches the predetermined hardware resource requirement 1. In this case, application instance b uses hardware resource 2 in resource pool 100, and hardware resource 2 matches the predetermined hardware resource requirement 2.

[0136] In one possible example, hardware resource 1 is the same as the predetermined hardware resource requirement 1, such as 4 processor cores and 50GB of storage space; hardware resource 2 is the same as the predetermined hardware resource requirement 2, such as 2 processor cores and 20GB of storage space.

[0137] For example, the cloud management platform 110 launches a virtual machine with 4 processor cores and 50GB of storage space, and then deploys application instance a to the aforementioned virtual machine. Also, it launches a virtual machine with 2 processor cores and 20GB of storage space, and then deploys application instance b to the aforementioned virtual machine. In other examples of this application, the cloud management platform 110 may also launch containers, and then deploy application instance a and application instance b to the containers.

[0138] For example, the virtual machine / container to which application instance a is deployed consumes more hardware resources than the predetermined hardware resource requirement 1, and the virtual machine / container to which application instance b is deployed consumes more hardware resources than the predetermined hardware resource requirement 2.

[0139] In another possible example, the difference between hardware resource 1 and the predetermined hardware resource requirement 1 is a preset value. For example, hardware resource 1 is 4 processor cores and 50GB of storage space, while the predetermined hardware resource requirement 1 is 3 processor cores and 40GB of storage space. That is, the aforementioned preset value is 1 processor core and 10GB of storage space.

[0140] In one possible implementation, the cloud management platform 110 creates application instance a and application instance b in the resource pool 100 according to the instance creation request, including: the cloud management platform 110 parses the instance creation request to obtain the pre-defined hardware resource requirement 1 of application instance a and the pre-defined hardware resource requirement 2 of application instance b, and then launches the corresponding application instance a and application instance b according to the pre-defined hardware resource requirement 1 and the pre-defined hardware resource requirement 2.

[0141] It is worth noting that in the above implementation method, the cloud management platform 110 can run the corresponding image, function code (or code storage path), execution environment, etc. in the virtualized instance based on the image information, function code (or code storage path), execution environment, etc. carried in the instance creation request, thereby realizing the deployment of application instances to virtualized instances (containers or virtual machines, etc.).

[0142] For details regarding how the cloud management platform 110 creates application instance a and application instance b in the resource pool 100 based on the instance creation request, please refer to conventional technical methods in this field, which will not be elaborated here.

[0143] In one possible scenario, the instance creation request carries information indicating the degree of affinity between multiple application instances. Based on this information indicating the degree of affinity between the multiple application instances, it is determined whether the multiple application instances are in the same placement domain.

[0144] In one possible example, the instance creation request carries first information indicating the degree of affinity between application instance a and application instance b. Based on the degree of affinity between application instance a and application instance b indicated by the first information, it is determined whether application instance a and application instance b are in the same placement domain.

[0145] For example, the degree of affinity between application instance a and application instance b indicated by the first information is: affinity or anti-affinity. Affinity further includes strong affinity or weak affinity.

[0146] For example, if the first information indicates that the affinity between application instance a and application instance b is strong, then the cloud management platform 110 determines that application instance a and application instance b are in the same placement domain within resource pool 100, such as the same container, virtual machine, physical machine, rack, data center, Availability Zone (AZ), etc.

[0147] For example, if the first information indicates that the affinity between application instance a and application instance b is weak, then the cloud management platform 110 will prioritize placing application instance a and application instance b in the same placement domain within the resource pool 100. To ensure that the sum of the weights of application instances deployed in the same placement domain is less than or equal to a preset value, application instance a and application instance b can be placed in different placement domains. Alternatively, to reduce resource fragmentation in the resource pool, application instance a and application instance b can be placed in different placement domains, etc.

[0148] For a detailed description of the sum of weights of application instances deployed in the same placement domain being less than or equal to a preset value, please refer to the following embodiments, which will not be repeated here.

[0149] For example, if the first information is used to indicate that the affinity between application instance a and application instance b is anti-affinity, then the cloud management platform 110 determines that application instance a and application instance b are in different placement domains in resource pool 100, such as application instance a being deployed in placement domain A (e.g., computing device 102) and application instance b being deployed in placement domain B (e.g., computing device 103).

[0150] S330 and cloud management platform 110 obtain the first usage of hardware resource 1 by application instance a and the second usage of hardware resource 2 by application instance b.

[0151] In one possible scenario, taking the first usage of hardware resource 1 by application instance a and the second usage of hardware resource 2 by application instance b as an example, the first usage of hardware resource 1 by application instance a includes the usage of any one or more of the following by application instance a: computing resources, storage resources, bandwidth resources, etc.

[0152] In one possible example, the first usage of hardware resource 1 by application instance a is: the utilization rate of the processor and the utilization rate of the storage space.

[0153] In one possible example, the instance creation request also carries the type of the application instance. Application instance types include: CPU-intensive, memory-intensive, bandwidth-intensive, latency-sensitive, etc.

[0154] The cloud management platform 110 determines the first usage of hardware resource 1 by application instance a based on its type. For example, if application instance a is processor-intensive, the first usage is the utilization rate of the processor. If application instance a is storage-intensive, the first usage is the occupancy rate of the storage space indicated by hardware resource 1. If application instance a is bandwidth-intensive, the first usage is the bandwidth utilization rate. If application instance a is latency-sensitive, the first usage is the utilization rate of the processor, the occupancy rate of the storage space, and the bandwidth utilization rate.

[0155] In one possible implementation, agent 1 is deployed in the virtualization instance where application instance a resides, and agent 2 is deployed in the virtualization instance where application instance b resides. The aforementioned agents are used to monitor the hardware resource usage of the virtualization instances. The cloud management platform 110 obtains the first usage of hardware resource 1 by application instance a and the second usage of hardware resource 2 by application instance b, including: the cloud management platform 110 obtains the first usage sent by agent 1 and the second usage sent by agent 2.

[0156] S340 and cloud management platform 110 schedule application instance a and application instance b according to the relationship between the first usage and the preset value A, or the relationship between the second usage and the preset value B.

[0157] In one possible example, if the instance creation request carries dependencies between multiple application instances, such as if these multiple application instances are in the same recursive relationship, then if the cloud management platform 110 needs to schedule at least one of the multiple application instances, it will schedule all the application instances together.

[0158] In one possible scenario, the predetermined hardware resource requirements of application instance a, the predetermined hardware resource requirements of application instance b, and the dependency relationship between application instance a and application instance b carried in the instance creation request have a valid time window. That is, the parameters carried in the instance creation request have an expiration period. After the expiration period, the aforementioned parameters will not be binding on the application instance.

[0159] In one possible example, the cloud management platform 110 will continuously monitor the hardware resource usage of application instances, and then schedule multiple application instances based on the relationship between the hardware resource usage of application instances and preset values.

[0160] It is worth noting that when scheduling application instances, the cloud management platform 110 must meet the following requirements: the affinity between application instances in the same placement domain (the affinity level must be affinity), and the sum of the weights of application instances in the same placement domain must be less than or equal to the fifth preset value.

[0161] In one possible scenario, the above scheduling is used to instruct one or more of the following: expansion, reduction, migration, etc.

[0162] In the case where the above scheduling is used to indicate capacity expansion, the above S340 will be described in detail below.

[0163] If the first usage is greater than or equal to the preset value A (e.g., processor usage is 85%, storage space usage is 90%), or if the second usage is greater than or equal to the preset value B (e.g., processor usage is 80%, storage space usage is 85%), then application instance a and application instance b will be expanded.

[0164] In one possible example, the above expansion includes either horizontal or vertical expansion.

[0165] Horizontal scaling refers to adding a new application instance that performs the same functions as the application instance. For example, if application instance a is scaled up, then cloud management platform 110 adds application instance c, which performs the same functions as application instance a, or application instance c is identical to application instance a.

[0166] Vertical scaling means increasing the hardware resources used by an application instance. For example, expanding hardware resource 1 (4 processor cores, 50GB storage space) to 6 processor cores and 70GB storage space.

[0167] For example, the instance creation request carries a maximum resource limit (maxcapacity) that the application instance can use. This maximum resource limit is either the maximum hardware resource limit or the maximum number of application instances. For example, the minimum hardware resource limit is 10 processor cores and 200GB of storage space.

[0168] For example, the minimum number of application instances is 3. If we add an application instance c that performs the same function as application instance a, then the number of application instances will be 2.

[0169] When expanding application instances, the cloud management platform 110 ensures that the expanded application instances do not exceed the maximum resource limit mentioned above.

[0170] For details on the horizontal or vertical scaling of application instances, please refer to conventional techniques in this field; they will not be elaborated upon here.

[0171] In one possible scenario, the instance creation request carries a scaling ratio, which indicates the ratio of the scaling capacity of the application instances when scaling up the multiple application instances that have dependencies.

[0172] In one possible example, scaling ratio is the ratio of the expansion of the root application instance to the expansion of the child application instances. For example, if application instance a is the root application instance, application instance b is a child application instance, and scaling ratio is 1.5, and application instance b expands by 2 processor cores and 10GB of storage space, then application instance a needs to be expanded by 3 processor cores and 15GB of storage space simultaneously.

[0173] For example, if application instance a and application instance b are child application instances under the same root application instance, that is, application instance a and application instance b are at the same level in the recursive relationship and the scaling ratio is 1.5, if application instance b is expanded by 2 processor cores and 10GB of storage space, the root application instance corresponding to application instance b needs to be expanded by 3 processor cores and 15GB of storage space simultaneously, and application instance a needs to be expanded by 2 processor cores and 10GB of storage space.

[0174] That is, when application instance a is at the level above application instance b in the recursive relationship, the ratio of the difference between the hardware resources occupied by the expanded application instance a and hardware resource 1 to the difference between the hardware resources occupied by the expanded application instance b and hardware resource 2 is a preset value C (third preset value), which is also the aforementioned expansion ratio.

[0175] It is worth noting that the scaling ratio of each sub-application instance relative to the root application instance can be different.

[0176] In the case where the above scheduling is used to indicate capacity reduction, the above S340 will be described in detail below.

[0177] If the first usage is greater than or equal to the preset value A, or the second usage is greater than or equal to the preset value B, then application instance a and application instance b will be scaled down.

[0178] In one possible example, the above-mentioned reduction includes horizontal reduction and vertical reduction.

[0179] Horizontal scaling down means reducing the number of application instances that perform the same functions. For example, if application instances performing the same function include application instance a and application instance c, then the cloud management platform 110 will scale down the aforementioned application instances and take application instance a or application instance c offline.

[0180] Vertical scaling means reducing the hardware resources used by an application instance. For example, reducing hardware resources 1 (4 processor cores, 50GB storage) to 3 processor cores and 20GB storage.

[0181] For example, the instance creation request carries a minimum amount of resources (mincapacity) that the application instance can occupy. This minimum amount of resources includes minimum hardware resources or minimum number of application instances. For example, the minimum amount of hardware resources is 1 processor core and 2GB of storage space.

[0182] For example, the minimum number of application instances is 1 application instance.

[0183] When cloud management platform 110 scales down application instances, the scaled-down application instances cannot be smaller than the minimum resource size mentioned above.

[0184] For details regarding the horizontal or vertical scaling of application instances, please refer to conventional techniques in this field; they will not be elaborated upon here.

[0185] In one possible scenario, the instance creation request carries a scaling ratio, which indicates the ratio of the scaling size of the application instances when scaling down the multiple application instances that have dependencies.

[0186] In one possible example, scaling ratio is the ratio of the scaling down of the root application instance to the scaling down of the child application instances. For example, if application instance a is the root application instance, application instance b is a child application instance, and the scaling ratio is 1.5, and application instance a scales down by 3 processor cores and 15GB of storage, then application instance a needs to simultaneously scale down by 2 processor cores and 10GB of storage.

[0187] That is, when application instance a is at the level above application instance b in the recursive relationship, the ratio of the difference between the hardware resources occupied by the scaled-down application instance a and hardware resource 1 to the difference between the hardware resources occupied by the scaled-down application instance b and hardware resource 2 is a preset value D (fourth preset value), which is also the aforementioned scaling-down ratio.

[0188] In one possible example, the above expansion ratio is consistent with the reduction ratio.

[0189] In the case where the above scheduling is used to indicate migration, the above S340 will be described in detail below.

[0190] If the first usage is greater than or equal to the preset value A, or the second usage is greater than or equal to the preset value B, then application instance a and application instance b will be migrated.

[0191] In one possible example, if application instance a and application instance b are in the same placement domain, the cloud management platform 110 will migrate application instance a and application instance b from placement domain 1 to placement domain 2.

[0192] For example, the application instances deployed in placement domain 2 have a utilization rate of the hardware resources of placement domain 2 that is less than or equal to a threshold.

[0193] In another possible example, if application instance a and application instance b are in different placement domains, the cloud management platform 110 will migrate application instance a from placement domain 1 to placement domain 2, and application instance b from placement domain 3 to placement domain 4.

[0194] For example, the utilization rate of hardware resources of placement domain 2 by application instances deployed in placement domain 2 is less than or equal to a threshold, and the utilization rate of hardware resources of placement domain 4 by application instances deployed in placement domain 4 is less than or equal to a threshold.

[0195] When scheduling is used to indicate at least two of the following: expansion, reduction, and migration, the above-mentioned scheduling instructions for indicating expansion, reduction, and migration can be used as a reference, and will not be repeated here.

[0196] In one possible embodiment, the instance creation request carries the weight of the application instance, which is used to indicate the importance of the application instance. The sum of the weights of application instances in the same placement domain in resource pool 100 is less than or equal to a preset value E (the fifth preset value).

[0197] In one possible example, the weight of an application instance can be any value between 1 and 10, with larger values ​​indicating higher importance.

[0198] In one possible scenario, the sum of the weights of all application instances in the same placement domain is less than or equal to a preset value E (e.g., 100).

[0199] In another possible scenario, the sum of the weights of application instances with weights of 6-10 in the same placement domain is less than or equal to the preset value E.

[0200] In other embodiments of this application, the values ​​of the application instances with weights of 6-10 in the same placement domain must be less than or equal to a threshold (e.g., 10).

[0201] In one possible embodiment, a set of placement domains can form a preheating resource pool, which is used to initialize and execute programs related to application instances in advance, and then deploy application instance a and / or application instance b to the placement domains included in the preheating resource pool, thereby reducing deployment latency.

[0202] In one possible example, application instance a and application instance b are located in the placement domain included in the preheating resource pool. The preheating resource pool is used to preheat application instance a and application instance b. The preheating resource pool has completed most of the initialization content required to launch the application instances. After receiving the instance creation request, it further converts the initialized application instances into application instance a and / or application instance b according to the parameters in the instance creation request (pre-defined hardware resource requirements, dependencies, etc.).

[0203] In one possible embodiment, the second set of placement domains can form a working resource pool. The cloud management platform can convert certain preheated instances in the preheated resource pool into working instances after completing all the initialization required to create application instances, and move the placement domains of these instances from the preheated resource pool to the working resource pool.

[0204] In one possible scenario, if the load on some placement domains in the working resource pool is relatively light, the cloud management platform may migrate all the load on these placement domains to other placement domains in the working resource pool as needed, thereby moving these placement domains back to the preheating resource pool or releasing them to the cloud management platform.

[0205] In one possible embodiment, when the cloud management platform 110 receives an instance fusion request, or when the resource fragmentation rate of the resource pool 100 is greater than or equal to a threshold, it merges the application instances deployed in the resource pool 100 to merge relatively fragmented application instances into a whole application instance.

[0206] In one possible scenario, the instance creation request carries second information about application instance a and third information about application instance b. If the second information indicates that application instance a is merging-compatible, and the third information indicates that application instance b is merging-compatible, then the cloud management platform 110 merges application instance a and application instance b to obtain application instance c (the third application instance). Instance c is a new instance, or one of instance a and instance b.

[0207] In one possible example, application instances a and b are cleaned up after application instance c is running normally.

[0208] In one possible example, the above fusion includes horizontal fusion and vertical fusion.

[0209] Horizontal convergence means merging the resources, states, and services of application instances running on different physical machines, virtual machines, and containers into a single application instance.

[0210] Vertical integration refers to merging application instances, states, and services that are running on the same physical machine, virtual machine, or container into a single application instance.

[0211] In another possible scenario, based on the above scenario, application instance d (the fourth application instance) is already deployed in resource pool 100, and cloud management platform 110 manages the fourth information of application instance d. If the fourth information is used to indicate that application instance d is mergingable, then cloud management platform 110 further merges application instance c with application instance d to obtain application instance e (the fifth application instance). Instance e is a new instance, or one of instance c and instance d.

[0212] The content of cloud management platform 110 merging application instance c and application instance d can be referred to the above description of cloud management platform 110 merging application instance a and application instance b, and will not be repeated here.

[0213] In one possible example, when the cloud management platform 110 receives an instance creation request to create application instance d, it can obtain the fourth information in the aforementioned instance creation request and then persistently store the fourth information.

[0214] It is worth noting that the second information of application instance a and the third information of application instance b are used to indicate whether application instance a and application instance b are at the same level or different levels in the recursive relationship, and the affinity between application instance a and application instance b is affinity.

[0215] It is worth noting that the above-described application instance fusion is only an example of fusion of two application instances. In other embodiments of this application, application instance fusion can also fuse three or more application instances, which is not limited here. For details on fusion of three or more application instances, please refer to the above description of fusion of two application instances, which will not be repeated here.

[0216] It is worth noting that after the cloud management platform merges application instances, the sum of the weights of application instances under the same placement domain is less than or equal to the fifth preset value.

[0217] In one possible embodiment, application instance f (the sixth application instance) is already deployed in resource pool 100. The instance creation request carries fifth information indicating the degree of affinity between application instance a and application instance f. Cloud management platform 110 determines whether application instance a is deployed to the placement domain where application instance f is located based on the degree of affinity between application instance a and application instance f indicated by the fifth information.

[0218] Regarding the cloud management platform 110's determination of whether application instance a is deployed to the placement domain of application instance f based on the affinity between application instance a and application instance f indicated by the fifth information, the above description of determining whether application instance a and application instance b are in the same placement domain based on the affinity between application instance a and application instance b indicated by the first information is provided, and will not be repeated here.

[0219] In one possible embodiment, the contents carried by the instance creation request are described in detail below.

[0220] The instance creation request carries scheduling parameters (resourceplan), which include an identifier for the instance scheduling request (such as name or identity ID) and an instance parameter list (consumerArrays). The instance parameter list is used to define the application instance's pre-defined hardware resource requirements, dependencies, etc.

[0221] In one possible example, the instance parameter list may also include: allocationspec, placementstrategies, mincapacity, and maxcapacity.

[0222] For example, Table 1 below shows what an allocationSpec might include.

[0223] Table 1

[0224] It is worth noting that subconsumerallocationspecs can include the predefined hardware resource requirements and dependencies of child application instances under the root application instance. The allocationspec of the application instance listed in subconsumerallocationspecs indicates that the application instance is a child application instance of the application instance identified as 123.

[0225] It is worth noting that the above content is merely an example and should not be construed as limiting this application. In other embodiments of this application, the aforementioned fusibility is used to indicate that vertical scaling will be used when elastically scaling the application instances shown in Table 1. Fusibility can also be any of the following: horizontal elastic scaling, configurable scaling, partially migratable, etc. The aforementioned resource intensity can also be any of the following: memory intensive, bandwidth intensive, latency sensitive, etc. Scaling ratio can also be any floating-point number or a capacity specification corresponding to a ratio table (different capacity specifications correspond to different ratios), etc. The aforementioned instance identifier 126 is the identifier of the application instance deployed in resource pool 100, and the aforementioned affinity circle can also include latency sensitive, bandwidth intensive, etc. The aforementioned root application instance can also be called root consumer, and the aforementioned child application instance can also be called sub-consumer. The aforementioned affinity circle can also be called affinity degree.

[0226] Here, `configurable` indicates that elastic scaling is performed based on configuration settings, such as adjusting the number of threads, processes, or bandwidth. `partially migratable` indicates that during elastic scaling, one application instance can be partially merged into another application instance.

[0227] For example, Table 2 below shows what placement strategies may include.

[0228] Table 2

[0229] It's worth noting that the `placementdomaintype` mentioned above can also be container, physical machine, rack, data center, Availability Zone (AZ), etc. The numbers 123, 124, and 125 indicate the identifier of the application instance. Table 2 above shows that application instances identified as 123, 124, and 125 will be placed in virtual machines. By setting different placement types through `placementdomaintype`, a multi-level recursive placement domain cluster structure can be achieved. Since a placement strategy can be recursively composed of multiple other placement strategies, `descendantstrategies` is needed to indicate the relationship with other placement strategies. The above `xx` can represent the storage path or name of other placement strategies, or `xx` can be other placement strategies, etc. Furthermore, an application instance can be configured with multiple placement strategies to request various types of resources (such as containers and virtual machines).

[0230] In one possible scenario, after receiving the instance creation request, the cloud management platform 110 will persistently store the resource plan in the instance creation request. Furthermore, when scheduling application instances in resource pool 100, it will retrieve the resource plan from storage to determine the specific scheduling method for the application instances.

[0231] In one possible scenario, the cloud management platform 110 will utilize resourceplan to optimize the continuous scheduling of functional instances.

[0232] Regarding the integration of application instances in resource pool 100 by cloud management platform 110, two possible implementation methods are provided below. The following explanation uses functional instances as an example.

[0233] In the first possible implementation, the cloud management platform 110 obtains the resource fragmentation rate of the resource pool 100. If the resource fragmentation rate is greater than or equal to a threshold, the cloud management platform 110 merges the functional instances deployed in the resource pool 100 to reduce the resource fragmentation rate and improve the resource utilization of the resource pool 100.

[0234] In one possible example, cloud management platform 110 obtains the resource fragmentation rate of resource pool 100 through monitor 114.

[0235] For example, the cloud management platform 110 first synchronizes data between functional instance a and functional instance b, unifying key data (such as configuration files, databases, etc.) of functional instances a and b into an intermediate storage area via shared storage or synchronization tools. Then, based on predetermined hardware resource requirements 1 and 2, it determines the hardware resources required for functional instance c (e.g., predetermined hardware resource requirements 1 + predetermined hardware resource requirements 2), and creates an empty shell template for functional instance c based on the required hardware resources. The aforementioned shared storage is then mounted to functional instance c. The content running on functional instances a and b (such as services, functions, etc.) is migrated to functional instance c, and network redirection is performed.

[0236] For example, cloud management platform 110 can merge a portion of functional instance a with functional instance b.

[0237] In one possible scenario, the fusibility corresponding to functional instance a is the second piece of information, and the fusibility corresponding to functional instance b is the third piece of information. If the fusibility corresponding to functional instance a is the same as the fusibility corresponding to functional instance b, it indicates that functional instance a and functional instance b are compatible.

[0238] In another possible scenario, based on the above scenario, the second and third information work together to indicate that functional instance a and functional instance b are at the same or different levels in the recursive relation, and that the affinity between functional instance a and functional instance b is affinity.

[0239] In the second possible implementation, the cloud management platform 110 obtains an instance fusion request and, in response to the instance fusion request, merges the functional instances deployed in the resource pool 100.

[0240] In one possible example, the instance fusion request is triggered by the user on terminal 120, and then terminal 120 sends the instance fusion request to cloud management platform 110.

[0241] For details on how the cloud management platform 110 obtains instance fusion requests, please refer to the description in S310 above, which will not be repeated here.

[0242] In another possible example, the instance fusion request mentioned above is generated by the cloud management platform 110 on a timed basis.

[0243] For details on this implementation, please refer to the example in the first possible implementation above, which will not be repeated here.

[0244] Regarding the deployment of application instances in resource pool 100, two possible implementation methods are provided below. The following explanation uses a functional application instance as an example.

[0245] In the first possible implementation, the cloud management platform 110 obtains the affinity between the functional instances deployed in the resource pool 100, and then determines whether multiple functional instances are in the same placement domain.

[0246] In one possible example, cloud management platform 110 obtains the affinity between functional instances deployed in resource pool 100, including: cloud management platform 110 obtains resourceplan from storage, and then obtains the affinity between all functional instances in resource pool 100 from resourceplan.

[0247] Taking all functional instances in resource pool 100, including functional instance a, functional instance b, and functional instance c, as an example, the cloud management platform 110 obtains the affinity between each pair of functional instances a, b, and c. For example, functional instance a and b have a strong affinity, functional instance a and c have a negative affinity, and functional instance b and c have a weak affinity. Then, the cloud management platform 110 schedules functional instances a, b, and c according to the aforementioned affinity between each pair of functional instances. For example, functional instance a and b are scheduled (migrated) to the same placement domain (such as the same virtual machine A), and functional instance c is scheduled (migrated) to another placement domain (such as virtual machine B).

[0248] In another possible example, for a new functional instance added to resource pool 100, the functional instance will be deployed based on the affinity between functional instances indicated in the instance creation request.

[0249] In the second possible implementation, the sum of the weights of functional instances deployed in the same placement domain must be less than or equal to a preset value E.

[0250] In one possible example, when adding a new functional instance to resource pool 100, it is necessary to consider that the sum of the weights of functional instances deployed in the same placement domain is less than or equal to a preset value E (such as 100).

[0251] For example, if some placement domains in resource pool 100 already have functional instances, it is necessary to ensure that when a new functional instance is added to resource pool 100, the sum of the weights of functional instances deployed in the same placement domain is less than or equal to a preset value E.

[0252] In another possible example, the cloud management platform 110 continuously optimizes the scheduling of functional instances deployed in the resource pool 100. For example, to reduce the resource fragmentation rate of the resource pool 100, the functional instances are scheduled (migrated, merged, etc.). The scheduled functional instances still need to meet the requirement that the sum of the weights of functional instances deployed in the same placement domain is less than or equal to a preset value E.

[0253] It is worth noting that the weight of the above-mentioned merged functional instance is the sum of the weights of the functional instances that participated in the fusion.

[0254] In the third possible implementation, which is a combination of the first and second possible implementations, the cloud management platform 110 needs to consider the affinity level and the limitation that the sum of the weights of functional instances in the same placement domain is less than or equal to a preset value E when scheduling functional instances.

[0255] It is worth noting that if the affinity between application instances deployed in the resource pool changes, the cloud management platform 110 will migrate the application instances according to the latest affinity between the application instances, so that application instances with strong affinity are deployed to the same placement domain, application instances with negative affinity are deployed to different placement domains, and application instances with weak affinity are preferentially deployed to the same placement domain.

[0256] It is understood that, in order to achieve the functions in the above embodiments, the infrastructure includes the hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps of the various examples described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application scenario and design constraints of the technical solution.

[0257] The resource scheduling method provided by this application has been described in detail above with reference to Figure 3. The resource scheduling device provided by this application will now be described with reference to Figure 4, which is a structural schematic diagram of a resource scheduling device provided by this application. The resource scheduling device 400 can be used to implement the functions of the cloud management platform 110 in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments. In one possible example, the cloud management platform is used to manage a resource pool, and the resource pool is used to deploy application instances.

[0258] As shown in Figure 4, the resource scheduling device 400 includes a first acquisition module 410, a creation module 420, a second acquisition module 430, and a scheduling module 440. This resource scheduling device 400 is used to implement the functions of the cloud management platform 110 in the method embodiment corresponding to Figure 3. In one possible example, the specific process by which the resource scheduling device 400 implements the above-mentioned resource scheduling method includes the following steps:

[0259] The first acquisition module 410 is used to acquire an instance creation request. The instance creation request requests the creation of an application instance with predetermined hardware resource requirements in the resource pool. The instance creation request carries the first predetermined hardware resource requirements of the first application instance and the second predetermined hardware resource requirements of the second application instance, indicating the dependency relationship between the first and second application instances. The creation module 420 is used to create the first application instance and the second application instance in the resource pool according to the instance creation request. The first application instance uses a first hardware resource in the resource pool, which matches the first predetermined hardware resource requirement; the second application instance uses a second hardware resource in the resource pool, which matches the second predetermined hardware resource requirement. The second acquisition module 430 is used to acquire the first usage amount of the first hardware resource by the first application instance and the second usage amount of the second hardware resource by the second application instance. The scheduling module 440 is used to schedule the first application instance and the second application instance according to the relationship between the first usage amount and a first preset value, or the second usage amount and a second preset value.

[0260] For more information on the functions of the first acquisition module 410, the creation module 420, the second acquisition module 430, and the scheduling module 440, please refer to the description of the resource scheduling method above; it will not be repeated here.

[0261] The first acquisition module 410, the creation module 420, the second acquisition module 430, and the scheduling module 440 can all be implemented in software or in hardware. For example, the implementation of the first acquisition module 410 will be described below. Similarly, the implementation of the creation module 420, the second acquisition module 430, and the scheduling module 440 can refer to the implementation of the first acquisition module 410.

[0262] As an example of a software functional unit, the first acquisition module 410 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the aforementioned computing instance may be one or more. For example, the first acquisition module 410 may include code running on multiple hosts / virtual machines / containers.

[0263] It should be noted that the multiple hosts / virtual machines / containers used to run this code can be distributed within the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run this code can be distributed within the same Availability Zone or in different Availability Zones (AZs), each AZ comprising one or more geographically proximate data centers. Typically, a region can include multiple AZs.

[0264] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0265] As an example of a hardware functional unit, the first acquisition module 410 may include at least one computing device, such as a server. Alternatively, the first acquisition module 410 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0266] The multiple computing devices included in the first acquisition module 410 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the first acquisition module 410 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the first acquisition module 410 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0267] It should be noted that, in other embodiments, the first acquisition module 410, the creation module 420, the second acquisition module 430, and the scheduling module 440 can all execute any step in the resource scheduling method. The steps implemented by the first acquisition module 410, the creation module 420, the second acquisition module 430, and the scheduling module 440 can be specified as needed. Each of these modules implements different steps in the resource scheduling method to achieve all the functions of the cloud management platform 110.

[0268] It is worth noting that the cloud management platform 110 in the aforementioned embodiment can correspond to the resource scheduling device 400, and can correspond to the corresponding subject that executes the method according to the embodiment of this application in FIG3. The operation and / or function of each module in the resource scheduling device 400 are respectively to implement the corresponding process of each method in the corresponding embodiment in FIG3. For the sake of brevity, they will not be described in detail here.

[0269] Alternatively, the resource scheduling device 400 shown in Figure 4 can also be implemented using a communication device, which can refer to the cloud management platform 110 in the aforementioned embodiment. When the communication device is a chip or chip system applied to a processing device, the resource scheduling device 400 can also be implemented using a chip or chip system.

[0270] This application embodiment also provides a chip system, which includes a control circuit and an interface circuit. The interface circuit is used to obtain a first request, and the control circuit is used to implement the functions of the cloud management platform 110 in the above method according to the first request.

[0271] In one possible design, the chip system also includes a memory for storing program instructions and / or data. This chip system can be composed of chips or may include chips and other discrete components.

[0272] This application also provides a computing device. Please refer to FIG5, which is a schematic diagram of the structure of a computing device provided in this application. The computing device 500 includes a bus 502, a processor 504, a memory 506, and a communication interface 508. The processor 504, memory 506, and communication interface 508 are interconnected via the bus 502. The computing device 500 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 500. For example, the computing device 500 can be a computing device included in a resource pool.

[0273] Bus 502 can be a PCIe bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in Figure 5, but this does not imply that there is only one bus or one type of bus. Bus 502 can include pathways for transmitting information between various components of computing device 500 (e.g., processor 504, memory 506, communication interface 508).

[0274] Processor 504 may include any one or more processors such as CPU, graphics processing unit (GPU), FPGA, microprocessor (MP), or digital signal processor (DSP).

[0275] Memory 506 may include volatile memory, such as random access memory (RAM). Processor 504 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard-disk drive (HDD), or solid-state drive (SSD).

[0276] The memory 506 stores executable program code, which the processor 504 executes to implement the functions of the aforementioned first acquisition module 410, creation module 420, second acquisition module 430, and scheduling module 440, thereby realizing the resource scheduling method. In other words, the memory 506 stores instructions for executing the resource scheduling method.

[0277] The communication interface 508 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 500 and other devices or communication networks. The computing device 500 can be a computer (e.g., a server) in a cloud data center, a computer in an edge data center, or a terminal.

[0278] This application also provides a computing device cluster. The computing device cluster includes at least one computing device, which can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone. For example, the computing device cluster can be the aforementioned cloud management platform 110.

[0279] Figure 6 is a schematic diagram of a computing device cluster provided in this application. The computing device cluster includes at least one computing device 500. The memory 506 of one or more computing devices 500 in the computing device cluster may store the same instructions for executing resource scheduling methods. For example, a resource pool may include the computing device cluster shown in Figure 6.

[0280] In some possible implementations, the memory 506 of one or more computing devices 500 in the computing device cluster may also store partial instructions for executing the resource scheduling method. In other words, a combination of one or more computing devices 500 can jointly execute the instructions for executing the resource scheduling method.

[0281] It should be noted that the memory 506 in different computing devices 500 within the computing device cluster can store different instructions, each used to execute a portion of the resource scheduling method's functions. That is, the instructions stored in the memory 506 of different computing devices 500 can implement the functions of one or more modules among the first acquisition module 410, the creation module 420, the second acquisition module 430, and the scheduling module 440.

[0282] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN). Figure 7 illustrates one possible implementation. As shown in Figure 7, this application provides a schematic diagram of the connection between computing devices, where two computing devices 500A and 500B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this type of possible implementation, the memory 506 in computing device 500A stores instructions for executing the functions of the first acquisition module 410 and the second acquisition module 430. Simultaneously, the memory 506 in computing device 500B stores instructions for executing the functions of the creation module 420 and the scheduling module 440.

[0283] It should be understood that the functions of computing device 500A shown in Figure 7 can also be performed by multiple computing devices 500. Similarly, the functions of computing device 500B can also be performed by multiple computing devices 500.

[0284] This application also provides a computer program product containing instructions. This computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any available medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to perform the resource scheduling method described above.

[0285] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a resource scheduling method.

[0286] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a DVD; or it can be a semiconductor medium, such as an SSD.

[0287] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A resource scheduling method, characterized in that, The method is applied to a cloud management platform, which manages a resource pool and deploys application instances. The method includes: Obtain an instance creation request; the instance creation request is used to request the creation of an application instance with predetermined hardware resource requirements in the resource pool. The instance creation request carries the first predetermined hardware resource requirements of the first application instance and the second predetermined hardware resource requirements of the second application instance. The instance creation request indicates the dependency relationship between the first application instance and the second application instance. Based on the instance creation request, the first application instance and the second application instance are created in the resource pool; the first application instance uses the first hardware resource in the resource pool, which matches the first predetermined hardware resource requirement; the second application instance uses the second hardware resource in the resource pool, which matches the second predetermined hardware resource requirement. Obtain the first usage of the first hardware resource by the first application instance and the second usage of the second hardware resource by the second application instance; The first application instance and the second application instance are scheduled based on the relationship between the first usage and the first preset value, or the second usage and the second preset value.

2. The method according to claim 1, characterized in that, The step of scheduling the first application instance and the second application instance based on the relationship between the first usage and the first preset value, or the second usage and the second preset value, includes: If the first usage is greater than or equal to the first preset value, or if the second usage is greater than or equal to the second preset value, the capacity of the first application instance and the second application instance shall be expanded.

3. The method according to claim 2, characterized in that, The ratio of the difference between the hardware resources occupied by the first application instance after expansion and the first hardware resources to the difference between the hardware resources occupied by the second application instance after expansion and the second hardware resources is a third preset value.

4. The method according to claim 1, characterized in that, The step of scheduling the first application instance and the second application instance based on the relationship between the first usage and the first preset value, or the second usage and the second preset value, includes: If the first usage is less than the first preset value, or the second usage is less than the second preset value, the first application instance and the second application instance are scaled down.

5. The method according to claim 4, characterized in that, The ratio of the difference between the hardware resources occupied by the first application instance after scaling down and the first hardware resources to the difference between the hardware resources occupied by the second application instance after scaling down and the second hardware resources is a fourth preset value.

6. The method according to any one of claims 1 to 5, characterized in that, The dependency relationship between the first application instance and the second application instance is used to indicate that the first application instance and the second application instance are used to implement the same service.

7. The method according to any one of claims 1 to 6, characterized in that, The dependency relationship between the first application instance and the second application instance is used to indicate that the first application instance and the second application instance are at the same level or different levels in the recursive relationship of multiple application instances, the multiple application instances including the first application instance and the second application instance, and the multiple application instances are used to implement the same service.

8. The method according to any one of claims 1 to 7, characterized in that, The instance creation request carries first information indicating the degree of affinity between the first application instance and the second application instance; based on the degree of affinity between the first application instance and the second application instance indicated by the first information, it is determined whether the first application instance and the second application instance are in the same placement domain.

9. The method according to any one of claims 1 to 8, characterized in that, The instance creation request carries the weight of the application instance, which is used to indicate the importance of the application instance. The sum of the weights of application instances in the same placement domain in the resource pool is less than or equal to a fifth preset value.

10. The method according to claim 8 or 9, characterized in that, The placement domain is used to indicate any of the following: container, virtual machine, physical machine, rack, data center, availability zone (AZ).

11. The method according to any one of claims 8 to 10, characterized in that, The first application instance and the second application instance are located in the placement domain included in the preheating resource pool, which is used to preheat the first application instance and the second application instance.

12. The method according to any one of claims 1 to 11, characterized in that, The instance creation request carries second information of the first application instance and third information of the second application instance; if the second information is used to indicate that the first application instance is fusionable, and the third information is used to indicate that the second application instance is fusionable, then the first application instance and the second application instance are fused to obtain a third application instance.

13. The method according to claim 12, characterized in that, The resource pool contains a fourth application instance, and the cloud management platform manages the fourth information of the fourth application instance. If the fourth information is used to indicate that the fourth application instance is fusionable, then the third application instance and the fourth application instance are fused to obtain a fifth application instance.

14. The method according to any one of claims 1 to 13, characterized in that, The resource pool contains a sixth application instance. The instance creation request carries fifth information indicating the affinity between the first application instance and the sixth application instance. Based on the affinity between the first application instance and the sixth application instance indicated by the fifth information, it is determined whether the first application instance is deployed to the placement domain where the sixth application instance is located.

15. The method according to any one of claims 1 to 14, characterized in that, The application example described is a functional example.

16. A resource scheduling device, characterized in that, The device includes: The first acquisition module is used to acquire an instance creation request; the instance creation request is used to request the creation of an application instance with predetermined hardware resource requirements in the resource pool; the instance creation request carries the first predetermined hardware resource requirements of the first application instance and the second predetermined hardware resource requirements of the second application instance; the instance creation request indicates the dependency relationship between the first application instance and the second application instance; the resource pool is managed by the cloud management platform. A creation module is used to create the first application instance and the second application instance in the resource pool according to the instance creation request; the first application instance uses the first hardware resource in the resource pool, the first hardware resource matches the first predetermined hardware resource requirement, and the second application instance uses the second hardware resource in the resource pool, the second hardware resource matches the second predetermined hardware resource requirement. The second acquisition module is used to acquire the first usage of the first hardware resource by the first application instance and the second usage of the second hardware resource by the second application instance. The scheduling module is used to schedule the first application instance and the second application instance according to the relationship between the first usage and the first preset value, or the second usage and the second preset value.

17. The apparatus according to claim 16, characterized in that, The scheduling module is specifically used to expand the capacity of the first application instance and the second application instance if the first usage is greater than or equal to a first preset value, or if the second usage is greater than or equal to a second preset value.

18. The apparatus according to claim 17, characterized in that, The ratio of the difference between the hardware resources occupied by the first application instance after expansion and the first hardware resources to the difference between the hardware resources occupied by the second application instance after expansion and the second hardware resources is a third preset value.

19. The apparatus according to claim 16, characterized in that, The scheduling module is specifically used to reduce the size of the first application instance and the second application instance if the first usage is less than a first preset value, or if the second usage is less than a second preset value.

20. The apparatus according to claim 19, characterized in that, The ratio of the difference between the hardware resources occupied by the first application instance after scaling down and the first hardware resources to the difference between the hardware resources occupied by the second application instance after scaling down and the second hardware resources is a fourth preset value.

21. The apparatus according to any one of claims 16 to 20, characterized in that, The dependency relationship between the first application instance and the second application instance is used to indicate that the first application instance and the second application instance are used to implement the same service.

22. The apparatus according to any one of claims 16 to 21, characterized in that, The dependency relationship between the first application instance and the second application instance is used to indicate that the first application instance and the second application instance are at the same level or different levels in the recursive relationship of multiple application instances, the multiple application instances including the first application instance and the second application instance, and the multiple application instances are used to implement the same service.

23. The apparatus according to any one of claims 16 to 22, characterized in that, The instance creation request carries first information indicating the degree of affinity between the first application instance and the second application instance; based on the degree of affinity between the first application instance and the second application instance indicated by the first information, it is determined whether the first application instance and the second application instance are in the same placement domain.

24. The apparatus according to any one of claims 16 to 23, characterized in that, The instance creation request carries the weight of the application instance, which is used to indicate the importance of the application instance. The sum of the weights of application instances in the same placement domain in the resource pool is less than or equal to a fifth preset value.

25. The apparatus according to claim 23 or 24, characterized in that, The placement domain is used to indicate any of the following: container, virtual machine, physical machine, rack, computing device, data center, availability zone (AZ).

26. The apparatus according to any one of claims 23 to 25, characterized in that, The first application instance and the second application instance are located in the placement domain included in the preheating resource pool, which is used to preheat the first application instance and the second application instance.

27. The apparatus according to any one of claims 16 to 26, characterized in that, The instance creation request carries second information of the first application instance and third information of the second application instance; if the second information is used to indicate that the first application instance is fusionable, and the third information is used to indicate that the second application instance is fusionable, then the first application instance and the second application instance are fused to obtain a third application instance.

28. The apparatus according to claim 27, characterized in that, The resource pool contains a fourth application instance, and the cloud management platform manages the fourth information of the fourth application instance. If the fourth information is used to indicate that the fourth application instance is fusionable, then the third application instance and the fourth application instance are fused to obtain a fifth application instance.

29. The apparatus according to any one of claims 16 to 28, characterized in that, The resource pool contains a sixth application instance. The instance creation request carries fifth information indicating the affinity between the first application instance and the sixth application instance. Based on the affinity between the first application instance and the sixth application instance indicated by the fifth information, it is determined whether the first application instance is deployed to the placement domain where the sixth application instance is located.

30. The apparatus according to any one of claims 16 to 29, characterized in that, The application example described is a functional example.

31. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and 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 to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 15.

32. A computer-readable storage medium, characterized in that, The storage medium stores a computer program or instructions, which, when executed by a computing device, implement the method of any one of claims 1 to 15.

33. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a computing device, the method of any one of claims 1 to 15 is implemented.