Instance scheduling method and apparatus

By recording application instance migration information by the management node and migrating application instances when resource usage reaches a preset value, the problem of limited Pod expansion caused by limited hardware resources of real nodes is solved, achieving efficient utilization of resource pools and cost reduction.

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

Patent Information

Application Number
PCT/CN2025/080830
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-09
Filing Date
2025-03-05
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

In a Kubernetes cluster, the limited hardware resources of real nodes lead to limitations in Pod scaling.

Method used

The management node records the migration information of application instances, allowing or prohibiting their migration to the second resource pool. When the resource usage reaches a preset value, application instances using more resources are migrated to the second resource pool, thereby releasing hardware resources and ensuring that the first resource pool has sufficient resources to support the creation of new application instances.

Benefits of technology

This avoids limitations on Pod expansion, ensures the normal operation of new application instances, improves resource pool utilization, and reduces deployment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025080830_12022026_PF_FP_ABST
    Figure CN2025080830_12022026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are an instance scheduling method and an apparatus, relating to the technical field of cloud computing. The method comprises: on the basis of application instance information, recording a first application instance as an application instance that is not allowed to migrate to a second resource pool, and recording a second application instance as an application instance that is allowed to migrate to the second resource pool; acquiring an application instance creation request input by a tenant and used for requesting creating in a first resource pool a third application instance having a predetermined hardware resource demand, thereby creating the third application instance in the first resource pool; and acquiring a resource usage amount of the first resource pool and then, when the resource usage amount is greater than or equal to a first preset value, migrating the second application instance from the first resource pool to the second resource pool, a third hardware resource being matched with the predetermined hardware resource demand. Corresponding hardware resources are kept in the first resource pool to satisfy the third application instance in the first resource pool, thus ensuring that the third application instance can run normally.
Need to check novelty before this filing date? Find Prior Art

Description

An instance scheduling method and device

[0001] The present application claims priority from the Chinese patent application No. 202411098850.X filed on August 9, 2024, and entitled "An instance scheduling method and device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of cloud computing, and in particular to an instance scheduling method and device. BACKGROUND

[0003] Elastic scheduling refers to dynamically adjusting the allocation and use of resources (computing resources, storage resources, etc.) according to the load and resource requirements of a cloud computing platform. For a kubernetes cluster, a virtual kubelet can be used to add virtual nodes. When the kubernetes cluster migrates a container group (Pod) between real nodes and virtual nodes, only a single strategy is used, such as a strategy indicating that a Pod on a real node is not migrated to a virtual node. Since the hardware resources of a real node are limited, the expansion of a Pod on a real node will be limited. SUMMARY

[0004] The present application provides an instance scheduling method and device to solve the problem that when a single strategy is used, the hardware resources of a real node are limited, resulting in limited expansion of a Pod on the real node.

[0005] The present application adopts the following technical solutions.

[0006] In a first aspect, an instance scheduling method is provided. The instance scheduling method can be applied to a computer system or a computing device supporting the computer system to implement the instance scheduling method. The computing device can be a server, a terminal, or the like. In one possible example, the instance scheduling method is applied to a cloud management platform (also referred to as a management node), which is configured to manage a first resource pool and a second resource pool. The first resource pool includes a first server cluster, and the second resource pool includes a second server cluster. A plurality of application instances are arranged in the first resource pool, and the plurality of application instances include a first application instance and a second application instance. The following describes an example in which the management node implements the instance scheduling method. The instance scheduling method includes: recording, by the management node, the first application instance as an application instance that is not allowed to be migrated to the second resource pool according to application instance information input by a tenant, and recording the second application instance as an application instance that is allowed to be migrated to the second resource pool. Further, the management node obtains an application instance creation request input by the tenant for requesting to create a third application instance with a predetermined hardware resource requirement in the first resource pool, and creates the third application instance in the first resource pool according to the application instance creation request. The management node obtains a resource usage of the first resource pool, and further migrates the second application instance from the first resource pool to the second resource pool in a case where the resource usage is greater than or equal to a first preset value. The first application instance uses a first hardware resource of the first server cluster, the second application instance uses a second hardware resource of the first server cluster, and the third application instance uses a third hardware resource of the first server cluster. The third hardware resource matches the predetermined hardware resource requirement. The second application instance uses a fourth hardware resource of the second server cluster, and the fourth hardware resource is consistent with the second hardware resource.

[0007] In the present application, the management node reserves corresponding hardware resources in the first resource pool to meet the creation of a new application instance (the third application instance) in the first resource pool, thereby avoiding the problem of limited Pod expansion and ensuring that the third application instance can operate normally. Further, the management node migrates the second application instance that is allowed to be migrated to the second resource pool from the first resource pool to the second resource pool when the resource usage of the first resource pool is greater than or equal to the first preset value, thereby releasing the first resource pool occupied by the second application instance and ensuring that the first resource pool has sufficient hardware resources when the application instance in the first resource pool is expanded, so that the application instance can operate normally. The management node only migrates the application instance that is allowed to be migrated to the second resource pool, and retains the application instance that is not allowed to be migrated to the second resource pool in the first resource pool, thereby realizing the migration operation that meets the tenant's demand according to the application instance information configured by the tenant.

[0008] In one possible scenario, the hardware resources of the first server cluster include one or more combinations of computing resources, storage resources, and network resources.

[0009] In one possible case, the application instance is used to indicate a pod or a virtual machine.

[0010] Three possible cases are provided below for the first resource pool and the second resource pool.

[0011] In the first possible case, the first resource pool is a local resource pool, and the second resource pool is a remote resource pool.

[0012] In the second possible case, the first resource pool is a first remote resource pool, and the second resource pool is a second remote resource pool.

[0013] In one possible example, the latency of the application instance running in the first remote resource pool is less than the latency of the application instance running in the second remote resource pool.

[0014] In one possible example, the usage cost of the first remote resource pool is lower than the usage cost of the second remote resource pool.

[0015] For example, the first resource pool is charged in a prepayment manner, and the second resource pool is charged in an on-demand manner.

[0016] In the third possible case, the first resource pool is a first local resource pool, and the second resource pool is a second local resource pool.

[0017] In one possible example, the latency of the application instance running in the first local resource pool is less than the latency of the application instance running in the second local resource pool.

[0018] In one possible implementation, the first application instance has a first field. If the first field is a first value, the first application instance is allowed to migrate to the second resource pool. If the first field is a second value, the first application instance is not allowed to migrate to the second resource pool. Similarly, the second application instance also has the first field. If the first field is the first value, the second application instance is allowed to migrate to the second resource pool. If the first field is the second value, the second application instance is not allowed to migrate to the second resource pool.

[0019] In one possible example, the first field of the application instance is stored in a database managed by a cloud management platform.

[0020] For example, the database can be ETCD (a distributed key-value storage database).

[0021] In one possible implementation, the first application instance has a second field. If the second field is a third value, the first application instance is allowed to migrate from the first resource pool to the second resource pool. If the second field is a fourth value, the first application instance is allowed to migrate from the second resource pool to the first resource pool.

[0022] In a possible example, the second field has two characters, if the first character is the third value (such as 1), the first application instance allows migration from the first resource pool to the second resource pool. If the second character is the fourth value (such as 1), the first application instance allows migration from the second resource pool to the first resource pool.

[0023] Similarly, the second application instance has a second field, if the second field is the third value, the second application instance allows migration from the first resource pool to the second resource pool, if the second field is the fourth value, the second application instance allows migration from the second resource pool to the first resource pool.

[0024] In a possible example, the second field of the above application instance is stored in a database managed by the cloud management platform.

[0025] In a possible implementation, the first resource pool is further provided with a fourth application instance, and the fourth application instance uses a fifth hardware resource of the first server cluster. The instance scheduling method further includes: the management node records, according to the grouping information input by the tenant, that the fourth application instance and the second application instance belong to the same group. The management node migrates the second application instance from the first resource pool to the second resource pool, including: the management node migrates the second application instance and the fourth application instance from the first resource pool to the second resource pool. The second application instance uses a sixth hardware resource of the second server cluster, and the sixth hardware resource is consistent with the fifth hardware resource.

[0026] In the present application, the management node migrates the second application instance and the fourth application instance belonging to the same group to the second resource pool, and then the communication delay between the second application instance and the fourth application instance is low during the running of the second application instance and the fourth application instance, thereby improving the service performance of the second application instance and the fourth application instance.

[0027] In a possible case, the second application instance and the fourth application instance have the same grouping identifier.

[0028] In a possible example, the database managed by the management node stores a third field of the second application instance and a third field of the fourth application instance, and the value of the third field is used to indicate the grouping identifier. The application instances with the same value of the third field belong to the same group.

[0029] For example, the value of the third field corresponding to the second application instance is the same as the value of the third field corresponding to the fourth application instance.

[0030] In a possible implementation, the plurality of instances further includes a fifth application instance, and the instance scheduling method further includes: obtaining, by the management node, an application instance cancel request for the fifth application instance input by the tenant, and then stopping, by the management node, running of the fifth application instance in the first resource pool and releasing, by the management node, the seventh hardware resource occupied by the fifth application instance in the first resource pool according to the application instance cancel request. In addition, the management node obtains the resource idle amount of the first resource pool, and in a case where the resource idle amount is greater than or equal to a second preset value, the management node migrates the second application instance from the second resource pool to the first resource pool, where the resource idle amount is used to indicate the overall idle amount of the hardware resources of the first server cluster.

[0031] In this application, after the management node stops running the fifth application instance and releases the seventh hardware resource occupied by the fifth application instance in the first resource pool, it is determined that the resource idle amount of the first resource pool is greater than or equal to the second preset value, and then the second application instance is migrated from the second resource pool to the first resource pool, which can improve the resource utilization rate of the first resource pool. In a case where the charging mode of the first resource pool is a prepayment mode and the payment mode of the second resource pool is a pay-as-you-go mode, the deployment cost of the application instance can be reduced due to the improved resource utilization rate of the first resource pool.

[0032] In a possible implementation, the first application instance includes M containers running in the first server cluster, where M is a positive integer. The instance scheduling method further includes: confirming, by the management node, that the number of the M containers of the first application instance is scaled down to N containers, and obtaining, by the management node, the resource idle amount of the first resource pool, and in a case where the resource idle amount is greater than or equal to a second preset value, migrating, by the management node, the second application instance from the second resource pool to the first resource pool. Wherein, N is less than M, and N is a positive integer, and the resource idle amount is used to indicate the overall idle amount of the hardware resources of the first server cluster.

[0033] In this application, the management node determines that the first application instance is scaled down, and in a case where the resource idle amount of the first resource pool is greater than or equal to the second preset value after scaling down, the second application instance is migrated from the second resource pool to the first resource pool, which can improve the resource utilization rate of the first resource pool. In a case where the charging mode of the first resource pool is a prepayment mode and the payment mode of the second resource pool is a pay-as-you-go mode, the deployment cost of the application instance can be reduced due to the improved resource utilization rate of the first resource pool.

[0034] In a possible implementation, the management node obtains a processing strategy input by the tenant. The processing strategy is used to indicate that the application instance is migrated between the first resource pool and the second resource pool when a preset condition is met.

[0035] In a possible example, the processing strategy comprises: instructing the management node to migrate the second application instance in the first resource pool to the second resource pool when the resource usage is greater than or equal to a first preset value; and instructing the management node to migrate the second application instance from the second resource pool to the first resource pool when the resource idle amount is greater than or equal to a second preset value.

[0036] In another possible example, the processing strategy further comprises: the first resource pool supports a predetermined resource (hardware resource), and instructing the management node to migrate the application instance in the first resource pool to the second resource pool when the resource idle amount is less than or equal to the predetermined hardware resource requirement, so as to ensure that the resource idle amount of the first resource pool is greater than or equal to the predetermined resource amount.

[0037] In yet another possible example, the processing strategy further comprises: multiple application instances belonging to the same group should be simultaneously located in the first resource pool or the second resource pool, that is, when the management node migrates the second application instance from the first resource pool to the second resource pool, the fourth application instance belonging to the same group as the second application instance should also be migrated from the first resource pool to the second resource pool.

[0038] For example, the processing strategy described above can be a configuration file, and the configuration file can be in the form of a YAML (YAML ain't markup language) file.

[0039] In a possible implementation, the management node migrates the second application instance from the first resource pool to the second resource pool, comprising: the management node creates a copy of the second application instance in the second resource pool, and if the copy of the second application instance meets a running condition, sends a first instruction for instructing the first resource pool to offline the second application instance, and sends a second instruction for running the copy of the second application instance to the second resource pool.

[0040] In a possible case, the copy of the second application instance has a fourth field, and if the fourth field is a fifth value, the copy of the first application instance meets the running condition.

[0041] In a possible example, the fourth field of the copy of the second application instance is stored in a database managed by the cloud computing platform.

[0042] For example, the fifth value is ready.

[0043] In a second aspect, an example instance scheduling apparatus is provided. The instance scheduling apparatus is applied to a computer system or a computing device supporting the computer system to implement the instance scheduling method. The instance scheduling apparatus comprises various modules for implementing the instance scheduling method in the first aspect or any of the optional implementation manners of the first aspect. In one possible example, the instance scheduling apparatus is applied to a cloud management platform (e.g., a management node or a computing device). The cloud management platform is configured to manage a first resource pool and a second resource pool. The first resource pool comprises a first server cluster. The second resource pool comprises a second server cluster. A plurality of application instances are arranged in the first resource pool. The plurality of application instances comprises a first application instance and a second application instance. The instance scheduling apparatus comprises a first configuration module, a first acquisition module, a creation module, a second acquisition module, and a migration module.

[0044] The first configuration module is configured to record the first application instance as an application instance that is not allowed to be migrated to the second resource pool and record the second application instance as an application instance that is allowed to be migrated to the second resource pool according to application instance information input by a tenant. The first application instance uses first hardware resources of the first server cluster. The second application instance uses second hardware resources of the first server cluster.

[0045] The first acquisition module acquires an application instance creation request input by the tenant. The application instance creation request is configured to request to create a third application instance with predetermined hardware resource requirements in the first resource pool.

[0046] The creation module creates the third application instance in the first resource pool according to the application instance creation request. The third application instance uses third hardware resources of the first server cluster. The third hardware resources match the predetermined hardware resource requirements.

[0047] The second acquisition module acquires resource usage of the first resource pool. The resource usage is configured to indicate overall usage of the hardware resources of the first server cluster.

[0048] The migration module migrates the second application instance from the first resource pool to the second resource pool in a case where the resource usage is greater than or equal to a first preset value. The second application instance uses fourth hardware resources of the second server cluster. The fourth hardware resources are consistent with the second hardware resources.

[0049] For more detailed implementation of the instance scheduling apparatus, refer to the description of any of the implementation manners of the first aspect and the content of the following specific embodiments, which will not be repeated here.

[0050] In a third aspect, a chip is provided. The chip comprises a processor and a power supply circuit. The power supply circuit is configured to supply power to the processor. The processor is configured to execute the method in the first aspect or any of the possible implementation manners of the first aspect.

[0051] In a fourth aspect, the present application provides a computing device cluster. The computing device cluster comprises at least one computing device, the computing device comprising a memory and a processor, the memory being configured to store computer instructions; and the processor being configured to execute the computer instructions to implement the method in the first aspect or any possible implementation of the first aspect.

[0052] In a fifth aspect, the present application provides a computer readable storage medium, the storage medium storing computer programs or instructions, when the computer programs or instructions are executed by a processing device, the method in the first aspect or any possible implementation of the first aspect is implemented.

[0053] In a sixth aspect, the present application provides a computer program product, the computer program product comprising computer programs or instructions, when the computer programs or instructions are executed by a processing device, the method in the first aspect or any possible implementation of the first aspect is implemented.

[0054] The beneficial effects of the second aspect to the sixth aspect above can refer to the first aspect or any possible implementation of the first aspect, which will not be repeated here. On the basis of the implementation manners of the aspects above, the present application can be further combined to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS

[0055] FIG. 1 is a schematic diagram of a computer system provided by the present application;

[0056] FIG. 2 is a flowchart of an example scheduling method provided by the present application;

[0057] FIG. 3 is a flowchart of an example scheduling method provided by the present application;

[0058] FIG. 4 is a flowchart of an example scheduling method provided by the present application;

[0059] FIG. 5 is a schematic diagram of an example scheduling device provided by the present application;

[0060] FIG. 6 is a schematic diagram of an example scheduling device provided by the present application;

[0061] FIG. 7 is a schematic diagram of a computing device provided by the present application;

[0062] FIG. 8 is a schematic diagram of a computing device cluster provided by the present application;

[0063] FIG. 9 is a schematic diagram of the connection between computing devices provided by the present application. DETAILED DESCRIPTION

[0064] To solve the problem that the hardware resources of the real nodes are limited when a single strategy is used, resulting in limited Pod expansion on the real nodes. The application provides an instance scheduling method. The management node records a first application instance as an application instance that is not allowed to migrate to a second resource pool according to the application instance information input by the tenant, and records a second application instance as an application instance that is allowed to migrate to the second resource pool. Further, the management node obtains an application instance creation request input by the tenant for requesting to create a third application instance with a predetermined hardware resource requirement in the first resource pool, so as to create the third application instance in the first resource pool according to the application instance creation request. The management node obtains the resource usage of the first resource pool, and further migrates the second application instance from the first resource pool to the second resource pool in the case that the resource usage is greater than or equal to a first preset value. The first application instance uses a first hardware resource of a first server cluster, the second application instance uses a second hardware resource of the first server cluster, and the third application instance uses a third hardware resource of the first server cluster, the third hardware resource matching the predetermined hardware resource requirement. The second application instance uses a fourth hardware resource of a second server cluster, and the fourth hardware resource is consistent with the second hardware resource.

[0065] In the application, the management node reserves corresponding hardware resources in the first resource pool to meet the creation of a new application instance (the third application instance) in the first resource pool, avoiding the problem of limited Pod expansion, and ensuring that the third application instance can run normally. In addition, the management node migrates the second application instance that is allowed to migrate to the second resource pool from the first resource pool to the second resource pool when the resource usage of the first resource pool is greater than or equal to the first preset value, so that the first resource pool occupied by the second application instance can be released, ensuring that the first resource pool has sufficient hardware resources when the application instance in the first resource pool is expanded, and thus the application instance can run normally. The management node only migrates the application instance that is allowed to migrate to the second resource pool, and keeps the application instance that is not allowed to migrate to the second resource pool in the first resource pool, so as to realize the migration operation that meets the tenant's demand according to the application instance information configured by the tenant.

[0066] In order to facilitate understanding, first, the technical terms involved in the application are introduced.

[0067] The local resource pool refers to a node resource set composed of real nodes.

[0068] The elastic resource pool, also known as the remote resource pool, refers to a remote resource set corresponding to a virtual node.

[0069] The real node refers to a node registered to the kubernetes cluster by a physical machine or a virtual machine, i.e. including a virtual machine node and a physical machine node.

[0070] Virtual machine node refers to a virtual machine instance created in a virtualization environment. These virtual machines can also be added to the cluster as kubernetes nodes to provide computing resources or storage resources to containers.

[0071] Physical machine node refers to a physical server or bare machine device. By installing it as a kubernetes node (Node), kubernetes can use its computing or storage resources to run containers.

[0072] Virtual node refers to a node registered by a non-real physical machine or virtual machine. For kubernetes, a node can be registered to kubernetes through virtual kubelet technology. The virtual node can be used to carry the container scheduled by the cluster and forward it to the real container running in the remote resource pool.

[0073] For example, a local resource pool is deployed with a Kubernetes cluster. To increase the capacity of the Kubernetes cluster to deploy pod or to expand when the local resource pool is exhausted, a remote resource pool can be accessed to the Kubernetes cluster through Virtual Kubelet.

[0074] Next, the example scheduling method provided by the present application will be described in detail in combination with the accompanying drawings.

[0075] First, referring to FIG. 1, FIG. 1 is a schematic diagram of a computer system provided by the present application. As shown in FIG. 1, the computer system includes a management node 110, a first resource pool 120, and a second resource pool 130. The management node 110, the first resource pool 120, and the second resource pool 130 can communicate with each other through a wired manner or a wireless manner.

[0076] In the present application, the management node 110 can also be referred to as a cloud management platform. The management node 110 is used to manage the first resource pool 120 and the second resource pool 130.

[0077] For example, the management node 110 is used to manage one or more application instances set on the first resource pool 120 and one or more application instances set on the second resource pool 130.

[0078] For example, the management node 110 is used to schedule the application instances in the first resource pool 120 to the second resource pool 130.

[0079] For example, the management node 110 is used to schedule the application instances in the second resource pool 130 to the first resource pool 120.

[0080] The first resource pool 120 includes a first server cluster, and the first server cluster provides computing resources, storage resources, network resources, and the like for the first resource pool 120. The second resource pool 130 includes a second server cluster, and the second server cluster provides computing resources, storage resources, network resources, and the like for the second resource pool 130.

[0081] For example, the first server cluster can include a worker node 121, a worker node 122, and a worker node 123. The second server cluster can include a worker node 131, a worker node 132, and a worker node 133. The aforementioned worker nodes can also be referred to as computing devices or working devices, which can be used to perform corresponding tasks, such as performing computing tasks or training tasks assigned by the management node 110. The management node 110 can also be referred to as a computing device or a control device, which can be used to schedule application instances deployed on the worker nodes. For details of the computing device, refer to the description of FIG. 7 below, which will not be repeated here.

[0082] The wired communication can be Ethernet, optical fiber, various peripheral component interconnect express (PCIe) buses arranged inside the computer system to connect the management node 110, the first resource pool 120, and the second resource pool 130 two by two, and the like.

[0083] The wireless communication can be Internet, wireless fidelity (WIFI), ultra wide band (UWB) technology, and the like.

[0084] In one possible example, the computer system can further include a terminal 140, a terminal 150, and a terminal 160.

[0085] The terminal 140, the terminal 150, and the terminal 160 can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch), a smart home device (such as a television), a vehicle-mounted computer, a game console, and an augmented reality (AR) / virtual reality (VR) device, and the like. The specific device form of the terminal 140, the terminal 150, and the terminal 160 is not specially limited in the present application.

[0086] In another possible example, the terminal 140, the terminal 150, and the terminal 160 are independently arranged and communicatively connected to the computer system.

[0087] It should be noted that the architecture of the computer system shown in FIG. 1 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 are not limited thereto. For example, the computer system can further include more management nodes or resource pools.

[0088] The following describes a scenario to which the instance scheduling method provided by the present application can be applied.

[0089] In a first possible scenario, the instance scheduling method provided by the present application can be applied in a hybrid cloud. The first resource pool 120 is a local resource pool, and the second resource pool 130 is a remote resource pool. The management node 110 is configured to schedule instances between the local resource pool and the remote resource pool.

[0090] In this case, the priority of the local resource pool is higher than that of the remote resource pool.

[0091] For example, the use cost of the local resource pool is lower than that of the remote resource pool, and therefore, the priority of the local resource pool is higher in order to reduce the use cost.

[0092] For example, the local resource pool is a group of computing device components purchased by a tenant, and the remote resource pool is provided by a cloud service provider.

[0093] For example, the local resource pool is charged on a yearly or monthly basis, i.e., the billing mode of the local resource pool is a prepayment mode, and the remote resource pool is charged according to the usage amount of resources (computing resources, storage resources, or network resources), i.e., the billing mode of the remote resource pool is a pay-as-you-go mode. The foregoing local resource pool can be formed by a group of work nodes purchased by a tenant from a cloud service provider.

[0094] In a second possible scenario, the instance scheduling method provided by the present application can be applied in a public cloud. The first resource pool 120 is a first remote resource pool, and the second resource pool 130 is a second remote resource pool. The management node 110 is configured to schedule instances between the first remote resource pool and the second remote resource pool.

[0095] In this case, the priority of the first remote resource pool is higher than that of the second remote resource pool.

[0096] For example, the use cost of the first remote resource pool is lower than that of the second remote resource pool, and therefore, the priority of the first remote resource pool is higher in order to reduce the use cost.

[0097] For example, the first remote resource pool is charged on a yearly or monthly basis, and the second remote resource pool is charged according to the usage amount of resources (computing resources, storage resources, or network resources).

[0098] In a third possible scenario, the example scheduling method provided by the present application can be applied in a private cloud. The first resource pool 120 is a first local resource pool, and the second resource pool 130 is a second local resource pool. The management node 110 is configured to schedule the instance between the first local resource pool and the second local resource pool.

[0099] The priority of the first local resource pool is higher than the priority of the second local resource pool.

[0100] For example, the use cost of the first local resource pool is lower than the use cost of the second local resource pool, and therefore, the priority of the first local resource pool is higher in order to reduce the use cost.

[0101] For another example, the use latency of the first local resource pool is lower than the use latency of the second local resource pool, and therefore, the priority of the first local resource pool is higher in order to reduce the use latency.

[0102] The above three possible application scenarios are only examples provided by the present application, and should not be construed as a limitation on the present application. In another possible application scenario, the worker nodes included in the first remote resource pool and the second remote resource pool described above can be worker nodes provided by different cloud service manufacturers.

[0103] The method provided by the present application can be applied to container clusters, virtual machine clusters, etc.; the container cluster is, for example, kubernetes, and the virtual machine cluster is, for example, openstack.

[0104] The example scheduling method provided by the present application is applied to the first possible scenario described above and is applicable to kubernetes as an example, and the example scheduling method provided by the present application can be applied to the computer system shown in FIG. 1. FIG. 2 is a flowchart of an example scheduling method provided by the present application, and the content shown in FIG. 2 can be executed by the management node 110 in FIG. 1, which can also be referred to as a cloud computing platform. As shown in FIG. 2, the plurality of application instances set in the first resource pool 120 include a first application instance and a second application instance. The example scheduling method provided by the present application can include the following steps S210-S250.

[0105] S210, the management node 110 obtains the application instance information input by the tenant.

[0106] In a possible case, the application instance information includes identification information of the application instance in the first resource pool, which is used to indicate whether the application instance is allowed to be scheduled to the second resource pool.

[0107] In a possible example, if the identification information of the application instance is a first value, the application instance is not allowed to be scheduled to the second resource pool. If the identification information of the application instance is a second value, the application instance is allowed to be scheduled to the second resource pool.

[0108] For example, if the identification information of the first application instance is 0, the first application instance is not allowed to be scheduled to the second resource pool; if the identification information of the second application instance is 1, the second application instance is allowed to be scheduled to the second resource pool.

[0109] It should be noted that the first value is 0 and the second value is 1 in the above examples are only examples, and should not be construed as a limitation on the present application. In other examples of the present application, the first value and the second value can be any numerical value.

[0110] In another possible example, if the identification information of an application instance has two characters, if the first character is a third value, the application instance is allowed to be scheduled from the first resource pool to the second resource pool; if the second character is a fourth value, the application instance is allowed to be scheduled from the second resource pool to the first resource pool.

[0111] For example, if the identification information of the first application instance is 00, the first application instance is neither allowed to be scheduled from the first resource pool to the second resource pool nor allowed to be scheduled from the second resource pool to the first resource pool. If the identification information of the second application instance is 11, the second application instance is allowed to be scheduled from the first resource pool to the second resource pool and allowed to be scheduled from the second resource pool to the first resource pool.

[0112] In a possible implementation, the management node 110 obtains the application instance information input by the tenant, including: the management node 110 obtains the application instance information input by the tenant according to an application programming interface (API) provided to the outside.

[0113] In a possible example, the tenant accesses the management node 110 through an API provided by the management node 110 on the terminal 140, that is, a configuration interface provided by the management node 110 is displayed on the terminal 140 (which belongs to a display interface provided to the outside by a cloud management platform), and then the tenant can input the application instance information on the configuration interface, so that the management node 110 obtains the application instance information input by the tenant.

[0114] S220, the management node 110 records the first application instance as an application instance not allowed to be migrated to the second resource pool and records the second application instance as an application instance allowed to be migrated to the second resource pool according to the application instance information.

[0115] The first application instance uses a first hardware resource of the first server cluster, and the second application instance uses a second hardware resource of the first server cluster.

[0116] For details of the first hardware resource and the second hardware resource, refer to the description of the first hardware below, which will not be repeated here.

[0117] In a possible implementation, the management node 110 records the first application instance as an application instance not allowed to migrate to the second resource pool and records the second application instance as an application instance allowed to migrate to the second resource pool according to the application instance information, and the method comprises the following steps.

[0118] The ETCD manages configuration information (such as name, label, annotation, and other metadata information) of the application instance, state information (such as running state, readiness state, and restart number), and logs.

[0119] In a possible example, a first field in the configuration information managed by the ETCD is used to indicate whether the application instance is allowed to migrate to the second resource pool, that is, the first field is used to indicate the identification information. If the first field is a first value, the application instance is not allowed to migrate to the second resource pool; if the first field is a second value, the application instance is allowed to migrate to the second resource pool.

[0120] For example, if the identification information of the first application instance included in the application instance information is 0, the management node 110 sets the value of the first field in the configuration information corresponding to the first application instance in the ETCD to 0, to indicate that the first application instance is an application instance not allowed to migrate to the second resource pool. If the identification information of the second application instance included in the application instance information is 1, the management node 110 sets the value of the first field in the configuration information corresponding to the second application instance in the ETCD to 1, to indicate that the second application instance is an application instance allowed to migrate to the second resource pool.

[0121] In another possible example, a second field in the configuration information managed by the ETCD is used to indicate whether the application instance is allowed to migrate to the second resource pool, that is, the first field is used to indicate the identification information. If the first character in the first field is a third value, the application instance is allowed to migrate from the first resource pool to the second resource pool; if the second character in the first field is a second value, the application instance is allowed to migrate from the second resource pool to the first resource pool.

[0122] For example, if the identification information of the first application instance included in the application instance information is 00, the management node 110 sets the value of the second field in the configuration information corresponding to the first application instance in the ETCD as 00, to indicate that the first application instance is an application instance that is neither allowed to migrate from the first resource pool to the second resource pool nor allowed to migrate from the second resource pool to the first resource pool. If the identification information of the second application instance included in the application instance information is 11, the management node 110 sets the value of the first field in the configuration information corresponding to the second application instance in the ETCD as 11, to indicate that the second application instance is an application instance that is allowed to migrate from the first resource pool to the second resource pool and allowed to migrate from the second resource pool to the first resource pool.

[0123] It is worth noting that the application instance information also includes identification information of an application instance as 10 or 01. The identification information as 10 indicates that the application instance is allowed to migrate from the first resource pool to the second resource pool and is not allowed to migrate from the second resource pool to the first resource pool. The identification information as 01 indicates that the application instance is not allowed to migrate from the first resource pool to the second resource pool and is allowed to migrate from the second resource pool to the first resource pool.

[0124] In S230, the management node 110 obtains an application instance creation request input by the tenant.

[0125] The application instance creation request is used to request to create a third application instance with a predetermined hardware resource requirement in the first resource pool.

[0126] In a possible case, a hardware resource (the predetermined hardware resource requirement) of a set size is reserved in the first resource pool to provide hardware resource support for the newly created application instance. The size of the predetermined hardware resource can be configured by the tenant.

[0127] For example, 5 processors, 50G of storage space, and 100 Gigabits per second (Gbps) are reserved in the first resource pool. The application instance creation request is used to request to create an application instance using the predetermined hardware resource requirement.

[0128] In a possible implementation, the management node 110 obtains the application instance creation request input by the tenant, including: the management node 110 obtains the application instance creation request according to an API provided to the outside.

[0129] In one possible example, the tenant accesses the management node 110 through an API provided by the management node 110 on the terminal 140, that is, displays an application instance creation interface provided by the management node 110 on the terminal 140 (which belongs to a display interface provided by the cloud management platform to the outside), and then the tenant can set parameters of the application instance on the application instance creation interface, generate an application instance creation request according to the parameters of the application instance, and send the application instance creation request to the management node 110. The management node 110 obtains the application instance creation request.

[0130] The parameters can include: image and version: specify the image used to deploy the application instance, and the version or tag of the image; application instance specification: such as the type of virtual machine, hardware resource configuration, or resource limit (size of required hardware resource) of a container instance; network and security settings: configure network access rules, security group policies, etc.; storage volume mounting: if the application instance needs persistent storage, the mounting and capacity of the storage volume can be configured; environment variables and configuration parameters: set environment variables and configuration parameters required by the application, such as database connection information, etc.; log query and log settings: configure alarm rules and log collection settings, which are convenient for management and troubleshooting, etc.

[0131] In another possible example, the tenant writes a YAML configuration file of the application instance, and then sends an application instance creation request carrying the YAML configuration file to the management node 110.

[0132] The configuration file can include the content of the above-mentioned parameters, which will not be repeated here.

[0133] For example, the management node 110 can obtain the application instance creation request input by the tenant through an apiserver deployed thereon.

[0134] It is worth noting that the hardware resources required by the application instance defined in the above-mentioned parameters should match the predetermined (reserved) hardware resource requirement in the first resource pool, or the hardware resources required by the application instance defined in the above-mentioned parameters are less than or equal to the predetermined hardware resource requirement in the first resource pool.

[0135] S240, the management node 110 creates a third application instance in the first resource pool according to the application instance creation request.

[0136] The third application instance uses third hardware resources of the first server cluster, and the third hardware resources match the predetermined hardware resource requirement.

[0137] For the content of the third hardware resources, refer to the description of the first hardware resources below, which will not be repeated here.

[0138] In a possible implementation, the management node 110 creates the third application instance in the first resource pool according to the application instance creation request, including: the management node 110 creates the third application instance meeting the parameter requirement in the first resource pool according to the parameter in the application instance creation request.

[0139] For details of this implementation, refer to the technical means of creating an application instance in the art, which will not be described here.

[0140] In a possible case, the third application instance uses the predetermined hardware resource reserved by the first server cluster.

[0141] In a possible example, the third hardware resource is less than or equal to the predetermined hardware resource requirement.

[0142] S250, the management node 110 obtains the resource usage of the first resource pool.

[0143] The resource usage is used to indicate the overall usage of the hardware resource of the first server cluster.

[0144] In a possible case, the overall usage of the hardware resource of the first server cluster includes the overall usage of one or more of the computing resource, the storage resource and the network resource.

[0145] For the content of the overall usage of the hardware resource of the first server cluster, see the following embodiments, which will not be described here.

[0146] In a possible implementation, the management node 110 obtains the resource usage of the first resource pool, including: the management node 110 obtains the resource usage of each working node in the first server cluster, and then obtains the resource usage of the first resource pool according to the resource usage sent by each working node.

[0147] In a possible example, the management node 110 receives the resource usage sent by each working node at each preset time, and then obtains the resource usage of the first resource pool 120 according to the resource usage corresponding to each working node.

[0148] Taking the hardware resource including the computing resource and the first server cluster including the working node 121 and the working node 122 as an example, the working node 121 sends the used processor number 1 to the management node 110 every preset time, and the working node 122 sends the used processor number 2 to the management node 110 every preset time. Then, the management node 110 obtains the resource usage of the first resource pool 120 as the used processor number 1 plus the used processor number 2 according to the foregoing processor numbers.

[0149] Exemplarily, the preset time can be configured by the tenant, such as 1 minute or 20 seconds, which is not limited in the present application.

[0150] It is worth noting that if the preset time is small enough, the management node 110 can obtain the resource usage of the first resource pool in real time.

[0151] In a possible implementation, the management node 110 obtains the resource usage of the first resource pool, including: the worker node can store the resource usage of the worker node in a specified area of the worker node after collecting the resource usage of the worker node, and the management node 110 obtains the resource usage of the worker node from the specified area of the worker node every preset time, so as to obtain the resource usage of the first resource pool 120 according to the resource usage corresponding to each worker node.

[0152] Exemplarily, the specified area can be a storage area local to the worker node, or the specified area is a centralized storage area in the first server cluster.

[0153] In a possible example, the management node 110 can obtain the resource usage of the first resource pool through the apiserver deployed thereon.

[0154] S260, the management node 110 migrates the second application instance from the first resource pool to the second resource pool if the resource usage is greater than or equal to the first preset value.

[0155] The second application instance uses the fourth hardware resource of the second server cluster, and the fourth hardware resource is consistent with the second hardware resource.

[0156] For the content of the fourth hardware resource, refer to the description of the first hardware resource below, which is not repeated here.

[0157] In a possible implementation, the management node 110 migrates the second application instance from the first resource pool to the second resource pool if the resource usage is greater than or equal to the first preset value, including: the management node 110 judges the relationship between the resource usage of the first resource pool and the first preset value, and if the resource usage is greater than or equal to the first preset value, the second application instance is migrated from the first resource pool to the second resource pool.

[0158] In a possible example, if the resource usage is greater than or equal to the first preset value, the management node 110 obtains a first processing strategy from a plurality of processing strategies according to a first relationship between the resource usage and the first preset (the resource usage is greater than or equal to the first preset value), and then executes the processing strategy to migrate the second application instance from the first resource pool to the second resource pool.

[0159] The first processing strategy is used to indicate that when the resource usage is greater than or equal to the first preset value, the management node 110 migrates the application instance in the first resource pool that is allowed to migrate to the second resource pool to the second resource pool.

[0160] For example, the management node 110 determines the first processing strategy corresponding to the first relationship from the mapping relationship between the relationships and the processing strategies.

[0161] For example, the management node 110 executes the first processing strategy represented by the YAML file to migrate the second application instance in the first resource pool to the second resource pool.

[0162] It should be noted that the above only takes the second application instance in the first resource pool as an example for description, and should not be construed as a limitation to the present application. In actual cases, a large number of application instances can be deployed in the first resource pool, and the management node 110 can migrate multiple application instances in the first resource pool to the second resource pool.

[0163] In one possible case, after the management node 110 schedules the second application instance in the first resource pool to the second resource pool, the resource usage of the first resource pool is still greater than or equal to the first preset value, the management node 110 determines the first processing strategy corresponding to the first relationship from the mapping relationship between the relationships and the processing strategies, and schedules the application instance in the first resource pool to the second resource pool until the resource usage of the first resource pool after scheduling is less than the first preset value.

[0164] In view of the content included in the hardware resource, five possible cases are provided below.

[0165] In the first possible case, the hardware resource includes computing resource, storage resource and network resource.

[0166] In one possible example, the computing resource is used to indicate various types of processors in the first server cluster, such as central processing unit (CPU), specific integrated circuit, other general-purpose processor, digital signal processing (DSP), application specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. In actual applications, the computing resource of the first server cluster can also include multiple processors. One processor can include one or more processor cores.

[0167] The storage resource is used to indicate various types of memories in the first server cluster, such as dynamic random access memory (DRAM). In addition to DRAM, it can also be other random access memories, such as static random access memory (SRAM), etc. In addition, the storage resource can also include read only memory (ROM). For read only memory, for example, it can be programmable read only memory (PROM), erasable programmable read only memory (EPROM), etc.

[0168] For example, the first hardware resource described above can include 2 processors, 50G of storage space, and 100Gbps in the first server cluster.

[0169] The network resource is used to indicate the network bandwidth, network delay, etc. of the first server cluster.

[0170] In the second possible case, the hardware resource includes the computing resource and the network resource.

[0171] In the third possible case, the hardware resource includes the computing resource and the storage resource.

[0172] In the fourth possible case, the hardware resource includes the network resource and the storage resource.

[0173] In the fifth possible case, the hardware resource includes any one of the computing resource, the storage resource, and the network resource.

[0174] Further, for the total usage amount of the hardware resource of the first server cluster, the following provides five possible cases.

[0175] In the first possible case, the total usage amount of the hardware resource of the first server cluster includes the total usage amount of the computing resource, the storage resource, and the network resource.

[0176] In a possible example, the total usage amount of the computing resource can be the number of processors or processor cores used in the first server cluster, the usage rate or occupancy rate of the processor. The total usage amount of the storage resource can be the occupied storage capacity, the storage usage rate or occupancy rate, etc. in the first server cluster. The total usage amount of the network resource can be the used / occupied network bandwidth, the network bandwidth occupancy rate or usage rate, etc. in the first server cluster.

[0177] Exemplarily, as shown in FIG. 1, the first server cluster includes a worker node 121, a worker node 122, and a worker node 123. Each of the worker node 121, the worker node 122, and the worker node 123 includes a processor, a memory, and a network interface. The network interface supports a gigabit network, a terabit network (terabit Ethernet), and the like at most.

[0178] For example, the total usage of the computing resource of the first server cluster is the sum of the number of processors used by the worker node 121, the number of processors used by the worker node 122, and the number of processors used by the worker node 123. The total usage of the storage resource of the first server cluster is the sum of the storage capacity occupied by the worker node 121, the storage capacity occupied by the worker node 122, and the storage capacity occupied by the worker node 123. The total usage of the network resource of the first server cluster is the sum of the network bandwidth occupied by the worker node 121, the network bandwidth occupied by the worker node 122, and the network bandwidth occupied by the worker node 123.

[0179] In a second possible case, the total usage of the hardware resource of the first server cluster includes the total usage of the computing resource and the total usage of the storage resource.

[0180] In a third possible case, the total usage of the hardware resource of the first server cluster includes the total usage of the computing resource and the total usage of the network resource.

[0181] In a fourth possible case, the total usage of the hardware resource of the first server cluster includes the total usage of the storage resource and the total usage of the network resource.

[0182] In a fifth possible case, the total usage of the hardware resource of the first server cluster includes the total usage of any one of the computing resource, the storage resource, and the network resource.

[0183] In a possible embodiment, the first resource pool further has a fourth application instance using a fifth hardware resource of the first server cluster. The instance scheduling method further includes: the management node 110 records, according to the grouping information input by the tenant, that the fourth application instance and the second application instance belong to the same group, and then migrates the second application instance and the fourth application instance belonging to the same group from the first resource pool to the second resource pool.

[0184] The second application instance uses a sixth hardware resource of the second server cluster, and the sixth hardware resource is consistent with the fifth hardware resource.

[0185] The description of the fifth hardware resource and the sixth hardware resource can refer to the content of the first hardware resource, which is not described herein.

[0186] In a possible case, the grouping information includes grouping identifiers of the application instances, and application instances with the same grouping identifier belong to the same group.

[0187] In a possible example, the grouping information includes: a grouping identifier of the application instance A: 1, a grouping identifier of the application instance B: 1, and a grouping identifier of the application instance C: 2. That is, the application instance A and the application instance B belong to the same group.

[0188] In a possible implementation, the management node 110 records, according to the grouping information input by the tenant, that the fourth application instance and the second application instance belong to the same group, including: the management node 110 records the grouping information in the ETCD, thereby marking the fourth application instance and the second application instance as belonging to the same group.

[0189] In a possible example, the configuration information managed by the ETCD has a third field, and a value of the third field is used to indicate a grouping identifier, and application instances with the same grouping identifier belong to the same group. The management node 110 assigns values to the third field in the configuration information of the corresponding application instance in the ETCD according to the grouping information, thereby recording the grouping of the application instance.

[0190] For example, when the grouping information includes: a grouping identifier of the application instance A: 1, a grouping identifier of the application instance B: 1, and a grouping identifier of the application instance C: 2, the management node 110 assigns the third field in the configuration information of the application instance A in the ETCD to 1, assigns the third field in the configuration information of the application instance B to 1, and assigns the third field in the configuration information of the application instance C to 2.

[0191] In a possible implementation, the management node 110 migrates the second application instance from the first resource pool to the second resource pool, including: before migrating the second application instance, the management node 110 queries the ETCD for application instances with the same grouping identifier as the second application instance, to obtain a fourth application instance, and then the management node 110 migrates the second application instance and the fourth application instance belonging to the same group from the first resource pool to the second resource pool.

[0192] In a possible example, the management node 110 queries the ETCD for application instances with the same grouping identifier as the second application instance, including: the management node 110 traverses the third field in the configuration information of all application instances in the first resource pool saved in the ETCD, to determine application instances with the same value as the third field corresponding to the second application instance, such as the fourth application instance.

[0193] In a possible embodiment, the multiple application instances further include a fifth application instance. For the content of the present embodiment, reference can be made to the content shown in FIG. 3, which is a flowchart of another example scheduling method provided by the present application. The content shown in FIG. 3 includes the following steps S310-S340.

[0194] S310, the management node 110 acquires an application instance cancellation request for the fifth application instance input by the tenant.

[0195] In a possible implementation, the management node 110 acquires the application instance cancellation request for the fifth application instance input by the tenant, including:

[0196] The management node 110 acquires the application instance cancellation request for the fifth application instance sent by the tenant terminal 140.

[0197] For example, the application instance cancellation request can carry the instruction kubectl delete pods-l app=my-app. Wherein app=my-app represents the label or name of the fifth application instance, and pods-l app=my-app represents the Pod belonging to the fifth application instance.

[0198] In a possible implementation, the management node 110 acquires the application instance cancellation request for the fifth application instance input by the tenant, including: the management node 110 acquires the application instance cancellation request input by the tenant according to the API provided to the outside.

[0199] In a possible example, the tenant accesses the management node 110 through the API provided by the management node 110 on the terminal 140, that is, displays the deletion interface provided by the management node on the terminal 140 (which belongs to the display interface provided to the outside by the cloud management platform), and then the tenant can select the application instance (such as the fifth application instance) to be offline on the deletion interface, and then the terminal 140 sends the application instance cancellation request to the management node 110, which carries the information of the application instance to be offline.

[0200] S320, the management node 110 stops running the fifth application instance in the first resource pool according to the application instance cancellation request, and releases the seventh hardware resource occupied by the fifth application instance in the first resource pool.

[0201] In a possible implementation, the management node 110 stops running the fifth application instance in the first resource pool and releases the seventh hardware resource occupied by the fifth application instance in the first resource pool according to the application instance cancellation request, including that the management node 110 can execute the instruction kubectl delete pods-l app=my-app carried in the application instance cancellation request to delete the Pod included in the fifth application instance. Further, the management node 110 releases the seventh hardware resource occupied by the fifth application instance in the first resource pool after confirming that all the Pods included in the fifth application instance are deleted.

[0202] In a possible implementation, the management node 110 stops running the fifth application instance in the first resource pool and releases the seventh hardware resource occupied by the fifth application instance in the first resource pool according to the application instance cancellation request, including that the management node 110 determines the Pod included in the fifth application instance according to the information of the fifth application instance carried in the application instance cancellation request, and then deletes the Pod included in the fifth application instance. The management node 110 releases the seventh hardware resource occupied by the fifth application instance in the first resource pool after all the Pods included in the fifth application instance are deleted.

[0203] In a possible implementation, the management node 110 can determine the Pod included in the fifth application instance by the instruction kubectl get pods-l app=my-app, and the information of the fifth application instance includes the label or name of the fifth application instance, that is, the aforementioned app=my-app.

[0204] S330, the management node 110 acquires the resource idle amount of the first resource pool.

[0205] The resource idle amount is used to indicate the overall idle amount of the hardware resource of the first server cluster.

[0206] In a possible case, the overall idle amount of the hardware resource of the first server cluster includes the overall idle amount of one or more of the computing resource, the storage resource and the network resource.

[0207] In a possible implementation, the management node 110 acquires the resource idle amount of the first resource pool, including that the management node 110 can obtain the resource idle amount of the first resource pool by subtracting the resource usage amount of the first resource pool from the total amount of the hardware resource of the first server cluster.

[0208] In a possible implementation, the management node 110 acquires the resource idle amount of the first resource pool, including that the management node 110 acquires the resource idle amount of each worker node in the first server cluster, and then obtains the resource idle amount of the first resource pool according to the resource idle amount sent by each worker node.

[0209] In a possible implementation, the management node 110 acquires the resource idle amount of the first resource pool, including: the worker node stores the resource idle amount of the worker node in a designated area of the worker node after collecting the resource idle amount of the worker node, and the management node 110 acquires the resource idle amount of the worker node from the designated area of the worker node at a preset time interval, so as to obtain the resource idle amount of the first resource pool 120 according to the resource idle amount corresponding to each worker node.

[0210] For example, the management node 110 adds the resource idle amount sent by each worker node to obtain the resource idle amount of the first resource pool.

[0211] For a detailed description of the management node 110 acquiring the resource idle amount of the first resource pool, refer to the description of the management node 110 acquiring the resource usage amount of the first resource pool in S250 above, which is not repeated here.

[0212] S340, the management node 110 schedules the second application instance from the second resource pool to the first resource pool in the case that the resource idle amount is greater than or equal to the second preset value.

[0213] In a possible implementation, the management node 110 migrates the second application instance from the second resource pool to the first resource pool in the case that the resource idle amount is greater than or equal to the second preset value, including: the management node 110 judges the relationship between the resource idle amount of the first resource pool and the second preset value, and if the resource idle amount is greater than or equal to the second preset value, the management node 110 migrates the second application instance from the second resource pool to the first resource pool.

[0214] In a possible example, if the resource idle amount is greater than or equal to the second preset value, the management node 110 acquires a second processing strategy from a plurality of processing strategies according to a second relationship between the resource idle amount and the second preset (the resource idle amount is greater than or equal to the second preset value), and then executes the second processing strategy to migrate the second application instance from the second resource pool to the first resource pool.

[0215] The second processing strategy described above is used to indicate that when the resource idle amount is greater than or equal to the second preset value, the management node 110 is instructed to migrate the application instance allowed to be migrated to the second resource pool in the second resource pool to the first resource pool.

[0216] For example, the management node 110 determines the second processing strategy corresponding to the second relationship from the mapping relationship between the relationships and the processing strategies.

[0217] For example, the management node 110 executes the second processing strategy represented by the YAML file to migrate the second application instance in the second resource pool to the first resource pool.

[0218] It is worth noting that the above only takes the second application instance as an example for description, and should not be understood as a limitation of the present application. In actual situations, a large number of application instances can be deployed in the second resource pool, and the management node 110 can migrate multiple application instances in the second resource pool to the first resource pool.

[0219] In a possible embodiment, the first application instance includes M containers running in the first server cluster, and M is a positive integer. For the content of the present embodiment, reference can be made to the content shown in FIG. 4, which is a flowchart of a third example scheduling method provided by the present application. The content shown in FIG. 4 includes the following steps S410-S430.

[0220] S410, the management node 110 confirms that the number of M containers of the first application instance is scaled to N containers.

[0221] Wherein, N is less than M, and M and N are positive integers.

[0222] The following takes a Pod included in the first application instance as an example for description. The management node 110 acquires a list of all Pods included in the first application instance at regular intervals, and the list of Pods indicates the number of containers included in a Pod. The management node 110 determines whether the number of containers included in the first application instance is reduced by comparing the lists of Pods acquired at adjacent two time points.

[0223] For example, the first application instance includes only one Pod. The management node 110 acquires a list 1 of Pods at a previous time point (including 5 containers) and a list 2 of Pods at a later time point (including 3 containers) in adjacent two time points, and then determines that the first application instance is scaled from 5 containers to 3 containers.

[0224] It is worth noting that the above takes comparing the lists of Pods at adjacent two time points as an example for description, and should not be understood as a limitation of the present application. In other situations of the present application, the two lists compared by the management node 110 can be two lists acquired at any time points. For example, the management node 110 acquires a list 1 of Pods at a first time point and a list 2 of Pods at a second time point, and the first time point and the second time point are separated by one or more time periods.

[0225] S420, the management node 110 acquires the amount of idle resources of the first resource pool.

[0226] The above amount of idle resources is used to indicate the overall amount of idle hardware resources of the first server cluster.

[0227] For the detailed content of S420, reference can be made to the description of S330 above, which will not be described herein.

[0228] S430, in a case where the resource idle amount is greater than or equal to a second preset value, the management node 110 migrates the second application instance from the second resource pool to the first resource pool.

[0229] For details of S430, refer to the description of S340 above, which will not be repeated here.

[0230] In a possible embodiment, the management node obtains a processing policy configured by the tenant. The processing policy is used to indicate that the application instance is migrated between the first resource pool and the second resource pool when the preset condition is met.

[0231] In a possible example, the processing policy includes the first processing policy and the second processing policy described above.

[0232] In another possible example, the processing policy described above can further include a third processing policy. The third processing policy is used to indicate that the first resource pool supports a predetermined hardware resource, and when the resource idle amount is less than or equal to the predetermined hardware resource requirement, or the resource usage amount is greater than or equal to a first preset value, the management node 110 is instructed to migrate the application instance in the first resource pool to the second resource pool.

[0233] In yet another possible example, the processing policy described above can further include a fourth processing policy. The fourth processing policy is used to indicate that multiple application instances belonging to the same group are simultaneously located in the first resource pool 120 or the second resource pool 130.

[0234] For example, when the management node 110 migrates the second application instance from the first resource pool to the second resource pool, the fourth application instance belonging to the same group as the second application instance should also be migrated from the first resource pool to the second resource pool.

[0235] It is worth noting that the content included in the processing policy described above is only an example and should not be construed as a limitation of the present application. In other embodiments of the present application, more or less processing policies can also be included. For example, the processing policy described above can further include a fifth processing policy, which is used to indicate that the application instance with high latency requirement is deployed to the worker node with the highest performance.

[0236] In a possible case, the management node 110 manages the processing policy through an elasticity policy configurator (also referred to as an elasticity policy configuration module).

[0237] For example, the management node 110 obtains the corresponding processing policy from the elasticity policy configurator before migrating the application instance each time.

[0238] For example, the management node 110 determines the processing strategy corresponding to the target relationship (e.g., the resource usage is greater than or equal to the first preset value, the resource idle amount is greater than or equal to the second threshold, etc.) according to the mapping relationship between the resource usage and the processing strategy, or the mapping relationship between the resource idle amount and the processing strategy, and then executes the corresponding strategy.

[0239] For another example, the third processing strategy described above belongs to a persistent strategy, that is, the management node 110 executes the third processing strategy every preset time or every time the migration is performed.

[0240] For another example, the fourth processing strategy described above belongs to a persistent strategy, that is, the management node 110 executes the fourth processing strategy every time the migration is performed, and migrates the application instances belonging to the same group together, thereby avoiding that different application instances of the same group (elastic resource group) are located in different resource pools, resulting in high communication delay between the application instances, and thus reducing the delay of the same elastic resource group in providing services to the outside.

[0241] In a possible case, the processing strategy described above can be a configuration file, and the representation form can be a YAML file.

[0242] It should be noted that the representation form of the processing strategy described above is a YAML file, which is only a possible case provided by the present application, and should not be understood as a limitation of the present application. In other possible cases of the present application, the representation form of the processing strategy can also be in JSON (javascript object notation) format, INI (initialization) format, Properties file, etc.

[0243] In a possible implementation, the management node 110 obtains the processing strategy configured by the tenant, including: the management node 110 obtains the processing strategy input by the tenant.

[0244] In a possible example, the tenant accesses the configuration interface provided by the management node 110 through the API provided by the management node 110 on the terminal 140, and then inputs the processing strategy on the configuration interface, so that the management node 110 obtains the processing strategy input by the tenant.

[0245] In a possible implementation, the management node 110 stores the processing strategy, and the management node 110 obtains the processing strategy configured by the tenant, including: the management node 110 obtains the processing strategy preconfigured by the tenant from the storage.

[0246] In a possible example, the management node 110 can access the processing strategy stored in the storage, and the storage can be built-in or external to the management node 110.

[0247] If the aforementioned storage is built-in in the management node 110, the storage can be a read-only memory or the like.

[0248] If the aforementioned storage is built-in in the management node 110, the storage can be a read-only memory or the like.

[0249] In a possible embodiment, the management node 110 migrates the second application instance from the first resource pool to the second resource pool, including: the management node 110 creates a copy of the second application instance in the second resource pool. If the copy of the second application instance meets the running condition, the management node 110 sends a first instruction for indicating to offline the second application instance to the first resource pool, and sends a second instruction for running the copy of the second application instance to the second resource pool.

[0250] The following takes the application instance as a Pod for example. The management node 110 creating the copy of the second application instance in the second resource pool includes:

[0251] The management node 110 copies the configuration of the Pod 1 (the second application instance) in the first resource pool, and saves the configuration as a YAML file. Further, the management node 110 adjusts the name, the label, the belonging resource pool and the like of the Pod in the YAML file to prevent the conflict with the existing Pod. Finally, the management node 110 executes the aforementioned adjusted YAML to create the copy of the Pod 1 in the second resource pool.

[0252] For example, the management node 110 sets metadata.name in the YAML file as pod1-copy to ensure that the name is different from that of the Pod 1 in the first resource pool, sets metadata.namespace as namespace2, i.e. the namespace of the second resource pool, and sets the image and other configuration information of the container in spec.containers.

[0253] In a possible case, the management node 110 receives a query request of the kubelet on the second resource pool, the query request is used to query the information of the Pod to be created on the second resource pool. The management node 110 obtains the latest Pod definition from the etcd in response to the query request, and returns the aforementioned Pod definition to the kubelet, the Pod definition includes the aforementioned adjusted YAML file. The kubelet executes the adjusted YAML file to create the copy of the second application instance in the second resource pool.

[0254] In one possible example, the copy of the second application instance meets the running condition, the management node 110 sends an instruction for indicating to offline the second application instance to the first resource pool, and sends a second instruction for running the copy of the second application instance to the second resource pool, including:

[0255] The management node 110 ensures that the copy of the second application instance in the second resource pool has been normally created and configured, and then the management node 110 sends an instruction for offline the second application instance to the first resource pool, such as kubectcl delete pod <pod1>and sends a second instruction to run a copy of the second application instance to the second resource pool, such as sending an instruction to the kubelet deployed in the second resource pool to start a copy of the second application instance by the management node 110

[0256] For example, the etcd in the management node 110 records a fourth field, if the fourth field is the fifth value (for example, ready), the copy of the second application instance meets the running condition. Otherwise, the copy of the second application instance does not meet the running condition.

[0257] In a possible case, after the management node 110 ensures that the copy of the second application instance in the second resource pool has been normally created and configured, the management node 110 updates the image of the Pod to 0 through the controller, thereby automatically deleting the second application instance.

[0258] The above controller can be a Deployment controller.

[0259] In a possible case, the kubelet in the second resource pool executes the adjusted YAML file to create a copy of the second application instance in the second resource pool, and after the creation is completed, the kubelet can directly run the copy of the second application instance. After the kubelet runs the copy of the second application instance, the kube-apiserver in the management node 110 is sent state update information (the copy of the second application instance is normally running), and then the kube-apiserver updates the state update information. According to the normal running of the copy of the second application instance, the kube-apiserver in the management node 110 sends an instruction to the kubelet in the first resource pool to log off the second application instance.

[0260] It can be understood that in order to realize the functions in the above embodiments, the management node 110 includes corresponding hardware structures and / or software modules for executing various functions. Those skilled in the art should easily realize that the units and method steps of the examples described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or hardware and computer software. Whether a certain function is executed in hardware or computer software driven hardware depends on the specific application scenario and design constraints of the technical solution.

[0261] The scheduling method provided by the present application is described in detail above in combination with FIG. 2 to FIG. 4. The scheduling device provided by the present application will be described in combination with FIG. 5, which is a structural schematic diagram of an example scheduling device provided by the present application. The example scheduling device 500 can be used to realize the functions of the management node 110 in the above method embodiments, and thus can also realize the beneficial effects possessed by the above method embodiments. In one possible example, the example scheduling device is applied to a cloud management platform, and the cloud management platform is used to manage a first resource pool and a second resource pool. The first resource pool includes a first server cluster, and the second resource pool includes a second server cluster. A plurality of application instances are arranged in the first resource pool, and the plurality of application instances include a first application instance and a second application instance.

[0262] As shown in FIG. 5, the example scheduling device 500 includes a first configuration module 510, a first acquisition module 520, a creation module 530, a second acquisition module 540, and a migration module 550. The example scheduling device 500 is used to realize the functions of the management node 110 in the above method embodiments corresponding to FIG. 2 to FIG. 4. In one possible example, the example scheduling device 500 is used to realize the specific process of the above example scheduling method, which includes the following processes:

[0263] The first configuration module 510 is configured to record the first application instance as an application instance that is not allowed to be migrated to the second resource pool and record the second application instance as an application instance that is allowed to be migrated to the second resource pool according to the application instance information input by the tenant. The first application instance uses the first hardware resource of the first server cluster, and the second application instance uses the second hardware resource of the first server cluster.

[0264] The first acquisition module 520 acquires the application instance creation request input by the tenant. The application instance creation request is used to request to create a third application instance with predetermined hardware resource requirements in the first resource pool.

[0265] The creation module 530 creates the third application instance in the first resource pool according to the application instance creation request. The third application instance uses the third hardware resource of the first server cluster, and the third hardware resource matches the predetermined hardware resource requirements.

[0266] The second acquisition module 540 acquires the resource usage of the first resource pool. The resource usage is used to indicate the overall usage of the hardware resource of the first server cluster.

[0267] The migration module 550 is configured to migrate the second application instance from the first resource pool to the second resource pool in a case where the resource usage is greater than or equal to a first preset value. The second application instance uses the fourth hardware resource of the second server cluster, and the fourth hardware resource is consistent with the second hardware resource.

[0268] To further realize the functions in the method embodiments shown in FIGS. 2-4, the present application also provides an example scheduling device, as shown in FIG. 6, which is a structural schematic diagram two of an example scheduling device provided by the present application. The example scheduling device 500 further comprises a second configuration module 560, a cancel module 570, and a scaling module 580.

[0269] The second configuration module 560 is configured to record, according to the grouping information input by the tenant, that the fourth application instance and the second application instance belong to the same group; the fourth application instance is arranged in the first resource pool, and the fourth application instance uses the fifth hardware resource of the first server cluster.

[0270] The cancel module 570 is configured to obtain an application instance cancel request input by the tenant for the fifth application instance; according to the application instance cancel request, stop running the fifth application instance in the first resource pool, and release the seventh hardware resource occupied by the fifth application instance in the first resource pool; and obtain the resource idle amount of the first resource pool, and in the case that the resource idle amount is greater than or equal to a second preset value, migrate the second application instance from the second resource pool to the first resource pool. The resource idle amount is used to indicate the overall idle amount of the hardware resources of the first server cluster, and the plurality of application instances includes the fifth application instance.

[0271] The scaling module 580 is configured to confirm that the number of the M containers of the first application instance is scaled to N containers, and obtain the resource idle amount of the first resource pool, and in the case that the resource idle amount is greater than or equal to a second preset value, migrate the second application instance from the second resource pool to the first resource pool. N is less than M, N is a positive integer, the resource idle amount is used to indicate the overall idle amount of the hardware resources of the first server cluster, the first application instance includes the M containers running in the first server cluster, and M is a positive integer.

[0272] For more functions of the first configuration module 510, the first obtaining module 520, the creating module 530, the second obtaining module 540, and the migration module 550, please refer to the description of the example scheduling method above, which will not be repeated here.

[0273] The first configuration module 510, the first obtaining module 520, the creating module 530, the second obtaining module 540, and the migration module 550 can be implemented by software or by hardware. For example, the implementation of the first configuration module 510 will be described below. Similarly, the implementation of the first obtaining module 520, the creating module 530, the second obtaining module 540, and the migration module 550 can refer to the implementation of the first configuration module 510.

[0274] As an example of a software functional unit, the first configuration module 510 can include code running on a compute instance. The compute instance can include at least one of a physical host (computing device), a virtual machine, and a container. Further, the compute instance can be one or more. For example, the first configuration module 510 can include code running on multiple hosts / virtual machines / containers.

[0275] It should be noted that the multiple hosts / virtual machines / containers running the code can be distributed in the same region, or in different regions. Further, the multiple hosts / virtual machines / containers running the code can be distributed in the same availability zone (AZ), or in different AZs. Each AZ includes one data center or multiple data centers in close geographical proximity. Typically, one region can include multiple AZs.

[0276] Similarly, the multiple hosts / virtual machines / containers running the code can be distributed in the same VPC, or in multiple VPCs. Typically, one VPC is set up within one region, and a communication gateway needs to be set up in each VPC for cross-region communication between two VPCs in the same region or between VPCs in different regions, and the interconnection between VPCs is realized through the communication gateway.

[0277] As an example of a hardware functional unit, the first configuration module 510 can include at least one computing device, such as a server, etc. Alternatively, the first configuration module 510 can also be a device implemented by an ASIC or a programmable logic device (PLD), etc. The PLD can be implemented by a complex programmable logical device (CPLD), an FPGA, a generic array logic (GAL), or any combination thereof.

[0278] The multiple computing devices included in the first configuration module 510 can be distributed in the same region, or in different regions. The multiple computing devices included in the first configuration module 510 can be distributed in the same AZ, or in different AZs. Similarly, the multiple computing devices included in the first configuration module 510 can be distributed in the same VPC, or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs, etc.

[0279] It should be noted that in other embodiments, the first configuration module 510 can be configured to perform any of the steps of the instance scheduling method, the first obtaining module 520 can be configured to perform any of the steps of the instance scheduling method, the creating module 530 can be configured to perform any of the steps of the instance scheduling method, the second obtaining module 540 can be configured to perform any of the steps of the instance scheduling method, and the migrating module 550 can be configured to perform any of the steps of the instance scheduling method. The steps to be implemented by the first configuration module 510, the first obtaining module 520, the creating module 530, the second obtaining module 540, and the migrating module 550 can be specified as needed, and the first configuration module 510, the first obtaining module 520, the creating module 530, the second obtaining module 540, and the migrating module 550 respectively implement different steps in the instance scheduling method to achieve the overall function of the management node 110.

[0280] It should be noted that the management node 110 of the foregoing embodiments can correspond to the instance scheduling apparatus 500, and can correspond to the subject performing the method corresponding to the embodiments of the present application in FIGS. 2 to 4, and the operations and / or functions of each module in the instance scheduling apparatus 500 are respectively for implementing the corresponding flow of each method in the embodiments of FIGS. 2 to 4, and for brevity, will not be repeated here.

[0281] In addition, the instance scheduling apparatus 500 shown in FIG. 5 or FIG. 6 can also be implemented by a communication device, where the communication device can be the management node 110 in the foregoing embodiments. When the communication device is a chip or chip system applied to a processing device, the instance scheduling apparatus 500 can also be implemented by a chip or chip system.

[0282] Embodiments of the present application also provide a chip system, which includes a control circuit and an interface circuit, the interface circuit is configured to obtain an access control policy and an operation request, and the control circuit is configured to implement the function of the management node 110 in the above method according to the obtained access control policy and operation request.

[0283] In a possible design, the chip system further includes a memory configured to store program instructions and / or data. The chip system can be composed of a chip, or can include a chip and other discrete devices.

[0284] The embodiment of the present application further provides a computing device. Please refer to FIG. 7, which is a structural schematic diagram of a computing device provided by the present application. The computing device 700 comprises a bus 702, a processor 704, a memory 706 and a communication interface 708. The processor 704, the memory 706 and the communication interface 708 are communicatively connected with each other through the bus 702. The computing device 700 can be a server or a terminal device. It should be understood that the number of processors and memories in the computing device 700 is not limited by the present application. For example, the computing device 700 can be the management node 110 described above.

[0285] The bus 702 can be a PCIe bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one line is shown in FIG. 7, but it does not mean that there is only one bus or only one type of bus. The bus 702 can include a path for transmitting information between various components (for example, the processor 704, the memory 706, the communication interface 708) of the computing device 700.

[0286] The processor 704 can include any one or more of a CPU, a GPU, a microprocessor (MP), or a DSP, etc.

[0287] The memory 706 can include a volatile memory, such as a random access memory (RAM). The processor 704 can further include a non-volatile memory, such as a ROM, a flash memory, a hard disk drive (HDD) or a solid state drive (SSD).

[0288] The memory 706 stores executable program codes, and the processor 704 executes the executable program codes to respectively implement the functions of the first configuration module 510, the first acquisition module 520, the creation module 530, the second acquisition module 540 and the migration module 550 described above, so as to implement the instance scheduling method. That is, the memory 706 stores instructions for executing the instance scheduling method.

[0289] The communication interface 708 uses a transceiver module such as but not limited to a network interface card and a transceiver to realize the communication between the computing device 700 and other devices or communication networks. The computing device 700 can be a computer (for example: a server) in a cloud data center, or a computer in an edge data center, or a terminal.

[0290] The embodiments of the present application also provide a computing device cluster. The computing device cluster comprises at least one computing device, which can be a server, for example, 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.

[0291] As shown in FIG. 8, FIG. 8 is a structural diagram of a computing device cluster provided by the present application. The computing device cluster comprises at least one computing device 700. The memory 706 in one or more computing devices 700 in the computing device cluster can store the same instructions for performing the instance scheduling method.

[0292] In some possible implementation manners, the memory 706 in one or more computing devices 700 in the computing device cluster can also respectively store partial instructions for performing the instance scheduling method. In other words, the combination of one or more computing devices 700 can collectively execute the instructions for performing the instance scheduling method.

[0293] It should be noted that the memory 706 in different computing devices 700 in the computing device cluster can store different instructions, respectively used for performing partial functions of the instance scheduling method. That is, the instructions stored in the memory 706 in different computing devices 700 can implement the functions of one or more of the first configuration module 510, the first obtaining module 520, the creating module 530, the second obtaining module 540, and the migrating module 550.

[0294] In some possible implementation manners, one or more computing devices in the computing device cluster can be connected through a network. The network can be a wide area network or a local area network, etc. FIG. 9 shows a possible implementation manner. As shown in FIG. 9, FIG. 9 is a connection diagram between computing devices provided by the present application, two computing devices 700A and 700B are connected through a network. Specifically, the communication interface in each computing device is connected with the network. In this type of possible implementation manner, the memory 706 in the computing device 700A stores instructions for performing the functions of the first configuration module 510 and the first obtaining module 520. Meanwhile, the memory 706 in the computing device 700B stores instructions for performing the functions of the creating module 530, the second obtaining module 540, and the migrating module 550.

[0295] It should be understood that the functions of the computing device 700A shown in FIG. 9 can also be completed by multiple computing devices 700. Similarly, the functions of the computing device 700B can also be completed by multiple computing devices 700.

[0296] The embodiment of the present application further provides a computer program product containing instructions. The computer program product can be software or a program product containing instructions, which can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, the at least one computing device is caused to execute the above-mentioned example scheduling method.

[0297] The embodiment of the present application further provides a computer readable storage medium. The computer readable storage medium can be any available medium that the computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium contains instructions, which instruct the computing device to execute the example scheduling method.

[0298] In the above embodiment, the implementation can be achieved by software, hardware, firmware or any combination thereof, entirely or partially. When implemented by software, the implementation can be achieved in the form of a computer program product, entirely or partially. The computer program product contains one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, the processes or functions described in the embodiment of the present application are executed, entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment or other programmable apparatus. The computer programs or instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer programs or instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through a wired or wireless manner. The computer readable storage medium can be any available medium that the computer can access or a data storage device such as a server, data center, etc. containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, an SSD).

[0299] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered in 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 instance scheduling method, characterized in that, The method is applied to a cloud management platform, which manages a first resource pool and a second resource pool. The first resource pool includes a first server cluster, and the second resource pool includes a second server cluster. Multiple application instances are configured in the first resource pool, including a first application instance and a second application instance. The method includes: Based on the application instance information input by the tenant, the first application instance is recorded as an application instance that is not allowed to be migrated to the second resource pool, and the second application instance is recorded as an application instance that is allowed to be migrated to the second resource pool. The first application instance uses the first hardware resources of the first server cluster, and the second application instance uses the second hardware resources of the first server cluster. Obtain the application instance creation request input by the tenant, the application instance creation request being used to request the creation of a third application instance with predetermined hardware resource requirements in the first resource pool; Based on the application instance creation request, the third application instance is created in the first resource pool. The third application instance uses the third hardware resource of the first server cluster, and the third hardware resource matches the predetermined hardware resource requirement. Obtain the resource usage of the first resource pool, wherein the resource usage is used to indicate the total hardware resource usage of the first server cluster; If the resource usage is greater than or equal to a first preset value, the second application instance is migrated from the first resource pool to the second resource pool, wherein the second application instance uses the fourth hardware resource of the second server cluster, and the fourth hardware resource is consistent with the second hardware resource.

2. The method according to claim 1, characterized in that, The first resource pool also includes a fourth application instance, which uses a fifth hardware resource of the first server cluster. The method further includes: According to the grouping information input by the tenant, the fourth application instance and the second application instance belong to the same group; Migrating the second application instance from the first resource pool to the second resource pool specifically includes: The second application instance and the fourth application instance are migrated from the first resource pool to the second resource pool, wherein the second application instance uses the sixth hardware resource of the second server cluster, and the sixth hardware resource is consistent with the fifth hardware resource.

3. The method according to claim 1 or 2, characterized in that, The plurality of application instances also includes a fifth application instance, and the method further includes: Obtain the application instance cancellation request for the fifth application instance input by the tenant; Based on the cancellation request of the application instance, the fifth application instance is stopped from running in the first resource pool, and the seventh hardware resource occupied by the fifth application instance in the first resource pool is released. Obtain the amount of available resources in the first resource pool, wherein the amount of available resources is used to indicate the total amount of available hardware resources in the first server cluster; If the amount of available resources is greater than or equal to a second preset value, the second application instance will be migrated from the second resource pool to the first resource pool.

4. The method according to claim 1 or 2, characterized in that, The first application instance includes M containers running in the first server cluster, where M is a positive integer. The method further includes: Confirm that the number of M containers in the first application instance is reduced to N containers, where N is less than M and N is a positive integer; Obtain the amount of available resources in the first resource pool, wherein the amount of available resources is used to indicate the total amount of available hardware resources in the first server cluster; If the amount of available resources is greater than or equal to a second preset value, the second application instance will be migrated from the second resource pool to the first resource pool.

5. The method according to any one of claims 1 to 4, characterized in that, The first resource pool is billed using a prepaid method, while the second resource pool is billed using a pay-as-you-go method.

6. The method according to any one of claims 1 to 5, characterized in that, The hardware resources of the first server cluster include one or any combination of computing resources, storage resources, and network resources.

7. An instance scheduling device, characterized in that, The device is applied to a cloud management platform, which manages a first resource pool and a second resource pool. The first resource pool includes a first server cluster, and the second resource pool includes a second server cluster. Multiple application instances are configured in the first resource pool, including a first application instance and a second application instance. The device includes: The first configuration module is used to record the first application instance as an application instance that is not allowed to be migrated to the second resource pool according to the application instance information input by the tenant, and to record the second application instance as an application instance that is allowed to be migrated to the second resource pool, wherein the first application instance uses the first hardware resources of the first server cluster, and the second application instance uses the second hardware resources of the first server cluster. The first acquisition module acquires the application instance creation request input by the tenant. The application instance creation request is used to request the creation of a third application instance with predetermined hardware resource requirements in the first resource pool. The creation module creates the third application instance in the first resource pool according to the application instance creation request. The third application instance uses the third hardware resource of the first server cluster, and the third hardware resource matches the predetermined hardware resource requirement. The second acquisition module acquires the resource usage of the first resource pool, wherein the resource usage is used to indicate the total hardware resource usage of the first server cluster. The migration module is used to migrate the second application instance from the first resource pool to the second resource pool when the resource usage is greater than or equal to a first preset value, wherein the second application instance uses the fourth hardware resource of the second server cluster, and the fourth hardware resource is consistent with the second hardware resource.

8. The apparatus according to claim 7, characterized in that, The first resource pool also includes a fourth application instance, which uses the fifth hardware resource of the first server cluster. The device further includes: The second configuration module is used to record, based on the grouping information input by the tenant, that the fourth application instance and the second application instance belong to the same group; The migration module is specifically used to migrate the second application instance and the fourth application instance from the first resource pool to the second resource pool, wherein the second application instance uses the sixth hardware resource of the second server cluster, and the sixth hardware resource is consistent with the fifth hardware resource.

9. The apparatus according to claim 7 or 8, characterized in that, The plurality of application instances also includes a fifth application instance, and the device further includes: The cancellation module is configured to: acquire an application instance cancellation request input by the tenant for the fifth application instance; based on the application instance cancellation request, stop the fifth application instance from running in the first resource pool and release the seventh hardware resource occupied by the fifth application instance in the first resource pool; acquire the resource idle amount of the first resource pool; and, if the resource idle amount is greater than or equal to a second preset value, migrate the second application instance from the second resource pool to the first resource pool; wherein, the resource idle amount is used to indicate the total idle amount of hardware resources of the first server cluster.

10. The apparatus according to claim 7 or 8, characterized in that, The first application instance includes M containers running in the first server cluster, where M is a positive integer. The device further includes: The scaling-down module is used to confirm that the number of M containers of the first application instance is scaled down to N containers, and to obtain the amount of idle resources in the first resource pool. If the amount of idle resources is greater than or equal to a second preset value, the second application instance is migrated from the second resource pool to the first resource pool. Wherein, N is less than M, N is a positive integer, and the amount of idle resources is used to indicate the total amount of idle hardware resources of the first server cluster.

11. The apparatus according to any one of claims 7 to 10, characterized in that, The first resource pool is billed using a prepaid method, while the second resource pool is billed using a pay-as-you-go method.

12. The apparatus according to any one of claims 7 to 11, characterized in that, The hardware resources of the first server cluster include one or any combination of computing resources, storage resources, and network resources.

13. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 6.

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

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

Citation Information

Patent Citations

  • Container arrangement method, device and system and storage medium

    CN113296882A

  • Instance management method and device and cloud application engine

    CN114691283A

  • Automatic migration method and device of server container instance

    CN116089005A

  • Service migration method, device and system, electronic equipment and storage medium

    CN118381822A