Instance scheduling method, system, cluster, and computer-readable storage medium
By adding instance type adjustment conditions to the cloud management platform, instance specifications can be dynamically adjusted, changing instances with fixed specifications into adjustable instances. This solves the problem of low resource utilization in the cloud platform and achieves efficient resource utilization and energy conservation and emission reduction.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-04-02
AI Technical Summary
When instance specifications are fixed in a cloud platform, resource utilization is low, leading to resource waste and an inability to effectively match the actual load requirements of the business.
By adding instance type adjustment conditions to the cloud management platform, instance specifications can be dynamically adjusted, changing the first type of instance with fixed specifications to the second type of instance with adjustable specifications. Information migration is carried out using a flexible instance pool to ensure successful instance type change.
It improved resource utilization, reduced resource waste, enhanced the allocation efficiency of host physical resources, saved power consumption, and achieved environmental benefits.
Smart Images

Figure CN2025092516_02042026_PF_FP_ABST
Abstract
Description
Instance scheduling method, system, cluster, computer readable storage medium
[0001] The present application claims priority to the Chinese patent application No. 202411375377.5, filed on September 29, 2024, and entitled "Instance scheduling method, system, cluster, computer readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of computer, more particularly, to an instance scheduling method, system, cluster, computer readable storage medium. BACKGROUND
[0003] With the rise of public cloud technology, the scale of data centers managed by cloud operators also gradually increases. The number of servers in a data center managed by a cloud operator can be as high as 100,000 or even 1,000,000. In order to guarantee the running quality of instances running on servers of tenants and avoid idle resources running due to excessive resource supply, cloud platforms can achieve resource allocation by applying elastic scaling technology. Specifically, the cloud platform dynamically adjusts the number of instances according to the demand of the business load of the tenant, so that when the business of the tenant grows, the application system can be scaled up to meet the business demand, and when the business decreases, the application system can be scaled down to avoid resource waste caused by idle resources running due to excessive resource supply.
[0004] However, the instance specification created by the cloud platform is fixed, and in the application system scaling down implementation, the cloud platform can only reduce the number of instances in the cloud platform according to the demand of the business load of the tenant, and the resources occupied by each instance in the cloud platform do not match the actual load demand of the business, resulting in resource waste. SUMMARY
[0005] The embodiments of the present application provide an instance scheduling method, system, cluster, and computer readable storage medium to guarantee the adaptability between the resource specification of the instance and the actual load demand of the business in the elastic scaling implementation and reduce resource waste.
[0006] In a first aspect, the present application provides an instance scheduling method applied to a cloud management platform running a first type of instance with fixed specification. In the elastic scaling implementation, the cloud management platform obtains a first running parameter of a first type of instance running a target business. When the running parameter of the first type of instance meets the scaling down demand and meets the instance type adjustment condition, the cloud management platform changes the running first type of instance to a second type of instance, and the target business is run by the second type of instance.
[0007] Based on the first aspect, in the elastic scaling implementation, when the running parameter of the first type instance meets the instance type adjustment condition, the running first type instance is changed to a second type instance. In this way, in the scaling process, the instance type adjustment condition is added. For the instance that meets the type change condition, the first type instance with fixed specifications is changed to the second type instance with adjustable specifications through instance type change, so that the specifications of the instance can be adjusted based on the actual load of the business, and the resource utilization is improved.
[0008] In an optional implementation, changing the first type instance to the second type instance is specifically implemented as follows: the cloud management platform creates the second type instance according to a target specification, and migrates information in the first type instance to the second type instance. The target specification is determined based on the specification of the first type instance; the second type instance supports a number of vCPUs that is less than or equal to the number of vCPUs of the first type instance, and the size of the second type instance is less than or equal to the size of the first type instance.
[0009] Based on this optional implementation, the second type instance is created, and the information in the first type instance is migrated to the second type instance in the manner of instance migration. The target business is run by the second type instance. In this way, the instance type can be changed without interrupting the business.
[0010] In an optional implementation, it is specifically implemented as follows: the cloud management platform further includes a resource pool running with flexible instances. In the implementation of changing the first type instance to the second type instance, the cloud management platform creates the second type instance according to the target specification in the resource pool, and migrates the information in the first type instance to the second type instance.
[0011] Based on this optional implementation, the second type instance is deployed in the resource pool, and the information in the first type instance is migrated to the second type instance in the manner of instance migration, to realize the change of the instance type. In this way, the resource pool running with flexible instances is used to ensure the success of the change of the instance type.
[0012] In an optional implementation, it is specifically implemented as follows: after the first type instance is changed to the second type instance, the cloud management platform obtains a second running parameter of the second type instance. According to the second running parameter, the specification of the second type instance is adjusted. The number of vCPUs supported by the adjusted second type instance is less than or equal to the number of vCPUs of the first type instance, and the size of the adjusted second type instance is less than or equal to the size of the first type instance.
[0013] Based on the optional implementation, after the instance type is changed, the specification of the second type of instance can be dynamically adjusted according to the second running parameter. The flexible scheduling of the specification of the second type of instance enables the physical resources of the host to be better allocated, improves the resource utilization of the host, saves the consumption of electric energy of the cloud management platform, and produces environmental benefits.
[0014] In an optional implementation, the cloud management platform provides a first interface, and the cloud management platform obtains the instance type adjustment condition in response to a first operation of the tenant on the first interface. The first interface includes an instance type adjustment condition input box.
[0015] In this way, the tenant configures the instance type adjustment condition, thereby ensuring the adaptability between the resource specification of the instance and the actual load demand of the business and reducing resource waste.
[0016] In an optional implementation, the cloud management platform further stores a quantity threshold of the first type of instance, and the cloud management platform performs the operation of judging whether the first running parameter meets the instance type adjustment condition in a case where the quantity threshold is greater than or equal to the quantity of the first type of instance.
[0017] In this way, by comparing the quantity threshold, in a case where the first type of instance meets the quantity threshold, it is judged whether to perform the instance type adjustment operation, thereby ensuring the adaptability between the resource specification of the instance and the actual load demand of the business and realizing effective use of instance resources.
[0018] In an optional implementation, the cloud management platform reduces the quantity of the first type of instance in a case where the quantity threshold is less than the quantity of the first type of instance.
[0019] In this way, in a case where the first type of instance does not meet the quantity threshold, the problem of resource waste is alleviated through the scaling-down processing.
[0020] In an optional implementation, the cloud management platform further stores an allowed degradation ratio. The allowed degradation ratio is used to judge whether to increase the quantity of the first type of instance.
[0021] In this way, by identifying the scaling-up demand, it is ensured that the quantity of the first type of instance can be timely increased in a case where the existing quantity of the first type of instance is insufficient, the pressure on the host is reduced, and the stability of the business on the cloud management platform is ensured.
[0022] In a second aspect, the present application provides an instance scheduling system. The instance scheduling system includes a scaling management module and a resource management module.
[0023] The scaling management module is configured to acquire a first running parameter of a first type of instance with fixed specifications running in the cluster, determine whether the first running parameter meets an instance type adjustment condition if the first running parameter meets a scaling demand, and send a first instruction to the resource management module if the first running parameter meets the instance type adjustment condition; the scaling demand includes one or more of a quality of service (QoS) guarantee demand and a threshold of resource utilization; the instance type adjustment condition includes a threshold of CPU utilization and a duration; the duration is used to indicate a duration of running the first type of instance with the CPU utilization.
[0024] The resource management module is configured to change the first type of instance to a second type of instance with specifications supporting adjustment in response to the first instruction.
[0025] In a third aspect, the present application provides a cloud management platform, and the cloud management platform runs a first type of instance with fixed specifications. The cloud management platform is configured to execute the method provided in the first aspect or any of the optional implementation manners of the first aspect.
[0026] In a fourth aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device. Each computing device includes a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method in the first aspect or any of the optional implementation manners of the first aspect.
[0027] In a fifth aspect, the present application provides a computer program product including instructions, and the instructions are configured to make the computing device cluster execute the method in the first aspect or any of the optional implementation manners of the first aspect when the instructions are executed by the computing device cluster.
[0028] In a sixth aspect, the present application provides a computer readable storage medium including computer program instructions, and the computer program instructions are configured to make the computing device cluster execute the instructions in the computer program stored in the computer readable storage medium to execute the method in the first aspect or any of the optional implementation manners of the first aspect when the computer program instructions are executed by the computing device cluster.
[0029] The technical effects brought by any of the implementation manners of the second aspect to the sixth aspect can be referred to the technical effects brought by the first aspect or any of the optional implementation manners of the first aspect. Details are not described herein. The implementation manners of the above aspects can be further combined to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS
[0030] FIG. 1 is a flowchart of an elastic scaling implementation;
[0031] FIG. 2 is a structural schematic diagram of a computer system according to an embodiment of the present application;
[0032] FIG. 3 is a flowchart of an example scheduling method according to an embodiment of the present application;
[0033] FIG. 4A is a schematic diagram of an interface for configuring an elastic scaling policy according to an embodiment of the present application;
[0034] FIG. 4B is a schematic diagram of an interface for configuring an elastic scaling policy according to an embodiment of the present application;
[0035] FIG. 4C is a schematic diagram of an interface for configuring an elastic scaling policy according to an embodiment of the present application;
[0036] FIG. 5 is a flowchart of an example scheduling method according to an embodiment of the present application;
[0037] FIG. 6 is a flowchart of changing an instance type of a cluster 110 according to an embodiment of the present application;
[0038] FIG. 7A is a flowchart of dynamically adjusting an instance specification according to an embodiment of the present application;
[0039] FIG. 7B is a flowchart of dynamically adjusting an instance specification according to an embodiment of the present application;
[0040] FIG. 8 is a flowchart of an example scheduling method according to an embodiment of the present application;
[0041] FIG. 9 is a flowchart of an example scheduling method according to an embodiment of the present application;
[0042] FIG. 10 is a structural schematic diagram of an example scheduling system 90 according to an embodiment of the present application;
[0043] FIG. 11 is a structural schematic diagram of a cloud management platform according to an embodiment of the present application;
[0044] FIG. 12 is a structural schematic diagram of a cluster of computing devices according to an embodiment of the present application;
[0045] FIG. 13 is a schematic diagram of network connections between computing devices in a cluster of computing devices according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] Currently, in the implementation of elastic scaling, the number of instances is mainly reduced according to the demand of the business load of the tenant. As shown in FIG. 1, FIG. 1 is a schematic diagram of an implementation flow of elastic scaling. As shown in FIG. 1, a cloud platform is deployed with a cloud management platform and a host group. The host group includes a plurality of hosts, and each host runs at least one instance. As shown in FIG. 1, the host group includes host 1, host 2 and host 3. Host 1 runs instance 1, host 2 runs instance 2, and host 3 runs instance 3. The specifications of instances 1, 2 and 3 are fixed.
[0047] The cloud management platform is configured to provide an elastic scaling service, assign tasks to instances 1, 2 and 3, obtain the running parameters of the instances and the running parameters of the hosts on which the instances are located. As shown in FIG. 1, the cloud management platform performs scaling control, running parameter acquisition and task assignment on host 1, host 2 and host 3 in the host group.
[0048] In the implementation of elastic scaling, the cloud management platform obtains the running parameters of the instances. In a case where the running parameters of the instances meet a preset scaling condition, the cloud management platform creates a new instance 4 (not shown in FIG. 1) in the host group. For example, a new instance 4 is added to host 3. Or, for example, a host 4 is added to the host group, and instance 4 is created on host 4. After adding instance 4, the cloud management platform reassigns tasks to instances 1, 2, 3 and 4.
[0049] In the implementation of elastic scaling, in a case where the running parameters of the instances meet a preset scaling condition, the cloud management platform reduces the number of instances in the host group. For example, instance 3 is removed from the host group. After removing instance 3, the cloud management platform reassigns tasks to instances 1 and 2.
[0050] For example, host 1 (32U, 64GB) runs a rigid instance 1 (32vU, 64GB), and the resource utilization rate of rigid instance 1 (32vU, 64GB) is 19%. For a rigid instance, since its size is fixed, the virtual resources allocated to the rigid instance cannot be allocated to other instances or used to create new instances even if they are not fully used by the rigid instance. Although there is about 81% of virtual resources on host 1 that is actually not used (low resource utilization), the cloud management platform will not allocate new instances to host 1 or migrate instances to host 1 because the virtual resources on host 1 are already fully occupied (high resource occupancy). As a result, resources are wasted.
[0051] As can be seen from FIG. 1, in the implementation of elastic scaling, since the specifications of the instances are fixed, the number of instances can only be reduced according to the demand of the business load of the tenant, resulting in resource waste.
[0052] Based on this, in order to ensure the adaptability between the resource specification of the instance and the actual load demand of the business, and reduce resource waste. The embodiment of the application provides an instance scheduling method, in the elastic scaling implementation, an instance type adjustment condition is added. For the instance meeting the type change condition, the first type instance with fixed specification is changed to the second type instance with adjustable specification through instance type change, so that the specification of the instance can be adjusted based on the actual load of the business, and the resource utilization rate is improved.
[0053] Specifically, the first type instance with fixed specification is running in the cloud management platform. The cloud management platform stores the scaling demand and the instance type adjustment condition. In the elastic scaling implementation, the cloud management platform acquires the first running parameter of the first type instance running the target business, and judges whether the first running parameter meets the scaling demand. In the case that the first running parameter meets the scaling demand, the cloud management platform judges whether the first running parameter meets the instance type adjustment condition. And in the case that the first running parameter of the first type instance meets the instance type adjustment condition, the cloud management platform changes the first type instance to the second type instance, and the target business is run by the second type instance.
[0054] In order to facilitate understanding of the scheme provided by the application, first, the technical terms related to the application are introduced.
[0055] Elastic scaling: refers to an automatic resource management strategy in a cloud computing environment. Through elastic scaling, the number of instances executing a business can be automatically adjusted according to the load demand of the business.
[0056] According to different adjustment modes of the number of instances, the elastic scaling is divided into scaling processing and scaling processing.
[0057] Among them, the scaling processing: also can be called instance scaling processing. The scaling processing refers to automatically increasing the number of instances executing a business according to the load demand of the business.
[0058] Scaling processing: also can be called instance scaling processing, scaling processing. The scaling processing refers to automatically reducing the number of instances executing a business according to the load demand of the business.
[0059] Cloud computing environment: an entity for providing cloud services to users by utilizing basic resources in a cloud computing mode. The cloud environment includes a cloud data center and a cloud service platform.
[0060] Among them, the cloud data center includes a large number of basic resources (including computing clusters, storage resources and network resources) owned by cloud service providers. In this paper, the cloud data center can also be called a cloud management platform, a cloud computing platform, etc.
[0061] Host: A physical server deployed in a cloud management platform. The physical resources of a host include physical central processing units (CPUs) and memory devices. Virtualization software runs on each host, which virtualizes part of the physical resources into virtual resources for instances to use. For example, the virtualization software virtualizes CPUs into virtual CPUs (vCPUs). In the following and the accompanying drawings, CPUs are abbreviated as Us and vCPUs are abbreviated as vUs. There are also memory channels, cache channels, caches, network input output (IO) bandwidths, storage IO bandwidths, and other resources on a host for instances running on the host to share.
[0062] Instance: A compute node running on a host. Common instances include virtual machines (VMs) or containers. Each instance occupies part or all of the virtual resources of a host. The specification configuration of an instance includes an instance type (also referred to as a flavor) and a specification of the instance.
[0063] An instance type indicates the resource characteristics of an instance. For example, an economy instance uses a relatively cheap CPU, occupies relatively low computing resources, and has a relatively low cost; a compute- enhanced instance uses a high-performance CPU, occupies sufficient computing resources, and has a relatively high cost; a network-enhanced instance occupies sufficient network resources, for example, is configured with a high IO bandwidth, and has a higher cost than an economy instance. Different instance types represent the resource requirements of a tenant for the business running on a flexible instance.
[0064] The specification of an instance, which can also be referred to as the size of an instance, is used to indicate the amount of resources occupied by an instance.
[0065] Specification: includes the number of vCPUs and the size of memory (in gigabytes (GB)).
[0066] Alternatively, specification: includes the number of vCPUs, the size of memory, the memory bandwidth, the network bandwidth, the number of graphics processing units (GPUs), the size of non-volatile storage devices (generally high-speed storage media, such as solid state drives (SSDs), NVMe SSDs), and the like. In this article, the specification of an instance includes the number of vCPUs and the size of memory (in gigabytes (GB)).
[0067] Depending on whether the virtual resources occupied by an instance change during its life cycle, an instance is classified as a rigid instance or a flexible instance. In this article, a rigid instance can also be referred to as a first-type instance. A flexible instance can also be referred to as a second-type instance.
[0068] Rigid instance: refers to an instance whose specification remains unchanged during its lifecycle. For example, a rigid instance is specified with a size of 16vU, 32GB at creation, and the size remains 16vU, 32GB during its lifecycle until its lifecycle ends, and the resources occupied by the rigid instance are released.
[0069] Flexible instance: refers to an instance whose specification is variable during its lifecycle, i.e., a specification-adjustable instance. For example, a flexible instance is specified with a size of 16vU, 32GB (maximum specification) at creation, and the specification can be adjusted during its lifecycle, with the maximum specification being 16vU, 32GB and the minimum size being defined according to preset rules, e.g., 1vU, 2GB.
[0070] In the following, the specification of a flexible instance can refer to the actual resources occupied by the flexible instance at a certain moment or time period. Since the specification of a flexible instance can be adjusted during the lifecycle of the flexible instance, the specification of a flexible instance mentioned in this application includes the specifications of the flexible instance at different time periods.
[0071] Running parameter: includes but is not limited to one or more of resource utilization, specification, quality of service (QoS) parameter, QoS parameter degradation ratio, QoS parameter degradation duration.
[0072] Expansion demand: used to indicate a trigger condition for expansion processing. In an optional implementation, the expansion demand can include one or more of the following: allowed degradation ratio, QoS parameter threshold.
[0073] Shrinkage demand: used to indicate a trigger condition for shrinkage processing. In an optional implementation, the shrinkage demand can include one or more of the following: threshold of resource utilization, QoS guarantee demand.
[0074] Instance type adjustment condition: used to indicate a trigger condition for triggering instance type change. In an optional implementation, the instance type adjustment condition can include duration, CPU utilization, disk usage, etc.
[0075] The duration can refer to the duration during which the instance runs with CPU utilization.
[0076] The CPU utilization can be the average CPU utilization, the instantaneous CPU utilization, or the maximum CPU utilization, etc. This application does not limit it.
[0077] Resource utilization: the utilization of physical resources / virtual resources of a host / instance at a certain time or in a certain time period. The resource utilization of a host / instance can be calculated by CPU utilization, memory utilization, etc.
[0078] QoS parameter: used to indicate the running condition of an instance. The QoS parameter includes one or more of the following: packet per second (PPS), request response success rate, input output per second (IOPS), various types of latency (e.g., network latency, service response latency), network bandwidth, and storage bandwidth.
[0079] The QoS guarantee requirement includes any one or more of the following configuration items: allowed degradation ratio, duration requirement, etc. Generally, the QoS guarantee requirement at least includes the duration requirement.
[0080] Allowed degradation ratio: the degradation ratio of the minimum QoS parameter of an instance relative to the maximum QoS parameter of the instance. For example, the specification of an instance is 16vU, 32GB, and the allowed degradation ratio is 20%, then the actual running QoS parameter of the instance is at least 80% of the QoS parameter of the instance during the running process.
[0081] Duration requirement: the duration during which the ratio of the actual running QoS parameter of the instance to the maximum QoS parameter of the instance is lower than the allowed degradation ratio (if the allowed degradation ratio is not specified or the QoS guarantee requirement does not include the allowed degradation ratio, the value here is 100%).
[0082] It can be understood that the lower the duration requirement is, the higher the stability of the actual running QoS parameter of the instance is, and the performance is more guaranteed. On the contrary, the higher the duration requirement is, the higher the tolerance of the tenant to the decrease of the actual running QoS parameter of the instance is.
[0083] Next, the instance scheduling method provided by the present application will be described in detail in combination with the accompanying drawings.
[0084] First, referring to FIG. 2, FIG. 2 is a structural schematic diagram of a computer system provided by the present application. As shown in FIG. 2, the computer system includes a client 20, a cloud service platform 30, and a cloud management platform 10.
[0085] In a first optional implementation, the client 20 can be a computer running an application, which can be a physical machine or a virtual machine. For example, if the computer running the application is a physical computing device, the physical computing device can be a host or a terminal. The terminal can also be referred to as a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a desktop computer, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form of the client 20.
[0086] In a second optional implementation, the client 20 can be an application, such as a cloud computer application. Alternatively, the client 20 can be a web client. The client 20 runs on a terminal device. The terminal device includes, but is not limited to, a mobile phone terminal, a tablet computer, a personal computer, a notebook computer, etc.
[0087] It should be noted that the above two implementations are only different implementations of the client 20. In actual applications, the client 20 can also have other implementations, for example, the client 20 can be a software module running on any one or more hosts in the computing cluster 110. The present application does not limit this.
[0088] In an optional implementation, the cloud management platform 10 is deployed with a resource management system 120.
[0089] In some embodiments, the resource management system 120 can be independently deployed in an instance of the cloud management platform 10. Alternatively, the resource management system 120 can be distributedly deployed in multiple instances of the cloud management platform 10.
[0090] As shown in FIG. 2, the resource management system 120 is abstracted by the cloud service provider into a cloud service provided to users on the cloud service platform 30. After the user purchases the cloud service on the cloud service platform 30 through the client 20 (which can be pre-recharged and then settled according to the use of the final resource), the cloud environment provides the cloud service to the user by using the resource management system 120 deployed on the cloud management platform 10. When using the cloud service, the user can determine the task to be executed and upload data to the cloud environment through the application program interface (API) or graphical user interface (GUI) in the client 20. The resource management system 120 in the cloud environment receives the task information and data of the user, performs data processing and executes the corresponding task, and obtains the processing result. The resource management system 120 stores the execution result of the task or the state information in the process of execution of the task in the memory of the user through the API or the GUI. The task includes but is not limited to an AI model training task, an AI recognition task, a content generation task, instance scheduling, data analysis services, etc. The present application does not limit the implementation of the task.
[0091] In addition, in other embodiments, the functions of the resource management system 120 can be completed by the cloud management platform 10 or other components of the cloud management platform 10, and the present application does not limit the implementation of the functions.
[0092] In an optional implementation, as shown in FIG. 2, the cloud management platform 10 further includes a cluster 110.
[0093] The cluster 110 refers to a collection of computers connected by a local area network or the Internet, which includes a plurality of hosts. As shown in FIG. 2, the cluster 110 includes a host 111 and a host 112, the host 111 runs a rigid instance 1, and the host 112 runs a rigid instance 2.
[0094] The cluster 110 is usually used to execute large tasks (also referred to as jobs). The job here is usually a large task that needs to be processed in parallel by a large number of computing resources, and the present embodiment does not limit the nature and number of the job. A job can include a plurality of computing tasks, which can be assigned to a plurality of computing resources for execution. Most tasks are executed concurrently or in parallel, while some tasks need to rely on the data generated by other tasks. Each computing device in the computing cluster 110 uses the same hardware and the same operating system; different hardware and different operating systems can also be used in the hosts of the computing cluster 110 according to business needs. Since the tasks deployed by using the computing cluster 110 can be executed concurrently, the overall performance can be improved.
[0095] The resource management system 120 establishes a communication connection with each host, collects and manages the running parameters of each host and the running parameters of the existing instances running on the host. The resource management system 120 is also responsible for instance scheduling, including the allocation of new instances, the migration of existing instances, and the change of the instance type of the existing instances.
[0096] In an optional implementation, the change of the instance type of the existing instance includes multiple implementations. For example, in the case of changing from a rigid instance to a flexible instance, the change of the instance type of the existing instance includes at least the following two implementations:
[0097] In a first implementation, a new flexible instance is created, and the existing instance in the cluster 110 is migrated to the new flexible instance.
[0098] In a second implementation, the running of the existing instance in the cluster 110 is suspended, and after the existing instance is suspended, the instance type of the existing instance is changed to a flexible instance.
[0099] It should be noted that the above two implementations are only different implementations of the change of the instance type of the existing instance, and other implementations can also be used in actual applications, which are not limited by the present application.
[0100] Taking the creation of a new flexible instance as an example, in the first example, the resource management system 120 can create a new flexible instance in the cluster 110. In the second example, the resource management system 120 can create a new flexible instance in another cluster other than the cluster 110.
[0101] Taking the creation of a new flexible instance in another cluster as an example, in an optional implementation, as shown in FIG. 2, the cloud management platform 10 can further include a resource pool 130. The cluster 110 and the resource pool 130 can be deployed in the same region, or the cluster 110 and the resource pool 130 can be deployed in different regions, which are not limited by the present application. The resource pool 130 can be a local resource pool or an elastic resource pool. The local resource pool refers to a node resource set composed of real nodes. The elastic resource pool, also referred to as a remote resource pool, refers to a remote resource set corresponding to a virtual node.
[0102] In an optional implementation, the resource pool 130 can support the running of a flexible instance, and the resource management system 120 can deploy a new flexible instance in the resource pool 130 and migrate the existing instance running in the cluster 110 to the flexible instance running in the resource pool 130.
[0103] It should be noted that the architecture of the computer system shown in FIG. 2 is only an example, and the types or number of devices inside the system can be configured according to actual needs, and the embodiments of the present application do not limit this. For example, the computer system can further include more clusters 110 or resource pools 130.
[0104] The structures of the various modules included in the resource management system 120 will be introduced below in combination with FIG. 2.
[0105] As shown in FIG. 2, the resource management system 120 includes a load balancer 121, an elastic scaling component 123, a resource management component 122, and a system data collection component 124. In an optional implementation manner, the elastic scaling component 123 can also be referred to as an elastic scaling service, and the resource management component 122 can be referred to as a resource management service. The present application does not limit this.
[0106] It should be noted that the functions implemented by the load balancer 121, the elastic scaling component 123, the resource management component 122, and the system data collection component 124 can be completed by the cloud management platform 10 or other components of the cloud management platform 10, and the implementation manner thereof is not limited by the present application.
[0107] The connection relationship between the load balancer 121, the elastic scaling component 123, the resource management component 122, and the system data collection component 124 and the functions implemented by each component will be exemplarily described below.
[0108] Among them, the system data collection component 124 and the elastic scaling component 123 establish a communication connection. The elastic scaling component 123 respectively establishes a communication connection with the load balancer 121, the resource management component 122, and the system data collection component 124. The resource management component 122 is in communication connection with the elastic scaling component 123 and each host in the cluster 110. The load balancer 121 is in communication connection with each host in the cluster 110.
[0109] The deployment manners of the load balancer 121, the elastic scaling component 123, the resource management component 122, and the system data collection component 124 will be exemplarily described below.
[0110] In a first optional implementation manner, the load balancer 121, the elastic scaling component 123, the resource management component 122, and the system data collection component 124 can be deployed in the same device.
[0111] In a second optional implementation manner, the load balancer 121, the elastic scaling component 123, the resource management component 122, and the system data collection component 124 can be respectively deployed in different devices.
[0112] For example, the load balancer 121, the elasticity scaling component 123, the resource management component 122, and the system data collection component 124 can be respectively deployed in different computing devices.
[0113] For another example, the load balancer 121, the elasticity scaling component 123, the resource management component 122, and the system data collection component 124 can be respectively deployed in different virtual machines of the same computing device.
[0114] It should be noted that the above two optional implementation manners are only different implementation manners of deploying the load balancer 121, the elasticity scaling component 123, the resource management component 122, and the system data collection component 124. In actual application, the load balancer 121, the elasticity scaling component 123, the resource management component 122, and the system data collection component 124 can also have other deployment manners. For example, the elasticity scaling component 123 and the resource management component 122 are deployed in device 1, the load balancer 121 is deployed in device 2, and the system data collection component 124 is deployed in device 3, and the device 1, the device 2, and the device 3 are different devices. The present application does not limit this.
[0115] The functions of each module in the resource management system 120 are described below.
[0116] The system data collection component 124 is configured to collect the running parameters of each host and the running parameters of the existing instances running on the host, and provide the running parameters of each host and the running parameters of the existing instances running on the host to the elasticity scaling component 123.
[0117] The elasticity scaling component 123 is configured to perform instance configuration management and scaling strategy configuration, and perform scaling processing or scaling-out processing on the instances running in the cluster 110 according to the running parameters and the scaling strategy. In the scaling-out processing, the elasticity scaling component 123 sends an instance type change instruction to the resource management component 122.
[0118] The instance configuration management can refer to setting the specification of the instance. In an optional manner, the implementation manner of the instance configuration management can refer to the embodiments provided in FIG. 5 described below, which will not be described here. The scaling strategy configuration can refer to configuring the instance type adjustment condition, the scaling demand, and the scaling demand, etc. In an optional manner, the scaling strategy configuration process can refer to the embodiments provided in FIGS. 4A to 4C described below, which will not be described here.
[0119] The resource management component 122 is configured to change the type of the instance running on the host in response to the instance type change instruction sent by the resource management component 122. The resource management component 122 is also configured to dynamically adjust the specification of the instance running on the host.
[0120] The load balancer 121 is configured to distribute the jobs to each host in the cluster 110, and to re-distribute the jobs after the scaling-in process or the scaling-out process.
[0121] It should be noted that FIG. 2 is only an example diagram, and does not limit the example scheduling method provided by the embodiments of the present application. The naming and division of the modules in the resource management system 120 shown in FIG. 2 are illustrative. In actual applications, the resource management system 120 can also have other grouping manners, which are not limited by the present application. In addition, the resource management system 120 can also be named as an instance scheduling system. The instance scheduling system can include modules different from those shown in FIG. 2, and the instance scheduling system can refer to the embodiments provided in the following FIG. 10. The present application does not expand here.
[0122] Next, the implementation of the example scheduling method provided by the present application will be described in combination with FIGS. 3 to 9.
[0123] Please refer to FIG. 3, which is a flowchart of an example scheduling method provided by an embodiment of the present application. The example scheduling method shown can be applied to the cloud management platform 10 shown in FIG. 2, and is executed by the cloud management platform 10, which can also be called a cloud computing platform, a management node, a cloud platform, etc. As shown in FIG. 3, the cluster 110 includes the host 111, the host 112 and the host 113, the host 111 runs the rigid instance 1, and the host 112 runs the rigid instance 2. The example scheduling method includes steps S310 to S340.
[0124] S310, the cloud management platform 10 obtains the running parameters of the rigid instance 1 and the running parameters of the rigid instance 2, and obtains the first running parameters.
[0125] The running parameters include one or more of resource utilization, specification, QoS parameter degradation ratio, and QoS parameter degradation duration.
[0126] In a first optional implementation, the first running parameters can be obtained by statistics on the running parameters of the rigid instance 1 and the running parameters of the rigid instance 2.
[0127] In the first example, the first running parameters can be obtained by accumulation on the running parameters of the rigid instance 1 and the running parameters of the rigid instance 2.
[0128] For example, taking the running parameters including CPU usage, CPU peak value and memory occupancy as an example, the CPU usage of the rigid instance 1 and the CPU usage of the rigid instance 2 can be accumulated to obtain a CPU usage total. The CPU peak value of the rigid instance 1 and the CPU peak value of the rigid instance 2 can be accumulated to obtain a CPU peak value total. The memory occupancy of the rigid instance 1 and the memory occupancy of the rigid instance 2 can be accumulated to obtain a memory occupancy total. The CPU usage total, the CPU peak value total and the memory occupancy total can be taken as the first running parameter.
[0129] In the second example, the first running parameter is obtained according to the statistical characteristics of the running parameters of the rigid instance 1 and the running parameters of the rigid instance 2. The statistical characteristics include, but are not limited to, the maximum value, the average value, the minimum value and the like of the running parameters of the rigid instance 1 and the running parameters of the rigid instance 2.
[0130] It should be noted that the above two examples are only different implementation manners of obtaining the first running parameter by statistically processing the running parameters of multiple instances. In other embodiments, there can be other implementation manners, which are not limited by the present application.
[0131] In the second optional implementation manner, the first resource utilization of the rigid instance 1 and the first QoS parameter can be obtained based on the running parameters of the rigid instance 1. The second resource utilization of the rigid instance 2 and the second QoS parameter can be obtained based on the running parameters of the rigid instance 2. The first resource utilization, the second resource utilization, the first QoS parameter and the second QoS parameter are statistically analyzed to obtain the first running parameter.
[0132] For example, the maximum resource utilization, the average resource utilization or the minimum resource utilization of the first resource utilization and the second resource utilization can be taken as the resource utilization in the first running parameter. The maximum QoS parameter, the minimum QoS parameter or the average QoS parameter of the first QoS parameter and the second QoS parameter can be taken as the QoS parameter in the first running parameter.
[0133] It should be noted that the above two optional implementation manners are only different implementation manners of obtaining the first running parameter. In other embodiments, there can be other implementation manners, which are not limited by the present application.
[0134] It is worth noting that in the embodiment provided in FIG. 2, two instances are running in the cluster 110. In actual applications, more or less instances than in FIG. 2 can run in the cluster 110. In the case where one instance runs in the cluster 110, the cloud management platform 10 can take the running parameter of the instance as the first running parameter, or obtain the first running parameter based on the QoS parameter and resource utilization indicated by the performance parameter of the instance. In the case where three or more instances run in the cluster 110, the cloud management platform 10 can obtain the first running parameter by referring to S410 described above.
[0135] S320, the cloud management platform 10 determines whether the first running parameter meets the shrinkage requirement.
[0136] In an optional implementation, the cloud management platform 10 can compare the first running parameter with the shrinkage requirement to determine whether the first running parameter meets the shrinkage requirement.
[0137] The following takes three examples as examples to illustrate the comparison of the first running parameter with the shrinkage requirement.
[0138] In a first optional example, the shrinkage requirement includes a QoS guarantee requirement. The cloud management platform 10 obtains an actual QoS parameter based on the first running parameter. The QoS guarantee requirement in the shrinkage requirement is compared with the actual QoS parameter. If the actual QoS parameter does not meet the QoS guarantee requirement, it is determined that the first running parameter meets the shrinkage requirement. If the actual QoS parameter meets the QoS guarantee requirement, it is determined that the first running parameter does not meet the shrinkage requirement.
[0139] The actual QoS parameter not meeting the QoS guarantee requirement can include one or more of the following: the actual QoS parameter degradation ratio is less than the allowed degradation ratio, and the actual QoS parameter is less than the reference QoS parameter specified by the QoS guarantee requirement. Correspondingly, the actual QoS parameter meeting the QoS guarantee requirement can include one or more of the following: the actual QoS parameter degradation ratio is greater than or equal to the allowed degradation ratio, and the actual QoS parameter is greater than or equal to the reference QoS parameter specified by the QoS guarantee requirement.
[0140] In a second optional example, the shrinkage requirement includes a threshold of resource utilization. The cloud management platform 10 compares the resource utilization in the first running parameter with the threshold of resource utilization. In the case where the resource utilization is less than the threshold of resource utilization, it is determined that the cloud management platform 10 meets the shrinkage requirement. In the case where the resource utilization is greater than the threshold of resource utilization, it is determined that the first running parameter does not meet the shrinkage requirement. In the case where the resource utilization is equal to the threshold of resource utilization, it can be determined that the first running parameter meets the shrinkage requirement, or it can be determined that the first running parameter does not meet the shrinkage requirement. The present application does not limit this.
[0141] In a third example, the scaling-down requirement includes a QoS guarantee requirement and a threshold of resource utilization. If the resource utilization is less than the threshold of resource utilization, or the actual QoS parameter does not meet the QoS guarantee requirement, it is determined that the first running parameter meets the scaling-down requirement. If the resource utilization is greater than the threshold of resource utilization, and the actual QoS parameter meets the QoS guarantee requirement, it is determined that the first running parameter does not meet the scaling-down requirement.
[0142] The above three examples are only different implementation manners for determining whether the first running parameter meets the scaling-down requirement. In some other embodiments, there can be other implementation manners. The present application does not limit this.
[0143] It should be noted that, in the case where the first running parameter does not meet the scaling-down requirement, the rigid instance 1 and the rigid instance 2 do not need to perform the scaling-up processing and the scaling-down processing. Alternatively, the rigid instance 1 and the rigid instance 2 need to perform the scaling-up processing. To further determine whether the scaling-up processing needs to be performed, in the case where the first running parameter does not meet the scaling-down requirement, the cloud management platform 10 can determine whether the first running parameter meets the scaling-up requirement based on the first running parameter and the scaling-up requirement. Specifically, the implementation manner of the instance scheduling method in the scaling-up scenario can refer to the embodiments provided in FIG. 8 below, and the present application will not be described here.
[0144] In a third example, the scaling-down requirement includes a QoS guarantee requirement and a threshold of resource utilization. If the resource utilization is less than the threshold of resource utilization, or the actual QoS parameter does not meet the QoS guarantee requirement, it is determined that the first running parameter meets the scaling-down requirement. If the resource utilization is greater than the threshold of resource utilization, and the actual QoS parameter meets the QoS guarantee requirement, it is determined that the first running parameter does not meet the scaling-down requirement.
[0145] In an optional implementation manner, if the first running parameter meets the scaling-down requirement, the cloud management platform 10 can query the stored elastic scaling strategy to determine whether the instance type changing function is enabled. If the instance type changing function is enabled, the cloud management platform 10 determines whether the first running parameter meets the instance type adjustment condition. If the instance type changing function is not enabled, the cloud management platform 10 performs the elastic scaling-down processing to reduce the number of instances running in the cluster 110. For example, the rigid instance 2 is released, and the task 2 performed by the rigid instance 2 is performed by the rigid instance 1.
[0146] In an optional implementation manner, in the implementation of the elastic scaling-down processing, if the number of instances running in the cluster 110 is 1, the scaling-down processing will cause the job interruption, and the job restart needs to re-allocate instance resources, further increasing the job interruption time. Therefore, to ensure the normal operation of the job, the cloud management platform 10 can obtain the number of instances running in the cluster 110. If the number of instances running in the cluster 110 is 1, the cloud management platform 10 does not perform the elastic scaling-down processing. If the number of instances running in the cluster 110 is greater than or equal to 2, the elastic scaling component 123 performs the elastic scaling-down processing.
[0147] It should be noted that the above-mentioned instance numbers 1 and 2 are only exemplary descriptions.
[0148] In an optional implementation, the cloud management platform 10 can determine whether the first running parameter meets the instance type adjustment condition with reference to the above-mentioned step S320. The configuration manner of the instance type adjustment condition can refer to the embodiments shown in FIGS. 4A to 4C, which will not be described herein.
[0149] In a first example, the instance type adjustment condition includes the CPU utilization rate. The cloud management platform 10 extracts the CPU actual utilization rate from the first running parameter. The cloud management platform 10 compares the CPU actual utilization rate with the CPU utilization rate. If the CPU actual utilization rate is greater than or equal to the CPU utilization rate, it is determined that the first running parameter does not meet the instance type adjustment condition. If the CPU actual utilization rate is less than the CPU utilization rate, it is determined that the first running parameter meets the instance type adjustment condition.
[0150] In a second example, in order to avoid the problem of unstable instance type switching caused by the CPU actual utilization rate, and to ensure the reliability and stability of the instance scheduling method, the instance type adjustment condition includes the threshold of the CPU utilization rate and the duration. The cloud management platform 10 extracts the CPU actual utilization rate and the duration from the first running parameter. If the CPU actual utilization rate is greater than or equal to the CPU utilization rate, or the duration is less than the threshold of the duration, it is determined that the first running parameter does not meet the instance type adjustment condition. If the CPU actual utilization rate is less than the CPU utilization rate, or the duration is greater than or equal to the threshold of the duration, it is determined that the first running parameter meets the instance type adjustment condition. In this way, the problem of unstable instance type switching caused by the unstable CPU actual utilization rate is reduced by the duration.
[0151] It should be noted that the above-mentioned two examples are only different implementation manners for determining whether the first running parameter meets the instance type adjustment condition, and other implementation manners can also be used in actual applications. The present application does not limit this.
[0152] S340, if the first running parameter meets the instance type adjustment condition, the cloud management platform 10 changes the rigid instance into a flexible instance.
[0153] As shown in FIG. 3, the cloud management platform 10 changes the rigid instance 1 into a flexible instance 1, and changes the rigid instance 2 into a flexible instance 2.
[0154] As an optional implementation, the cloud management platform 10 can modify the instance type of the instance. For example, the cloud management platform 10 changes the rigid instance 1 into a flexible instance, and changes the rigid instance 2 into a flexible instance.
[0155] In the first optional embodiment, the cloud management platform 10 determines the rigid instance indicated by the instance identifier according to the instance identifier. The cloud management platform 10 changes the rigid instance indicated by the instance identifier into a flexible instance, and sets the specification range of the flexible instance according to the specification of the rigid instance indicated by the instance identifier.
[0156] The instance identifier is used to indicate the instance in the cluster 110 which needs to perform the instance type change.
[0157] The instance identifier is illustrated below in combination with three specific examples:
[0158] In the first example, the instance identifier can be a unique identifier of the instance in the cluster 110. For example, the serial number of the instance.
[0159] In the second example, the instance identifier can be a unique identifier of the host running the instance in the cluster 110. For example, the MAC address, etc.
[0160] In the third example, the instance identifier can be the identifier of the job executed in the instance. It can be understood that in the cluster 110, one job can be executed by one or more instances. That is, the identifier of one job corresponds to at least one instance. In this way, the instance types of multiple instances executing the same job can be changed through the identifier of the job.
[0161] The above three examples are only illustrative of different forms of instance identifiers, and do not constitute a limitation on the instance scheduling method provided by the present application. In actual application, the instance identifier can also be in other forms, which is not limited by the present application.
[0162] In the second optional embodiment, the cloud management platform 10 determines the rigid instance indicated by the instance identifier according to the instance identifier. The cloud management platform 10 changes the rigid instance indicated by the instance identifier into a flexible instance, and sets the specification range of the flexible instance based on the target specification.
[0163] The target specification can be determined based on the specification of the rigid instance running in the cluster 110. Specifically, reference can be made to the embodiment provided in the following FIG. 5, which will not be described herein.
[0164] It should be noted that in this application, the target specification is less than or equal to the specification of the corresponding rigid instance. That is, the number of vUs in the target specification is less than or equal to the number of vUs of the corresponding rigid instance, and the memory size in the target specification is less than or equal to the memory size of the corresponding rigid instance. For example, if the instance type of rigid instance 1 is changed, the number of vUs in the target specification carried in the second instruction is less than or equal to 16, and the memory size in the target specification is greater than or equal to 32 GB.
[0165] The following illustrates the specific form of the target specification.
[0166] In the first optional example, the target specification is used to indicate the maximum specification of the flexible instance. For example, if the target specification is (16vU, 32GB), the maximum specification of the flexible instance is 16vU, 32GB.
[0167] In the second optional example, the target specification is used to indicate the specification range of the flexible instance. For example, if the target specification is (16vU, 32GB; 1vU, 2GB), the specification range of the flexible instance is (16vU, 32GB; 1vU, 2GB), that is, the specification of the flexible instance can be adjusted within the range of (16vU, 32GB; 1vU, 2GB). For another example, if the target specification is (16vU, 32GB), the specification range of the flexible instance is (16vU, 32GB; minimum specification).
[0168] The above two examples are only examples of different representations of the target specification. In actual application, the target specification can also have other representations, which are not limited by the present application.
[0169] It should be noted that the above two embodiments are only examples of modifying the instance type of the cloud management platform 10, and should not be understood as a limitation of the instance scheduling method provided by the present application. In other embodiments, the cloud management platform 10 can also create new flexible instances in the cluster 110 and migrate the rigid instances to the newly created flexible instances. For example, the cloud management platform 10 creates flexible instance 1 and flexible instance 2 in the host 113 of the cluster 110, and migrates the information of the rigid instance 1 in the host 111 to the flexible instance 1 and the information of the rigid instance 2 in the host 112 to the flexible instance 2.
[0170] The information of the rigid instance includes but is not limited to memory data in the instance, state information of the instance, etc.
[0171] In the first optional implementation, the cloud management platform 10 determines the rigid instance indicated by the instance identifier according to the instance identifier. The cloud management platform 10 creates a flexible instance according to the specification of the rigid instance indicated by the instance identifier. The cloud management platform 10 migrates the information of the rigid instance indicated by the instance identifier to the created flexible instance.
[0172] In the second optional implementation, the cloud management platform 10 creates a flexible instance in the cluster 110 according to the target specification. The cloud management platform 10 migrates the information of the rigid instance indicated by the instance identifier to the created flexible instance.
[0173] It should be noted that the above two implementations are only illustrative of creating a new flexible instance in the cluster 110. It should not be understood as a limitation on the instance scheduling method of the present application. In other embodiments, there can be other implementations of creating a new flexible instance in the cluster 110, which are not limited by the present application.
[0174] It should be noted that the present application does not limit the migration method of the instance. For example, the information of the rigid instance can be migrated to the newly created flexible instance by hot migration. For another example, the information of the rigid instance can be migrated to the newly created flexible instance by cold migration.
[0175] It should be noted that the above creation of the flexible instance 1 and the flexible instance 2 in the host 113 is only illustrative. In other embodiments, the cluster 110 can create a flexible instance in any host, for example, the flexible instance 1 is created in the host 111, and the flexible instance 2 is created in the host 112. For another example, the cloud management platform 10 selects a first deployment host for creating a new flexible instance in the cluster 110, and creates a new flexible instance on the first deployment host, which is not limited by the present application.
[0176] The implementation of selecting the first deployment host by the cloud management platform 10 is described below.
[0177] It should be noted that in the case of creating multiple flexible instances, the cluster 110 can select one or more first deployment hosts. Each first deployment host can be selected according to the following implementation of selecting the first deployment host.
[0178] In an optional implementation, the implementation of selecting the first deployment host includes the following implementations:
[0179] The first implementation, the cloud management platform 10 selects an idle host in the cluster 110 as the first deployment host.
[0180] In the second implementation, the cloud management platform 10 selects multiple candidate hosts from the cluster 110. The cloud management platform 10 determines a predicted resource utilization of each candidate host after the new flexible instance is created according to the resource utilization of each candidate host and the target specification. The candidate host with a predicted resource utilization less than a resource utilization threshold (e.g., 50%) is determined as the first deployment host.
[0181] It should be noted that the candidate host can be all hosts in the cluster 110. Or the candidate host can be hosts in the cluster 110 participating in the same job. Or the candidate host can be hosts in the cluster 110 with a resource utilization less than a resource utilization threshold (e.g., 50%).
[0182] It should be noted that in the case that there are multiple candidate hosts with a predicted resource utilization less than a resource utilization threshold, the cloud management platform 10 can determine the candidate host with the minimum resource utilization as the first deployment host. In the case that there is no candidate host with a predicted resource utilization less than a resource utilization threshold, the cloud management platform 10 can create a flexible instance in the resource pool 130. Specifically, the implementation of creating a flexible instance in the resource pool 130 can refer to the embodiments provided in FIG. 6 below, which will not be described herein. Or in the case that there is no candidate host with a predicted resource utilization less than a resource utilization threshold, the cloud management platform 10 selects a first candidate host in which an existing instance can be interrupted or migrated, and determines the first candidate host with the minimum resource utilization as the first deployment host.
[0183] In the third implementation, the cloud management platform 10 determines a predicted QoS parameter degradation ratio of each candidate host after the new flexible instance is created according to the resource utilization of the candidate host, the QoS parameter degradation ratio of the existing instance in the candidate host, and the target specification. The candidate host with a predicted QoS parameter degradation ratio less than an allowed degradation ratio is determined as a second candidate host. The second candidate host with the minimum resource utilization is determined as the first deployment host.
[0184] It should be noted that in the case that there is no second candidate host with a predicted QoS parameter degradation ratio less than an allowed degradation ratio in the cluster 110, the cloud management platform 10 can create a flexible instance in the resource pool 130. Specifically, the implementation of creating a flexible instance in the resource pool 130 can refer to the embodiments provided in FIG. 6 below, which will not be described herein. Or the cloud management platform 10 selects a first candidate host in which an existing instance can be interrupted or migrated, and determines the first candidate host with the minimum resource utilization as the first deployment host.
[0185] The above three examples are only different implementation manners of selecting the first deployment host. In actual application, other implementation manners can also be used. The application does not limit this.
[0186] Based on the embodiment provided in FIG. 3, in the capacity reduction implementation, the cloud management platform 10 changes the first type instance running in the cluster 110 to the second type instance in a case where the first running parameter of the first type instance meets the instance type adjustment condition. In this way, in the capacity reduction processing, the instance type adjustment condition is added. For the instance meeting the type change condition, the first type instance with fixed specifications is changed to the second type instance with adjustable specifications through the instance type change, so that the specifications of the instance can be adjusted based on the actual load of the business, and the resource utilization rate is improved.
[0187] Next, taking that the instance scheduling method is applied to the resource management system 120 of the cloud management platform 10 as an example, taking the elastic scaling component 123 and the resource management component 122 in the resource management system 120 as the execution subject, and combining FIGS. 4A to 9, the steps in the instance scheduling method provided in FIG. 3 are described in detail.
[0188] In an optional implementation manner, in the process in which the cloud management platform 10 executes the job, in order to ensure the adaptability between the resource specifications of the instance and the actual load demand of the business, and reduce resource waste. The resource management system 120 can preconfigure the elastic scaling policy. After the instance is started, the resource management system 120 adjusts the number of instances in the cluster 110 or changes the type of the instance according to the running parameter of the instance running on the cluster 110 and the elastic scaling policy.
[0189] The elastic scaling policy includes the capacity expansion demand, the capacity reduction demand, and the instance type adjustment condition.
[0190] In the first optional implementation manner, the resource management system 120 can configure the elastic scaling policy when receiving the host group creation request of the client 20. The host group creation request is used to instruct the resource management system 120 to allocate the host group of the cluster 110 to execute the job. The host group is a host set of the cluster 110 executing the same job.
[0191] In the second optional implementation manner, the resource management system 120 can configure the elastic scaling policy when receiving the elastic scaling policy configuration request sent by the client 20.
[0192] The above two optional implementation manners are only different triggering manners of configuring the elastic scaling policy. In actual application, other implementation manners can also be used, for example, the resource management system 120 receives the elastic scaling policy sent by an external device. The application does not limit this.
[0193] The configuration of the elastic scaling strategy is described below with reference to FIGS. 4A-4C.
[0194] In an optional implementation, the elastic scaling strategy can be configured by the tenant. The resource management system 120 provides a first interface to the tenant. The resource management system 120 obtains the elastic scaling strategy in response to a first operation of the tenant based on the first interface.
[0195] In an optional implementation, the first operation is used to input the elastic scaling strategy on the first interface. Alternatively, the first operation is used to select the elastic scaling strategy from a plurality of candidate elastic scaling strategies displayed on the first interface. Alternatively, the first operation is used to modify an initial elastic scaling strategy displayed on the first interface.
[0196] It should be noted that the embodiments of the present application do not limit the triggering manner of the input operation. In a first example, the input operation can be a contact operation, such as a touch operation of tapping, long pressing, sliding, double clicking, single clicking a control in the interface, and the like. In a second example, the input operation can also be a non-contact operation, such as gesture input, a physical button, voice input, and the like. In a third example, the input operation can also be a key-in operation, such as a key-in operation through a mouse or a key-in operation through a keyboard.
[0197] The following provides three different implementations of the first operation to illustrate the configuration of the elastic scaling strategy.
[0198] In a first optional implementation, the first interface can display an input box. The resource management system 120 displays the scaling demand, the scaling-in demand, and the instance type adjustment condition in the first interface in response to a first operation of the tenant based on the input box, thereby realizing the configuration of the elastic scaling strategy.
[0199] In a second optional implementation, the first interface can display a plurality of candidate elastic scaling strategies. The resource management system 120 obtains the candidate elastic scaling strategy selected by the tenant as the elastic scaling strategy in response to a first operation of the first interface.
[0200] In a third optional implementation, the first interface can display an initial elastic scaling strategy. The resource management system 120 modifies the initial elastic scaling strategy in response to a first operation of the first interface, thereby obtaining the elastic scaling strategy.
[0201] The above three optional implementations realize different configurations of the elastic scaling strategy. Other implementations can also be used in actual applications. The present application does not limit this.
[0202] The following describes the above three implementations of the configuration of the elastic scaling strategy with reference to FIGS. 4A-4C, respectively.
[0203] For example, the implementation of configuring the elastic scaling policy is introduced by taking the input of the elastic scaling policy on the first interface as an example. Similarly, the setting manner of the scaling demand and the scaling demand can refer to the setting manner of the instance type adjustment condition.
[0204] As shown in FIG. 4A, the resource management system 120 sends the first interface data to the client 20, and the client 20 displays the first interface as shown in (a) of FIG. 4A. The first interface shown in (a) of FIG. 4A includes a scaling demand input box, a scaling demand input box, and an instance type adjustment condition input box.
[0205] As shown in (b) of FIG. 4A, the tenant clicks the instance type adjustment condition input box, the resource management system 120 sends the second interface data to the client 20, and the client 20 displays the second interface as shown in (c) of FIG. 4A. The second interface shown in (c) of FIG. 4A includes a maximum instance number input box, a minimum instance number input box, an instance type change function opening control, a CPU average utilization rate input box, a duration input box, a confirmation control, and a cancel control. As shown in (c) of FIG. 4A, the instance type change function opening control is in a closed state.
[0206] The first operation input by the tenant is obtained, and the content corresponding to the first operation is displayed on the second interface, for example, as shown in (d) of FIG. 4A, the maximum instance number 300, the minimum instance number 10, the instance type change function is opened, the CPU average utilization rate is 30%, and the duration is 600 seconds. The tenant clicks the confirmation control in the second interface, and the client 20 sends the instance type adjustment condition to the resource management system 120.
[0207] For example, the implementation of configuring the elastic scaling policy is introduced by taking the input of the elastic scaling policy on the first interface as an example. Similarly, the setting manner of the scaling demand and the scaling demand can refer to the setting manner of the instance type adjustment condition.
[0208] As shown in FIG. 4B, the resource management system 120 sends the first interface data to the client 20, and the client 20 displays the first interface as shown in (a) of FIG. 4B. The first interface shown in (a) of FIG. 4B includes a “view” control, and the identification of the candidate elastic scaling policy: scaling policy 1, scaling policy 2, scaling policy 3, scaling policy 4, scaling policy 5, scaling policy 6, scaling policy 7, scaling policy 8, scaling policy 9, scaling policy 10, scaling policy 11, and scaling policy 12.
[0209] As shown in (b) of FIG. 4B, the tenant clicks the "view" function control of the scale-out / in strategy 12. The client 20 displays a third interface as shown in (c) of FIG. 4B. The third interface includes a confirmation control, a return control, a "scale-out requirement" display box, a "scale-in requirement" display box, and an "instance type adjustment condition" display box. Among them, the "scale-out requirement" display box displays: the allowed degradation ratio X1. The "scale-in requirement" display box displays: the threshold X2% of resource utilization. The "instance type adjustment condition" display box displays: the maximum instance number 300, the minimum instance number 10, the instance type change function enabled, the CPU average utilization 30%, and the duration 600 seconds. The tenant clicks the confirmation control in the third interface, and the client 20 sends a selection operation to the resource management system 120 based on the scale-out / in strategy 12. The resource management system 120 takes the scale-out / in strategy 12 as an elastic scale-out / in strategy.
[0210] Exemplarily, the implementation of configuring the elastic scale-out / in strategy is introduced taking the modification of the initial elastic scale-out / in strategy displayed in the first interface by the tenant as an example.
[0211] As shown in FIG. 4C, the resource management system 120 sends the first interface data to the client 20, and the client 20 displays the first interface as shown in (a) of FIG. 4C. As shown in (a) of FIG. 4C, the first interface includes an elastic scale-out / in strategy display area, a cancel control, and a confirmation control. The elastic scale-out / in strategy display area includes a first display box, a second display box, and a third display box. Among them, the first display box displays: the allowed degradation ratio X1 and a "modify" control. The second display box displays: the threshold X2% of resource utilization and a "modify" control. The third display box displays: the maximum instance number 300, the minimum instance number 10, the instance type change function enabled, the CPU average utilization 30%, the duration 600 seconds, and a "modify" control. The tenant can modify the content in the first display box, the second display box, and / or the third display box by clicking the "modify" control in the first display box, the second display box, and / or the third display box.
[0212] Taking the modification of the content in the third display box as an example, as shown in (b) of FIG. 4C, the tenant clicks the "modify" control in the third display box, and the client 20 displays a fourth interface as shown in (c) of FIG. 4C. The fourth interface includes a "cancel" control, a "modify confirmation" control, and instance type adjustment conditions: the maximum instance number 300, the minimum instance number 10, the instance type change function enabled, the CPU average utilization 30%, and the duration 600 seconds.
[0213] The tenant can modify the initial instance type adjustment condition displayed in the fourth interface. For example, as shown in (d) of FIG. 4C, the tenant clicks the minimum instance number input box in the fourth interface, changes the minimum instance number from 10 to 1, and changes the CPU average utilization from 30% to 40%. The client 20 displays the fourth interface as shown in (d) of FIG. 4C.
[0214] The tenant clicks the modification confirmation control in the fourth interface, and the client 20 displays the first interface as shown in (e) of FIG. 4C. Compared with the first interface shown in (a) of FIG. 4C, in the first interface shown in (e) of FIG. 4C, the minimum instance number displayed in the third display box is 1, and the CPU average utilization is 40%.
[0215] The above FIGS. 4A to 4C are schematic diagrams of interfaces for configuring different elastic scaling policies. In actual applications, there can be other implementation manners, which are not limited by the present application.
[0216] In an optional implementation manner, the cluster 110 runs the instance, the resource management system 120 obtains the running parameter of the instance, and automatically implements the instance scaling operation through the elastic scaling policy. In the implementation of the instance scaling, the resource management system 120 can execute the instance scheduling method provided in the embodiments of the present application to change the instance type.
[0217] As shown in FIG. 5, FIG. 5 is a second flowchart of the instance scheduling method according to the embodiments of the present application. The cluster 110 includes the host 111, the host 112, and the host 113. The host 111 runs the rigid instance 1, and the host 112 runs the rigid instance 2. The instance scheduling method at least includes steps S410 to S450.
[0218] S410, the elastic scaling component 123 obtains the running parameter of the rigid instance 1 and the running parameter of the rigid instance 2, and obtains the first running parameter.
[0219] The elastic scaling component 123 can refer to the above S310 to obtain the obtaining manner of the first running parameter, which is not described herein.
[0220] S420, the elastic scaling component 123 judges whether the first running parameter meets the scaling demand.
[0221] In an optional implementation manner, the elastic scaling component 123 can refer to the above S320 to judge whether the first running parameter meets the scaling demand, which is not described herein.
[0222] S430, if the first running parameter meets the scaling demand, the elastic scaling component 123 judges whether the first running parameter meets the instance type adjustment condition.
[0223] In an optional implementation, the elastic scaling component 123 can determine whether the first running parameter satisfies the instance type adjustment condition according to S330 described above, which will not be repeated herein.
[0224] S440, if the first running parameter satisfies the instance type adjustment condition, the elastic scaling component 123 sends a first instruction to the resource management component 122.
[0225] The first instruction is used to instruct the resource management component 122 to perform an instance type change operation.
[0226] S450, the resource management component 122 sends a second instruction to the cluster 110 in response to the first instruction.
[0227] The second instruction is used to instruct the cluster 110 to change the rigid instance to a flexible instance. For example, the second instruction is used to instruct the cluster 110 to change the rigid instance 1 to a flexible instance 1 and change the rigid instance 2 to a flexible instance 2.
[0228] In a first optional implementation, the second instruction carries the identity of the instance.
[0229] In a second optional implementation, the second instruction carries the identity of the instance and the target specification.
[0230] It should be noted that the above two optional implementations are only examples of different contents carried by the second instruction. In actual application, the second instruction can also carry other contents, such as operation code. The present application does not limit this.
[0231] In an optional implementation, the cluster 110 changes the rigid instance 1 to a flexible instance 1 and changes the rigid instance 2 to a flexible instance 2 in response to the second instruction.
[0232] In an optional implementation, the cluster 110 can change the instance type according to S340 described above, which will not be repeated herein.
[0233] Based on the embodiments provided in FIG. 5, in the capacity reduction implementation, the first type instance running in the cluster 110 is changed to the second type instance in the case where it is determined that the first running parameter of the first type instance satisfies the instance type adjustment condition. In this way, in the capacity reduction processing, the instance type adjustment condition is added. For the instance satisfying the type change condition, the first type instance with fixed specification is changed to the second type instance with adjustable specification through the instance type change, so that the specification of the instance can be adjusted based on the actual load of the business, and the resource utilization is improved.
[0234] The implementation of S430 described above is explained below.
[0235] In the first optional implementation, in a case where the number of rigid instances running in the cluster 110 is large, reducing the number of rigid instances running in the cluster 110 can alleviate the problem of resource waste. In a case where the number of rigid instances running in the cluster 110 is small, reducing the number of rigid instances running in the cluster 110 can cause job interruption or cause a mismatch between the resource specification of the instance and the actual load demand of the business. Therefore, the number threshold of the rigid instance can be stored in the elastic scaling component 123. In the above S430, after determining that the first running parameter meets the scaling-down demand, the elastic scaling component 123 can compare the number threshold with the number of rigid instances in the cluster 110. In a case where the number of rigid instances in the cluster 110 is less than or equal to the number threshold, the elastic scaling component 123 determines whether the first running parameter meets the instance type adjustment condition. In a case where the number of rigid instances in the cluster 110 is greater than the number threshold, the elastic scaling component 123 reduces the number of rigid instances running in the cluster 110. In this way, by comparing the number threshold, in a case where the number of rigid instances in the cluster 110 meets the number threshold, it is determined whether to perform the instance type adjustment operation, and by ensuring the adaptability between the resource specification of the instance and the actual load demand of the business, the effective use of instance resources is achieved. In a case where the number of rigid instances in the cluster 110 does not meet the number threshold, the problem of resource waste is alleviated by scaling down.
[0236] It should be noted that the number threshold can have multiple values in the present application. For example, the number threshold can be 1. For another example, the number threshold can be 2. For yet another example, the number threshold can be 5. The present application does not limit the specific value of the number threshold.
[0237] The setting manner of the number threshold will be illustrated by two examples.
[0238] In the first optional example, the number threshold can be preconfigured by the tenant.
[0239] For example, the number threshold can be the minimum instance number input by the tenant through the minimum instance number input box.
[0240] In the second optional example, the number threshold can also be set by the load balancer 121 according to the job load demand quantity in advance. The job load demand quantity is used to indicate the amount of load resources required to run the job.
[0241] The load balancer 121 determines the minimum number of instances required to run the jobs according to the job load demand and the specifications of the instances configured by the tenant in the implementation of job allocation. The load balancer 121 passes the minimum number of instances to the elastic scaling component 123. The elastic scaling component 123 receives the minimum number of instances sent by the load balancer 121, determines the minimum number of instances as the number threshold, and stores the data threshold.
[0242] The above two examples are only different implementation manners of setting the number threshold. In actual application, the data threshold can also have other implementation manners. The present application does not limit this.
[0243] In the second optional implementation manner, since the number of rigid instances is reduced, the load balancer 121 needs to re-allocate jobs, all tasks running in the instances need to be paused, which will cause job interruption. In the case that the number of tasks in the job is large, re-allocating tasks will consume a lot of time, which will exacerbate the business interruption duration. Therefore, in order to reduce the business interruption duration, in the above S430, after determining that the first running parameter meets the shrinkage demand, the elastic scaling component 123 can obtain the total number of tasks in the job. The elastic scaling component 123 predicts the interruption duration caused by reducing the number of rigid instances according to the total number of tasks. The predicted interruption duration is compared with the interruption duration threshold. In the case that the predicted interruption duration is greater than the interruption duration threshold, the elastic scaling component 123 determines whether the first running parameter meets the instance type adjustment condition. In the case that the predicted interruption duration is less than or equal to the interruption duration threshold, the elastic scaling component 123 reduces the number of rigid instances running in the cluster 110. In this way, by comparing the interruption duration threshold, in the case that the predicted interruption duration is greater than the interruption duration threshold, it is determined whether to perform the instance type adjustment operation, which can reduce the interruption duration caused by the load balancer 121 re-allocating jobs. In the case that the predicted interruption duration is less than or equal to the interruption duration threshold, the problem of resource waste can be alleviated by shrinkage processing.
[0244] In an optional implementation manner, the elastic scaling component 123 can predict the interruption duration caused by reducing the number of rigid instances in various implementation manners, for example, according to the mapping relationship between the total number of tasks and the total number of tasks range and the interruption duration, the interruption duration caused by reducing the number of rigid instances can be predicted. For another example, the total number of tasks can be input into a model, and the model output result can be taken as the predicted interruption duration. The model can be a neural network model or a machine learning model. The present application does not limit this.
[0245] It should be noted that the above two optional implementations are only different implementations of S430, and other implementations can also be used in some embodiments. For example, the elastic scaling component 123 can combine the above two optional implementations, and in the case that the predicted interruption duration is greater than the interruption duration threshold and / or the number of rigid instances in the cluster 110 is less than or equal to the number threshold, the elastic scaling component 123 determines whether the first running parameter satisfies the instance type adjustment condition. In the case that the predicted interruption duration is less than or equal to the interruption duration threshold and the number of rigid instances in the cluster 110 is greater than the number threshold, the elastic scaling component 123 reduces the number of rigid instances running in the cluster 110. The present application does not limit this.
[0246] The implementation of S450 is described below in combination with FIGS. 6-7B.
[0247] In an optional implementation, in actual applications, the host in the cluster 110 can support the deployment of rigid instances and flexible instances, or the host in the cluster 110 only supports the deployment of rigid instances. In the case that the host in the cluster 110 only supports the deployment of rigid instances, if a flexible instance is deployed in the cluster 110 or the instance type of a rigid instance is modified, it can cause the instance type to fail. Therefore, to ensure that the instance type change is successful, the resource management component 122 can obtain the configuration parameters of the host in the cluster 110 after responding to the first instruction. The resource management component 122 determines whether the host supports the deployment of rigid instances and flexible instances according to the configuration parameters of the host, and then sends a corresponding second instruction to the cluster 110.
[0248] The host in the cluster 110 can be any host in the cluster 110. Alternatively, the host in the cluster 110 can be the host where the instance whose instance type needs to be changed is located, such as the host 111 and the host 112 in FIG. 5.
[0249] The configuration parameters of the host include one or more of the processor model of the host, the number of CPUs, the memory size, and the disk size.
[0250] Two specific examples are provided below to illustrate the data content carried by the second instruction.
[0251] In the first optional example, the host in the cluster 110 can support the deployment of rigid instances and flexible instances. The second instruction carries the target specification and the identifier of the instance. The second instruction is used to instruct the cluster 110 to create a flexible instance, or the second instruction instructs the cluster 110 to modify the instance type of the rigid instance indicated by the identifier of the instance.
[0252] In a second optional example, the host in the cluster 110 only supports deploying rigid instances, and the second instruction carries the identifier of the instance and the address of the destination instance. The second instruction is used to instruct the cluster 110 to migrate the information of the rigid instance indicated by the identifier of the instance to the destination instance. The destination instance refers to a flexible instance, for example, the destination instance can be a flexible instance created in the resource pool 130 in FIG. 2.
[0253] It should be noted that the above two examples are only examples of the content contained in the second instruction of the host in the cluster 110 in different cases. It should not be understood as a limitation on the example scheduling method provided in the present application. In other embodiments, the second instruction can also carry other data, such as an operation code, etc. The present application does not limit this.
[0254] The following takes the example of changing the instance type of the rigid instance 1 as an example, and introduces the implementation manner of creating a flexible instance in the resource pool 130 in combination with FIG. 6.
[0255] As shown in FIG. 6, FIG. 6 is a flowchart of the cluster 110 changing the instance type provided in an embodiment of the present application. The cluster 110 changing the instance type shown in the flowchart includes steps S451 to S456.
[0256] S451, the resource management component 122 determines the target specification based on the specification of the rigid instance 1 in response to the first instruction.
[0257] In an optional implementation manner, the resource management component 122 can determine the maximum specification of the flexible instance based on the specification of the rigid instance 1. The target specification is determined based on the maximum specification.
[0258] In a first example, the target specification can be the maximum specification. The resource management component 122 determines the maximum specification as the target specification. For example, taking the specification of the rigid instance 1 as (32vU, 64GB) as an example, (32vU, 64GB) is taken as the target specification. That is, the maximum vCPU quantity of the flexible instance 1 created in the resource pool 130 is 32, and the maximum memory size is 64GB.
[0259] In a second example, the target specification includes the maximum specification and the minimum specification. The resource management component 122 determines the minimum specification of the flexible instance. The minimum specification and the maximum specification are determined as the target specification. For example, taking the specification of the rigid instance 1 as (32vU, 64GB) as an example, if the minimum specification of the flexible instance is (1vU, 1GB), the target specification is {(1vU, 1GB), (32vU, 64GB)}. That is, the vCPU quantity of the flexible instance 1 created in the resource pool 130 can be adjusted within the range of 1 to 32, and the memory size of the flexible instance 1 can be adjusted within the range of 1GB to 64GB.
[0260] It should be noted that the above two examples are merely different implementation manners of determining the target specification, and other implementation manners can also be used in actual application. The present application does not limit this.
[0261] In the second example, the minimum specification can be pre-set. Alternatively, the minimum specification can be determined according to the maximum specification.
[0262] For example, the implementation manner of determining the minimum specification is exemplarily described by taking the determination of the minimum specification according to the maximum specification as an example.
[0263] In the first optional example, the resource management component 122 can obtain a specification difference threshold, and determine the minimum specification based on the specification difference threshold and the maximum specification.
[0264] The specification difference threshold is used to indicate the maximum difference between the specification of the flexible instance and the maximum specification.
[0265] For example, taking the specification of the rigid instance 1 as (32vU, 64GB) as an example, the specification difference threshold includes a vCPU quantity difference threshold and a memory size difference threshold. In the case that the vCPU quantity difference threshold and the memory size difference threshold are 30 and 60 respectively, the minimum specification is (2vU, 4GB). That is, the vCPU quantity of the flexible instance 1 created in the resource pool 130 can be adjusted within the range of 2 to 32, and the memory size of the flexible instance 1 can be adjusted within the range of 4GB to 64GB.
[0266] In the second optional example, the resource management component 122 can obtain the minimum specification based on the product of the resource utilization rate of the rigid instance 1 and the maximum specification.
[0267] For example, taking the specification of the rigid instance 1 as (32vU, 64GB) as an example, in the case that the resource utilization rate of the rigid instance 1 is 15%, the minimum vCPU quantity is determined as 5 and the minimum memory size is determined as 10GB. The minimum size is (5vU, 10GB).
[0268] It should be noted that the above two optional examples are merely different implementation manners of obtaining the minimum specification, and other implementation manners can also be used in actual application, for example, the minimum specification is obtained by the allowable degradation ratio of the rigid instance 1 and the maximum specification. The present application does not limit this.
[0269] In an optional embodiment, there are multiple implementation manners of determining the maximum specification of the flexible instance based on the specification of the rigid instance 1, for example:
[0270] In the first implementation manner, the resource management component 122 can take the specification of the rigid instance 1 as the maximum specification.
[0271] In the second implementation, the resource management component 122 can take the specification of the rigid instance 1 as the initial maximum specification. The resource management component 122 adjusts the initial maximum specification according to the first running parameter to obtain the maximum specification.
[0272] It should be noted that the above two implementation manners are only implementation manners for determining the maximum specification of the flexible instance, and other implementation manners can also be used in some embodiments, which are not limited herein.
[0273] In the second implementation manner, the adjustment of the initial maximum specification can be a decrease of the initial maximum specification or an increase of the initial minimum specification. For example, the resource management component 122 adjusts the initial maximum specification according to the first running parameter, including: the resource management component 122 determines the resource utilization according to the first running parameter, and adjusts the initial maximum specification to obtain the maximum specification by the resource utilization. For example, the resource utilization * the initial maximum specification can be taken as the decrease amount of the initial maximum specification. The initial maximum specification is adjusted by the decrease amount of the initial maximum specification.
[0274] S452, the resource management component 122 sends a third instruction to the resource pool 130 based on the target specification.
[0275] S453, the resource pool 130 creates the flexible instance 1 in the resource pool 130 according to the target specification carried in the third instruction in response to the third instruction.
[0276] In an optional implementation, the resource pool 130 can refer to the implementation manner of selecting the deployment host in S460 described above to select a second deployment host in the resource pool 130, and deploy the flexible instance 1 on the second deployment host. Details are not described herein. As shown in FIG. 5, the resource pool 130 selects the host 131 as the second deployment host, and deploys the flexible instance 1 on the host 131.
[0277] S454, the resource pool 130 returns the network address of the flexible instance 1 to the resource management component 122.
[0278] S455, the resource management component 122 sends a second instruction to the cluster 110 based on the network address of the flexible instance 1 and the identifier of the rigid instance 1.
[0279] S456, the cluster 110 migrates the information of the rigid instance 1 to the flexible instance 1 in the resource pool 130 based on the network address in response to the second instruction.
[0280] Based on the embodiments provided in FIG. 6, in the case that the cluster 110 does not support the deployment of the flexible instance, the resource management component 122 deploys the flexible instance in the resource pool 130, migrates the rigid instance running in the cluster 110 to the flexible instance in the resource pool 130 by instance migration, and realizes the change of the instance type.
[0281] In an optional implementation, after changing the instance type of the instance in the cluster 110, the resource management component 122 can obtain a second running parameter of the existing flexible instance, and adjust the specification of the flexible instance based on the second running parameter. The adjustment of the specification of the flexible instance can be reducing the specification of the flexible instance, or increasing the specification of the flexible instance.
[0282] It can be understood that after the specification of the flexible instance is adjusted, the vU quantity of the adjusted flexible instance is less than or equal to the maximum vU quantity of the flexible instance, and the memory size of the adjusted flexible instance is less than or equal to the maximum memory size of the flexible instance. For example, the maximum memory size of the flexible instance is the memory size of the rigid instance before the change of the instance type, and the maximum vU quantity of the flexible instance is the vU quantity of the rigid instance before the change of the instance type, so the vU quantity of the adjusted flexible instance is less than or equal to the vU quantity of the rigid instance. The memory size of the adjusted flexible instance is less than or equal to the memory size of the rigid instance.
[0283] For example, as shown in FIG. 7A, the flexible instance 1 and the flexible instance 2 running in the cluster 110 are taken as an example, and the dynamic adjustment of the instance specification includes steps S610A-S630A.
[0284] S610A, the resource management component 122 obtains the running parameter of the flexible instance 1 and the running parameter of the flexible instance 2, and obtains a second running parameter.
[0285] In an optional implementation, the resource management component 122 can obtain the second running parameter by referring to the obtaining manner of the first running parameter in S410, which is not described herein.
[0286] S620A, the resource management component 122 sends a fourth instruction to the cluster 110 according to the second running parameter.
[0287] In an optional implementation, the resource management component 122 can determine the flexible instance that needs to be adjusted according to the second running parameter.
[0288] The following two optional examples are taken to illustrate the implementation of determining the flexible instance that needs to be adjusted.
[0289] In a first optional example, the resource management component 122 can determine the flexible instance that needs to be adjusted according to the QoS parameter of the flexible instance 1 and the QoS parameter of the flexible instance 2.
[0290] For example, the flexible instance whose QoS parameter degradation ratio is greater than or equal to the allowed degradation ratio is determined as the flexible instance that needs to be adjusted.
[0291] In a second optional example, the resource management component 122 can determine the flexible instance that needs to be adjusted according to the resource utilization of the flexible instance 1 and the resource utilization of the flexible instance 2.
[0292] For example, the flexible instance whose resource utilization is less than the threshold of the resource utilization is determined as the flexible instance that needs to be adjusted.
[0293] It should be noted that the above two optional examples are only different implementation manners for determining the flexible instance that needs to be adjusted, and other implementation manners can also be used in actual application, which are not limited by the present application.
[0294] In an optional implementation manner, the fourth instruction can be used to instruct to increase the specification of the flexible instance, or used to instruct to reduce the specification of the flexible instance.
[0295] In a first optional example, the flexible instance that needs to be adjusted has a QoS parameter degradation ratio greater than or equal to the allowed degradation ratio of the flexible instance, and the fourth instruction carries the identification of the flexible instance and a first adjustment parameter. The fourth instruction is used to instruct the deployment host of the flexible instance to increase the specification of the flexible instance that needs to be adjusted, that is, instruct the deployment host to allocate more resources to the flexible instance.
[0296] The first adjustment parameter is used to instruct the increase amplitude of the specification.
[0297] The first adjustment parameter can be determined by the resource management component 122 according to the specification range of the flexible instance that needs to be adjusted, the QoS parameter degradation ratio and the QoS parameter degradation duration. The specification range is used to determine the maximum specification of the flexible instance that needs to be adjusted. Generally, the greater the QoS parameter degradation ratio and the greater the QoS parameter degradation duration, the greater the increase amplitude of the specification of the flexible instance.
[0298] In a second optional example, the flexible instance that needs to be adjusted has a resource utilization less than the threshold of the resource utilization, and the fourth instruction carries the identification of the flexible instance and a second adjustment parameter. The fourth instruction is used to instruct the deployment host of the flexible instance that needs to be adjusted to reduce the specification of the flexible instance that needs to be adjusted, that is, instruct the deployment host to reduce the resources allocated to the flexible instance.
[0299] The second adjustment parameter is used to instruct the decrease amplitude of the specification.
[0300] The second adjustment parameter is determined according to a size range and resource utilization of the adjusted flexible instance. The size range is used to determine the minimum size of the flexible instance that needs to be adjusted. Generally, the lower the resource utilization of the flexible instance, the greater the reduction range of the size of the flexible instance.
[0301] It should be noted that the above two optional examples are only examples of the fourth instruction in different cases. In other embodiments, the fourth instruction can also carry other information, which is not limited by the present application.
[0302] S630A, the cluster 110 receives and responds to the fourth instruction, and adjusts the size of the flexible instance.
[0303] In an optional implementation, in the case that the identification of the flexible instance carried by the fourth instruction indicates the flexible instance 1 and the flexible instance 2, the cluster 110 adjusts the size of the flexible instance 1 according to the first adjustment parameter or the second adjustment parameter in the fourth instruction, and adjusts the size of the flexible instance 2.
[0304] The following describes the implementation of the cluster 110 adjusting the flexible instance 1 by taking the first adjustment parameter and the second adjustment parameter as examples respectively. Similarly, the implementation of the cluster 110 adjusting the flexible instance 2 can refer to the implementation of the flexible instance 1.
[0305] In the first implementation, the fourth instruction carries the first adjustment parameter. The cluster 110 increases the size of the flexible instance 1 according to the first adjustment parameter.
[0306] In an example, if the available resources on the first deployment host where the flexible instance 1 is located are insufficient, the cluster 110 returns a resource insufficient prompt information to the resource management component 122, the resource management component 122 instructs the cluster 110 to abort or migrate the existing instances on the first deployment host except the flexible instance, and then increase the size of the flexible instance 1. Alternatively, the resource management component 122 instructs the cluster 110 to migrate the flexible instance 1 to other idle target host, and the target host increases the size of the flexible instance 1.
[0307] In the second implementation, the fourth instruction carries the second adjustment parameter. The cluster 110 reduces the size of the flexible instance 1 according to the first adjustment parameter.
[0308] It should be noted that the above two implementations are only different implementations of the cluster 110 adjusting the size of the flexible instance. In actual application, there can be other implementations, which are not limited by the present application.
[0309] Based on the embodiments provided in FIG. 7A, after the instance type of the instance in the cluster 110 is changed, the specification of the flexible instance can be dynamically adjusted according to the running parameter of the flexible instance. The flexible scheduling of the specification of the flexible instance enables the physical resources of the host to be better allocated, improves the resource utilization of the host, saves the consumption of electric energy of the cloud management platform, and produces environmental benefits.
[0310] For example, as shown in FIG. 7B, which is a second flowchart of dynamic adjustment of instance specification provided by the embodiments of the present application, the host 131 runs the flexible instance 1 and the host 132 runs the flexible instance 2 in the resource pool 130. Compared with FIG. 7A, in the flowchart shown in FIG. 7B, the resource management component 122 obtains the running parameter of the flexible instance 1 and the running parameter of the flexible instance 2 in the resource pool 130, and obtains the second running parameter (S610B). The resource management component 122 sends a fourth instruction to the resource pool 130 (S620B). The resource pool 130 receives and responds to the fourth instruction, and adjusts the specification of the flexible instance (S630B).
[0311] Based on the embodiments provided in FIG. 7B, after the instance type of the instance in the cluster 110 is changed, the specification of the flexible instance can be dynamically adjusted according to the running parameter of the flexible instance. The flexible scheduling of the specification of the flexible instance enables the physical resources of the host to be better allocated, improves the resource utilization of the host, saves the consumption of electric energy of the cloud management platform, and produces environmental benefits.
[0312] The above mainly takes the shrinkage scenario as an example to introduce the instance scheduling method provided by the embodiments of the present application. In actual application, due to the increase of business load, the number of existing rigid instances in the cluster 110 is insufficient. In order to ensure the stability of the business on the cloud management platform 10, the number of rigid instances in the cluster 110 needs to be increased through the expansion process in the case of insufficient number of existing rigid instances in the cluster 110. As shown in FIG. 8, which is a third flowchart of the instance scheduling method provided by the embodiments of the present application, compared with the flowchart of the instance scheduling method provided in FIG. 5, in the flowchart of the instance scheduling method provided in FIG. 8, the elastic scaling component 123 further includes steps S460-S480 after obtaining the first running parameter.
[0313] S460, the elastic scaling component 123 judges whether the first running parameter meets the expansion requirement.
[0314] In the first optional implementation, the scaling requirement includes an allowed degradation ratio. The elasticity component 123 compares the QoS parameter degradation ratio in the first running parameter with the allowed degradation ratio. If the QoS parameter degradation ratio is greater than or equal to the allowed degradation ratio, the elasticity component 123 determines that the first running parameter satisfies the scaling requirement. If the QoS parameter degradation ratio is less than the allowed degradation ratio, the elasticity component 123 determines that the first running parameter does not satisfy the scaling requirement.
[0315] In the second optional implementation, the scaling requirement includes a QoS parameter threshold. The elasticity component 123 compares the QoS parameter in the first running parameter with the QoS parameter threshold. If the QoS parameter is greater than or equal to the QoS parameter threshold, the elasticity component 123 determines that the first running parameter satisfies the scaling requirement. If the QoS parameter is less than the QoS parameter threshold, the elasticity component 123 determines that the first running parameter does not satisfy the scaling requirement.
[0316] In the third optional implementation, the scaling requirement includes a QoS parameter threshold and an allowed degradation ratio. If the QoS parameter degradation ratio is greater than or equal to the allowed degradation ratio, and / or the QoS parameter is greater than or equal to the QoS parameter threshold, the elasticity component 123 determines that the first running parameter satisfies the scaling requirement. If the QoS parameter degradation ratio is less than the allowed degradation ratio, and the QoS parameter is less than the QoS parameter threshold, the elasticity component 123 determines that the first running parameter does not satisfy the scaling requirement.
[0317] The above three optional implementations are only different implementations in different scenarios where the scaling requirement includes different contents. In some other embodiments, there can be other implementations. The present application does not limit this.
[0318] S470, if the first running parameter satisfies the scaling requirement, the elasticity component 123 sends a fifth instruction to the cluster 110.
[0319] In the first optional implementation, the fifth instruction carries an instance change quantity and a specification of the rigid instance. Similar to the determination of the first adjustment parameter, the instance change quantity is determined according to a maximum instance quantity in the elastic scaling policy, a QoS parameter degradation ratio in the first running parameter, and a QoS parameter degradation duration. The maximum instance quantity is used to determine a maximum value of the instance change quantity. Generally, the greater the QoS parameter degradation ratio and the greater the QoS parameter degradation duration, the greater the corresponding instance change quantity.
[0320] In the second optional implementation, the fifth instruction carries a target number of rigid instances and a specification of the rigid instances. The target number is determined in a similar manner as the instance change number, which will not be described herein. It should be noted that the above two optional implementations are merely for increasing the number of rigid instances in the cluster 110. In actual applications, other implementations can also be used, which will not be limited herein.
[0321] S480, the cluster 110 receives and responds to the fifth instruction to increase the number of rigid instances in the cluster 110.
[0322] In the first optional implementation, the fifth instruction carries an instance change number and a specification of the rigid instances. The cluster 110 creates a new rigid instance on a host of the cluster 110 according to the instance change number. Moreover, the specification of the newly created rigid instance is the same as the specification carried by the fifth instruction.
[0323] In the second optional implementation, the fifth instruction carries a target number and a specification of the rigid instances. The cluster 110 determines a first number of instances that need to be increased according to the target number and the number of existing rigid instances in the cluster 110. The cluster 110 creates a new rigid instance on a host of the cluster 110 according to the first number. Moreover, the specification of the newly created rigid instance is the same as the specification carried by the fifth instruction.
[0324] In the above two optional implementations, the cluster 110 can refer to the implementation of selecting the first deployment host in S450 to select a third deployment host to deploy the rigid instance 3, and create the rigid instance 3 on the third deployment host. Details will not be described herein. As shown in FIG. 8, the cluster 110 selects the host 113 as the third deployment host, and deploys the rigid instance 3 on the host 113.
[0325] In an optional implementation, after the cluster 110 adds the rigid instance, in order to ensure the load balancing among the rigid instances, the load balancer 121 can re-perform the job allocation.
[0326] Based on the embodiments provided in FIG. 8, through the capacity expansion demand identification, it is ensured that the number of rigid instances can be timely increased in the case that the number of existing rigid instances in the cluster 110 is insufficient, the host pressure is reduced, and the stability of the business on the cloud management platform 10 is ensured.
[0327] It should be noted that the application does not limit the execution sequence of FIG. 5 and FIG. 8. In a first example, the elastic scaling component 123 can execute S460 described above first after obtaining the first running parameter. In a case where the first running parameter meets the expansion requirement, the elastic scaling component 123 executes S470 to S480. In a case where the first running parameter does not meet the expansion requirement, S420 to S450 in FIG. 5 are executed. In a second example, the elastic scaling component 123 can execute S420 in FIG. 5 first after obtaining the first running parameter. In a case where the first running parameter meets the contraction requirement, S430 to S450 in FIG. 5 are executed. In a case where the first running parameter meets the non-contraction requirement, S460 to S480 in FIG. 8 are executed.
[0328] For example, the implementation of the example scheduling method provided by the embodiment of the application is described by taking the execution sequence of the first example described above as an example. As shown in FIG. 9, FIG. 9 is a flowchart of an example scheduling method provided by the embodiment of the application. The flowchart of the example scheduling method includes steps.
[0329] S810, the elastic scaling component 123 obtains a first running parameter.
[0330] S820, the elastic scaling component 123 determines whether the first running parameter meets an expansion requirement.
[0331] In an optional implementation, the elastic scaling component 123 allows a first running parameter degradation ratio.
[0332] S830, if the first running parameter meets the expansion requirement, the elastic scaling component 123 performs an expansion process.
[0333] In an optional implementation, after the elastic scaling component 123 performs the expansion process, S890 described below is executed.
[0334] S840, if the first running parameter does not meet the expansion requirement, the elastic scaling component 123 determines whether a resource utilization rate in the first running parameter is less than a resource utilization rate threshold.
[0335] S850, if the resource utilization rate is less than the resource utilization rate threshold, the elastic scaling component 123 determines whether a number of existing instances in the cluster 110 is greater than a number threshold.
[0336] In an optional implementation, if the resource utilization rate is greater than or equal to the resource utilization rate threshold, the elastic scaling component 123 executes S890 described below.
[0337] S860, if the number of existing instances in the cluster 110 is greater than the number threshold, the elastic scaling component 123 performs a contraction process.
[0338] In an optional implementation, after the elastic scaling component 123 performs the scaling-out processing, the following S890 is performed.
[0339] S870, if the number of existing instances in the cluster 110 is less than or equal to the number threshold, the elastic scaling component 123 determines whether the first running parameter satisfies the instance type adjustment condition.
[0340] S880, if the first running parameter satisfies the instance type adjustment condition, the elastic scaling component 123 sends a first instruction to the resource management component 122. The resource management component 122 performs instance type change.
[0341] S890, if the first running parameter does not satisfy the instance type adjustment condition, the elastic scaling component 123 continues to acquire the running parameter of the cluster 110.
[0342] In an optional implementation, the resource management component 122 performs instance type change according to the embodiments provided in S440 above, or in FIG. 7A or FIG. 7B, which will not be repeated here.
[0343] Based on the embodiments provided in FIG. 9, in the case of meeting the scaling-out requirement, the instance type adjustment condition is added to change the instance satisfying the instance type adjustment condition into a flexible instance. In this way, by using the second type instance with floating instance specification, the dynamic adjustment of the instance specification can be realized, so as to guarantee the adaptability between the resource specification of the instance and the actual load requirement of the business. Moreover, the cloud management platform can effectively utilize the instance resource, and improve the resource utilization rate of the cloud management platform.
[0344] The above mainly introduces the instance scheduling method provided in the present application from the interaction between the modules in the resource management system 120 and the interaction between the resource management system 120 and the cluster 110. It can be understood that the resource management system 120 includes corresponding hardware structures and / or software modules for performing various functions. Those skilled in the art can easily realize that the algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0345] The embodiments of the present application can group the functional modules of the resource management system 120 according to the above method examples. For example, each functional module can correspond to each functional group, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the naming and grouping of the modules in the embodiments of the present application are illustrative, and are only a logical functional grouping. Actual implementation can have another grouping manner.
[0346] For example, the resource management system 120 can also be named as an instance scheduling system 90. As shown in FIG. 10, FIG. 10 is a structural schematic diagram of the instance scheduling system 90 provided by the embodiments of the present application. The instance scheduling system 90 shown includes a scaling management module 901 and a resource management module 902.
[0347] The scaling management module 901 is configured to acquire a first running parameter of a first type of instance with fixed specifications running in the cluster 110, determine whether the first running parameter meets an instance type adjustment condition if the first running parameter meets a scaling demand, and send a first instruction to the resource management module 902 if the first running parameter meets the instance type adjustment condition. The scaling demand includes one or more of the following: a quality of service (QoS) guarantee demand, a threshold of resource utilization. The instance type adjustment condition includes a threshold of CPU utilization and a duration. The duration is used to indicate a duration of the first type of instance running with the CPU utilization.
[0348] The resource management module 902 is configured to change the first type of instance to a second type of instance with specification support adjustment in response to the first instruction.
[0349] The scaling management module 901 and the resource management module 902 can be realized by software or by hardware. For example, the implementation manner of the scaling management module 901 is introduced as follows. Similarly, the resource management module 902 can refer to the implementation manner of the scaling management module 901.
[0350] As an example of a software functional unit, the scaling management module 901 can be code running on a compute instance. The compute instance can include at least one of a physical host (computing device), a virtual machine, a container, and further, the compute instance can be one or more. For example, the scaling management module 901 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region, or distributed in different regions. Further, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ), or distributed in different AZs, and each AZ includes one data center or multiple data centers in close geographical proximity. Generally, one region can include multiple AZs.
[0351] Similarly, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC), or distributed in multiple VPCs. Generally, one VPC is set up in one region, and communication between two VPCs in the same region, or between VPCs in different regions, needs to set up a communication gateway in each VPC to realize the interconnection between VPCs through the communication gateway.
[0352] As an example of a hardware functional unit, the scaling management module 901 can include at least one computing device, such as a server, etc. Alternatively, the scaling management module 901 can also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc. The PLD can be implemented by a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0353] The plurality of computing devices included in the scaling management module 901 can be distributed in the same region or in different regions. The plurality of computing devices included in the scaling management module 901 can be distributed in the same AZ or in different AZs. Similarly, the plurality of computing devices included in the scaling management module 901 can be distributed in the same VPC or in multiple VPCs. The plurality of computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0354] It should be noted that in other embodiments, the scaling management module 901 can be used to perform any step in the instance scheduling method. The scaling management module 901 can be used to perform any step in the instance scheduling method. The steps implemented by the scaling management module 901 and the resource management module 902 can be specified as needed. The entire function of the instance scheduling device 12 is achieved by the scaling management module 901 and the resource management module 902 respectively implementing different steps in the instance scheduling method.
[0355] FIG. 11 provides a cloud management platform including a computer 400 and at least one computer 600. The computer 400 and the computer 600 are connected through a network.
[0356] The computer 400 includes a processor 401, a network device 402, a bus 403, and a memory 404. The processor 401, the network device 402, and the memory 404 communicate through the bus 403. The processor 401 can be a central processing unit (CPU). The memory 404 can include a volatile memory such as a random access memory (RAM) or a non-volatile memory such as a read-only memory (ROM), a flash memory, an HDD, or an SSD. The network device 402 is a network interface card.
[0357] The memory 404 stores executable instructions that are executed by the processor 401 to implement various modules of the instance scheduling system 90 to perform the method shown in FIG. 3 or FIG. 5. The memory 404 can also include executable instructions required to run an operating system (OS). The OS can be LINUXTM, UNIXTM, WINDOWSTM, etc.
[0358] The computer 600, i.e., the host computer, comprises a processor 601, a network device 602, a bus 603, and a memory 604. The computer 600 has the same organization structure as the computer 400. The memory 604 stores executable instructions. The processor 601 executes the executable instructions to change at least one rigid instance into a rigid instance or change at least one flexible instance into a rigid instance.
[0359] The present application also provides a computing device cluster. The computing device cluster comprises at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device, such as a desktop computer, a notebook computer, or a smart phone.
[0360] As shown in FIG. 12, the computing device cluster comprises at least one computing device 100. The computing device 100 comprises a processor 104, a communication interface 108, a bus 102, and a memory 106. The computing device 100 has the same organization structure as the computer 400 in FIG. 11.
[0361] The memory 106 in one or more computing devices 100 in the computing device cluster can store the same instructions for executing the instance scheduling method.
[0362] In some possible implementations, the memory 106 in one or more computing devices 100 in the computing device cluster can also respectively store partial instructions for executing the instance scheduling method. In other words, the combination of one or more computing devices 100 can collectively execute the instructions for executing the instance scheduling method.
[0363] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, respectively for executing partial functions of the instance scheduling system 90. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules of the scaling management module 901 and the resource management module 902.
[0364] In some possible implementations, one or more computing devices in the computing device cluster can be connected through a network. The network can be a wide area network or a local area network, etc. FIG. 13 shows one possible implementation. As shown in FIG. 13, two computing devices 100A and 100B are connected through a network. Specifically, the communication interface in each computing device is connected to the network. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the scaling management module 901. Meanwhile, the memory 106 in the computing device 100B stores instructions for executing the functions of the resource management module 902.
[0365] The connection between the cluster of computing devices shown in FIG. 13 can be such that the function implemented by the scalable management module 901 is executed by the computing device 100A, considering that the instance scheduling method provided in the present application needs to obtain the running parameters of multiple instances and needs to store a large amount of data.
[0366] It should be understood that the function of the computing device 100A shown in FIG. 13 can also be completed by multiple computing devices 100. Similarly, the function of the computing device 100B can also be completed by multiple computing devices 100.
[0367] The embodiments of the present application also provide a computer program product containing instructions. The computer program product can be software or a program product containing instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to perform the instance scheduling method described above.
[0368] For example, when the computer program product is run on at least one computing device, the at least one computing device is caused to perform the instance scheduling method shown in FIG. 3 or FIG. 5.
[0369] The embodiments of the present application also provide a computer readable storage medium. All or part of the processes of the method embodiments described above can be completed by a computer program instructing related hardware, which can be stored in the computer readable storage medium. When the program is executed, the program can include the processes of the above method embodiments. The computer readable storage medium can be the terminal of any of the preceding embodiments, such as an internal storage unit including a data transmission end and / or a data receiving end, for example, a hard disk or a memory of the terminal. The computer readable storage medium described above can also be an external storage device of the terminal, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer readable storage medium described above can include both the internal storage unit and the external storage device of the terminal. The computer readable storage medium is used to store the computer program described above and other programs and data required by the terminal. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.
[0370] It should be noted that the terms "first", "second" and "third" and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. It is to be understood that the terms "comprising", "including", "having" and "containing" are to be construed open-ended, allowing for elements, components, etc. that are additional to those listed. Elements, components, units, etc. listed after "comprising" "including" "having", "containing", "with", "involving" or "comprised of" are meant to be optional except for the elements, components, units or the like specifically identified as essential.
[0371] It should be understood that, in the present application, "at least one" refers to one or more, "multiple" refers to two or more, "at least two" refers to two or three and three or more, and "and / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0372] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A. For example, B can be determined according to A. It should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information. In addition, "connection" appearing in the embodiments of the present application means direct connection or indirect connection and various connection manners to achieve communication between devices, which is not limited by the embodiments of the present application.
[0373] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0374] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or in the form of a software product that contributes to the prior art or the whole or part of the technical solutions. The software product is stored in a storage medium and includes a plurality of instructions for causing a device, such as a single-chip microcomputer, a chip, or a processor, to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various storage program code mediums.
[0375] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An example scheduling method, characterized by, The method is applied to a cloud management platform that manages first-type instances with fixed specifications, the specifications including a number of virtual central processing units (vCPUs) and a memory size, and the method comprises: obtaining first running parameters of the first-type instance running a target service; if the first running parameters meet a capacity reduction requirement, determining whether the first running parameters meet an instance type adjustment condition; wherein the capacity reduction requirement includes one or more of a quality of service (QoS) guarantee requirement and a threshold of resource utilization, and the instance type adjustment condition includes thresholds of CPU utilization and a duration; the duration is used to indicate a duration during which the first-type instance runs at the CPU utilization; if the first running parameters meet the instance type adjustment condition, changing the first-type instance into a second-type instance for running the target service.
2. The method of claim 1, wherein the changing the first-type instance into the second-type instance comprises: creating the second-type instance according to a target specification; the target specification is determined based on a specification of the first-type instance; the second-type instance supports a number of vCPUs that is less than or equal to that of the first-type instance and a size that is less than or equal to that of the first-type instance; migrating information in the first-type instance to the second-type instance. The cloud management platform further comprises a resource pool, and the resource pool runs flexible instances; the method further comprises:
3. The method according to claim 1 or 2, characterized in that, the creating the second-type instance according to the target specification comprises: creating the second-type instance in the resource pool according to the target specification. After the changing the first-type instance into the second-type instance, the method further comprises:
4. The method according to any one of claims 1 to 3, characterized in that, obtaining second running parameters of the second-type instance; adjusting a specification of the second-type instance according to the second running parameters; an adjusted second-type instance supports a number of vCPUs that is less than or equal to that of the first-type instance and a size that is less than or equal to that of the first-type instance. The method further comprises:
5. The method according to any one of claims 1 to 4, characterized in that, providing a first interface; the first interface includes an instance type adjustment condition input box; in response to a first operation of a tenant on the first interface, obtaining the instance type adjustment condition. The cloud management platform further stores a number threshold of the first-type instances; in a case where the number threshold is greater than or equal to a number of the first-type instances, the operation of determining whether the first running parameters meet the instance type adjustment condition is performed.
6. The method according to any one of claims 1 to 5, characterized in that, In a case where the number threshold is less than the number of the first-type instances, the method further comprises:
7. The method of claim 6, wherein, reducing the number of the first-type instances. The cloud management platform further stores an allowed degradation ratio; the allowed degradation ratio is used to determine whether to increase the number of the first-type instances.
8. The method according to any one of claims 1 to 7, characterized in that, The instance scheduling system comprises a scaling management module and a resource management module; 9. An example scheduling system, characterized by, The scaling management module is configured to acquire a first running parameter of a first type of instance with fixed specifications running in the cluster, determine whether the first running parameter meets an instance type adjustment condition if the first running parameter meets a scaling demand, and send a first instruction to the resource management module if the first running parameter meets the instance type adjustment condition; the scaling demand includes one or more of a quality of service (QoS) guarantee demand and a threshold of resource utilization rate; The instance type adjustment condition includes a threshold of CPU utilization rate and a threshold of duration, where the duration is used to indicate a duration during which the first type of instance runs at the CPU utilization rate. The resource management module is configured to change the first type of instance to a second type of instance with specifications that support adjustment in response to the first instruction.
10. The system of claim 9, wherein, The resource management module is configured to create the second type of instance in the cluster according to a target specification, and migrate information in the first type of instance to the second type of instance; the target specification is determined based on a specification of the first type of instance; the second type of instance supports a number of virtual CPUs (vCPUs) that is less than or equal to a number of vCPUs of the first type of instance, and a size of the second type of instance is less than or equal to a size of the first type of instance.
11. The system of claim 9, wherein, The resource management module is configured to create the second type of instance in a resource pool according to a target specification, and migrate information in the first type of instance to the second type of instance; the target specification is determined based on a specification of the first type of instance; the second type of instance supports a number of vCPUs that is less than or equal to a number of vCPUs of the first type of instance, and a size of the second type of instance is less than or equal to a size of the first type of instance; the resource pool runs a flexible instance.
12. The system of any one of claims 9 to 11, wherein, The resource management module is further configured to acquire a second running parameter of the second type of instance, and adjust a specification of the second type of instance according to the second running parameter; an adjusted second type of instance supports a number of vCPUs that is less than or equal to a number of vCPUs of the first type of instance, and an adjusted size of the second type of instance is less than or equal to a size of the first type of instance.
13. The system of any one of claims 9 to 12, wherein, The scaling management module is configured to provide a first interface, and obtain the instance type adjustment condition in response to a first operation of a tenant on the first interface; the first interface includes an instance type adjustment condition input box.
14. The system of any one of claims 9 to 13, wherein, The scaling management module further stores a quantity threshold of the first type of instance; the scaling management module is configured to perform the operation of determining whether the first running parameter meets the instance type adjustment condition if a quantity of the first type of instance is less than or equal to the quantity threshold.
15. The system of claim 14, wherein, The scaling management module is further configured to reduce the quantity of the first type of instance if the quantity of the first type of instance is greater than the quantity threshold.
16. The system of any one of claims 9 to 15, wherein, The scaling management module further stores an allowed degradation ratio; the allowed degradation ratio is used to determine whether to increase the quantity of the first type of instance.
17. A cluster of computing devices, characterized in that, The cluster of computing devices includes at least one computing device, and each computing device includes a processor and a memory; The processor of the at least one computing device is to execute instructions stored in a memory of the at least one computing device to cause the cluster of computing devices to perform the method of any of claims 1-8.
18. A computer-readable storage medium, characterized in that, A computer program product comprising computer program instructions to, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method of any of claims 1-8.
19. A computer program product comprising instructions, characterized in that, The computer program instructions, when executed by the cluster of computing devices, cause the cluster of computing devices to perform the method of any of claims 1-8.