WO2022142515A1 - 管理实例的方法、装置以及云应用引擎 - Google Patents

管理实例的方法、装置以及云应用引擎 Download PDF

Info

Publication number
WO2022142515A1
WO2022142515A1 PCT/CN2021/120102 CN2021120102W WO2022142515A1 WO 2022142515 A1 WO2022142515 A1 WO 2022142515A1 CN 2021120102 W CN2021120102 W CN 2021120102W WO 2022142515 A1 WO2022142515 A1 WO 2022142515A1
Authority
WO
WIPO (PCT)
Prior art keywords
cluster
instance
node
nodes
resources
Prior art date
Application number
PCT/CN2021/120102
Other languages
English (en)
French (fr)
Inventor
袁诗宇
陈敏
朱锦鸿
莫介水
刘云华
田晓亮
Original Assignee
华为云计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2022142515A1 publication Critical patent/WO2022142515A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Definitions

  • the present application relates to the field of computers, and more particularly, to a method, apparatus and cloud application engine for managing instances.
  • Quality of service refers to the ability of a network to utilize various basic technologies to provide better service capabilities for specified network communications, and is a network security mechanism.
  • the quality of service can ensure that the performance of the data flow reaches a certain level according to the requirements of the application.
  • a node will be added to the cluster. After the node is ready, the resources on it can be used to create the new instance. Since it takes a certain amount of time to add nodes to the cluster (for example, it takes about 2 to 5 minutes from the beginning until the resources of the nodes in the cluster are fully ready and can receive requests), there will be a large number of failures during this period of waiting for nodes to be ready request, reducing the user's QoS.
  • the present application provides a method, an apparatus and a cloud application engine for managing instances, which can satisfy a service level agreement (SLA) and at the same time ensure a user's quality of service (QoS).
  • SLA service level agreement
  • QoS quality of service
  • a method for managing instances including: when a first cluster does not have resources that satisfy the instance, creating an instance on a node other than the first cluster; When the node of the resource of the instance is selected, the instance is migrated to the first cluster.
  • the instance when the first cluster does not meet the resources of the instance, the instance can be created on other nodes other than the first cluster first, and after the nodes in the first cluster are ready, the instance created on the other node can be created. Migrate to the first cluster.
  • instances created on other nodes other than the first cluster and instances in the first cluster can process user requests, which can ensure the QoS of users while meeting the SLA , to avoid a large number of failed requests while waiting for the node to be prepared.
  • the utilization rate of idle resources can also be improved, and the cost of the user can be saved.
  • other nodes other than the first cluster belong to the second cluster.
  • the method further includes: instructing, when the first cluster creates an instance, to determine whether the first cluster has a node that satisfies the resources of the instance.
  • the method further includes: when the first cluster does not have resources that satisfy the instance, adding resources that satisfy the instance to the first cluster node.
  • the method further includes: when the amount of resources of the third cluster is greater than the amount of resources of the first cluster, when the third cluster is created with the Multiple instances on the first cluster are equivalent to multiple instances of functions; after the third cluster completes the creation of multiple instances, the multiple instances on the first cluster are removed.
  • a device for managing instances including: a creation module, a migration module,
  • a creation module configured to create an instance on a node other than the first cluster when the first cluster does not satisfy the resources of the instance
  • a migration module configured to migrate the instance to the first cluster when the first cluster has nodes that satisfy the resources of the instance.
  • other nodes other than the first cluster belong to the second cluster.
  • the apparatus further includes: a determining module, configured to instruct, when the first cluster creates an instance, to determine whether the first cluster has the instance that satisfies the resource node.
  • the apparatus further includes: an adding module, configured to add, when the first cluster does not satisfy the resources of the instance, the first cluster that meets the The node of the resource for the instance.
  • the creating module is further configured to, when the amount of resources of the third cluster is greater than the amount of resources of the first cluster, create and The multiple instances on the first cluster are multiple instances of equivalent functions; the migration module is further configured to remove the multiple instances on the first cluster after the third cluster completes the creation of the multiple instances .
  • a cloud application engine including an input and output interface, a processor and a memory, wherein the processor is used to control the input and output interface to send and receive information, the memory is used to store a computer program, and the processor uses to call and run the computer program from the memory, so that the method described in the first aspect or any possible implementation manner of the first aspect is performed.
  • the processor may be a general-purpose processor, which may be implemented by hardware or software.
  • the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, implemented by reading software codes stored in a memory, which can Integrated in the processor, can be located outside the processor, independent existence.
  • a chip in a fourth aspect, obtains an instruction and executes the instruction to implement the first aspect and the method in any one of the implementation manners of the first aspect.
  • the chip includes a processor and a data interface
  • the processor reads the instructions stored in the memory through the data interface, and executes the first aspect and any one of the implementation manners of the first aspect.
  • the chip may further include a memory, the memory stores an instruction, the processor is used to execute the instruction stored on the memory, and when the instruction is executed, the processor is used to execute the first.
  • a computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute any one of the first aspect and the first aspect method in the implementation.
  • a computer-readable storage medium including instructions; the instructions are used to implement the first aspect and the method in any one of the implementation manners of the first aspect.
  • the above-mentioned storage medium may specifically be a non-volatile storage medium.
  • FIG. 1 is a schematic block diagram of a cluster 100 .
  • FIG. 2 is a schematic block diagram of an application scenario applicable to the present application.
  • FIG. 3 is a schematic flowchart of a method for managing instances provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a scenario of a cross-cluster management instance provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a scenario of a cross-cluster migration instance provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a cluster upgrade scenario provided by an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of an apparatus 700 for managing instances provided by an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a cloud application engine 800 provided by an embodiment of the present application.
  • the network architecture and service scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application.
  • the evolution of the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • At least one means one or more, and “plurality” means two or more.
  • And/or which describes the relationship of the associated objects, means that there can be three relationships, for example, A and/or B, which can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • SLA Service Level Agreement
  • a service level agreement can refer to a contract or agreement between a service provider and a user.
  • a service level agreement defines specific commitments to service metrics (eg, quality, availability, accountability, etc.) between the service provider and the serviced user.
  • QoS Quality of Service
  • Quality of service can refer to a network's ability to use various basic technologies to provide better service capabilities for specified network communications, and is a network security mechanism.
  • the quality of service can ensure that the performance of the data flow reaches a certain level according to the requirements of the application.
  • a load balancer can be used to distribute load among multiple computing devices (also referred to as a cluster of computing devices) or other resources to optimize resource usage, maximize throughput, minimize response time, and avoid overloading.
  • the load balancer is usually completed by dedicated software and hardware, and its main function is to reasonably distribute a large number of jobs to multiple operation units for execution, which is used to solve the problems of high concurrency and high availability in the Internet architecture.
  • An instance can refer to an application instance, that is, an instance created to run an application.
  • an instance can be a Pod running on a node.
  • a Pod can include one or more containers that run the application, which is the carrier for the application to run. When an application needs to be created, the application will be packaged into an image first, then a container will be created with this image, and then the container will be placed in the Pod.
  • the node may be a (virtual machine, VM) virtual machine or a physical machine, which is not specifically limited in this application. It should be understood that a virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
  • VM virtual machine
  • a cluster is a group of independent computing devices interconnected by a high-speed network that form a group and are managed as a single system for managing containerized workloads and services.
  • a cluster may include one or more nodes, and the cluster will manage these nodes in a unified manner.
  • the person creating the cluster can configure the cluster to choose which nodes are included in the cluster.
  • a user can share a cluster exclusively, or multiple users can share a cluster.
  • FIG. 1 is a schematic block diagram of a cluster 100 .
  • the cluster 100 may include multiple nodes, for example, a node 110 , a node 120 , and a node 130 .
  • the instance 111 and the instance 112 run on the node 110
  • the instance 121 and the instance 122 run on the node 120
  • the instance monitor 131 and the node monitor 132 run on the node 130 .
  • the instance monitor 131 is used to monitor the indicators of the instance 111 , the instance 112 , the instance 121 and the instance 122 in the cluster 100 .
  • the indicator may include, but is not limited to: central processing unit (CPU) usage, average memory usage, queries per second (QPS), etc. of the instance.
  • CPU central processing unit
  • QPS queries per second
  • the instance monitor 131 monitors that the current value of the index of the above instance is higher than the preset target value, and the instance can be expanded (ie, a new instance is created in the cluster 100) to ensure that the user QoS is not affected.
  • the instance monitor 131 monitors that the current value of the indicator of a certain instance above is lower than the preset target value, and can perform a scaling operation on the instance (ie, release the instance in the cluster 100) to cut costs.
  • a horizontal pod autoscaler (HPA) in cluster 100 may be responsible for scaling up or scaling down instances in cluster 100. It should be understood that HPA is a commonly used component for elastic scaling.
  • the capacity expansion operation at the node layer is related to the capacity expansion operation at the instance layer (ie, creating a new instance).
  • scaling operations at the node level are related to scaling operations at the instance level (ie, releasing or hibernating instances).
  • a plug-in cluster autoscaler (CA) in the cluster 100 may be responsible for adding or removing nodes from the cluster 100 .
  • CA cluster autoscaler
  • the elastic scaling of the instance layer triggers a capacity expansion operation (ie, a new instance is created), and the node monitor 132 detects that the nodes in the cluster 100 do not have enough resources allocated to the newly added instance, then the capacity expansion operation of the node layer is performed. will be triggered and new nodes will be added to cluster 100.
  • a capacity expansion operation ie, a new instance is created
  • the node monitor 132 detects that the nodes in the cluster 100 do not have enough resources allocated to the newly added instance, then the capacity expansion operation of the node layer is performed. will be triggered and new nodes will be added to cluster 100.
  • creating an instance a Pod
  • RAM random access memory
  • the elastic scaling of the instance layer triggers a scaling-in operation (ie, releasing or hibernating the instance). If the node monitor 132 detects that the resource usage of a node in the cluster 100 is lower than the preset value, it will The node is removed from the cluster 100.
  • the resource usage of the node may include, but is not limited to, CPU usage and/or memory usage of the node, for example.
  • an embodiment of the present application provides a method for managing instances, which can process user requests by instances created on other nodes outside the cluster and by instances in the first cluster during the node preparation process in the cluster .
  • the QoS of users can be guaranteed while satisfying the SLA, and a large number of failed requests can be avoided in the process of waiting for the ready node.
  • FIG. 2 is a schematic block diagram of an application scenario applicable to the present application.
  • the application scenario may include cloud application engine 210 , LB 220 , cluster 1 , and cluster 2 .
  • the cloud application engine 210 is used for cross-cluster resource selection, cluster status monitoring, instance deployment in the cluster, cluster upgrade, and the like. For details, please refer to the descriptions in the following specific embodiments, which will not be described in detail here.
  • the LB220 is used to distribute user requests to instances deployed in cluster 1 and/or cluster 2.
  • Cluster 1 includes node 10 , node 20 , node 30 , and node 40 .
  • the instance 11 and the instance 12 run on the node 10
  • the instance 21 runs on the node 20
  • the instance 31 runs on the node 30
  • the instance monitor 41 and the node monitor 42 run on the node 40 .
  • Cluster 2 includes node 50 , node 60 , node 70 , and node 80 .
  • the instance 51 runs on the node 50
  • the instance 61 runs on the node 60
  • the instance 81 and the instance 82 runs on the node 80
  • the instance monitor 71 and the node monitor 72 run on the node 70 .
  • FIG. 3 is a schematic flowchart of a method for managing instances provided by an embodiment of the present application.
  • the method may include steps 310-320, which will be described in detail below, respectively.
  • Step 310 The cloud application engine 210 creates an instance on a node other than the cluster 1 when the cluster 1 does not have sufficient resources for the instance.
  • the cloud application engine 210 is further configured to determine whether the cluster 1 has a node that satisfies the resources of the instance when the cluster 1 creates an instance.
  • the resource of the instance may be the resource required for creating the instance, that is, the resource of the node that needs to be occupied to create the instance.
  • the instance monitor 41 detects that the current value of the indicator of the instance in cluster 1 is higher than the preset target value, which will trigger the expansion operation of the instance (i.e. create a new instance in the cluster 100). Assuming that 4 instances 0 need to be added to cluster 1, if the node monitor 42 monitors that the resources on the nodes of cluster 1 are only enough to deploy 2 instances 0 (for example, create 1 instance 0 on node 20 in cluster 1, When one instance 0) is created on node 30, in order to deploy the remaining two instances 0 to cluster 1, a new node needs to be added to cluster 1, and the resources on the one node can create the two instances 0 .
  • the cloud application engine 210 may determine that one node 90 needs to be added to the cluster 1 by monitoring the status of the cluster 1 , and create two instances 0 on the node 90 .
  • the two instances 0 created on the newly added node 90 may be referred to as temporary instances 0 below.
  • the cloud application engine 210 does not wait for the node 90 to be ready before processing the user's request, but selects other nodes (the other nodes) from the resource pool through the cloud application engine 210.
  • the resources on the node are sufficient to create the above two temporary instances 0), and deploy the above two temporary instances 0 on the other nodes. That is to say, while preparing the newly added node 90 in the cluster 1, the cloud application engine 210 will temporarily deploy the above-mentioned two temporary instances 0 on other nodes.
  • the other nodes are other nodes than cluster 1 .
  • the other node belongs to cluster 2 .
  • the other nodes may be referred to as idle nodes below.
  • the cloud application engine 210 may determine the idle nodes by monitoring the parameters of each node in the resource pool.
  • the cloud application engine 210 may send a request to the cluster/node in the resource pool to obtain information about the idle nodes in the cluster. parameters of each node so that the cloud application engine 210 can determine idle nodes.
  • the clusters/nodes in the resource pool can also actively report the parameters of the nodes to the cloud application engine 210, so that the cloud application engine 210 can determine idle nodes.
  • the above-mentioned parameters of each node may be, for example, the CPU usage rate and/or the memory usage rate of the node.
  • the cloud application engine 210 sends a request to the cluster/node in the resource pool, so that the node in the cluster can feedback CPU usage and/or memory usage. If some nodes in the cluster are not fully utilized, for example, a node has 8cores CPU, 16GB RAM, but only 5cores CPU, 5GB RAM is used, then the node can be the above idle node, and the temporary instance 0 will be deployed to this node.
  • an idle node in one cluster may be selected from the multiple clusters, and a temporary instance 0 may be deployed on the idle node of the cluster.
  • a temporary instance 0 may be deployed on the idle node of the cluster.
  • the SLA of the application can be satisfied
  • the temporary instance 0 is deployed to the cluster, it cannot be Affect the SLA of the original application on the cluster; (3) Deploy all temporary instance 0 to the same cluster as much as possible. It should be understood that, in order to satisfy the condition (1), after the temporary instance 0 is temporarily deployed on the idle node, the idle node will not be withdrawn suddenly.
  • a prediction algorithm can be used to predict the probability that the idle nodes in each cluster will be reclaimed in the next 2 to 5 minutes, and the idle nodes that are least likely to be reclaimed are preferentially selected.
  • corresponding weights can be set for the above three factors respectively, so as to obtain the score of each candidate cluster in the resource pool. And select a target cluster from multiple candidate clusters, and deploy temporary instance 0 on the idle node of the target cluster.
  • the charging for these idle nodes may be charged according to the price of the spot instance. In this way, while maintaining QoS, it not only improves the utilization rate of idle nodes, but also saves costs for users.
  • cluster 2 can be used as the above target cluster, and the idle nodes in the target cluster can be node 50 and node 60 .
  • the cloud application engine 210 may deploy two instances 0 on node 20 and node 30 of cluster 1 respectively, and deploy the above two temporary instances 0 on nodes 50 and 30 of cluster 2 respectively. on node 60.
  • the cloud application engine 210 can also notify the LB 220 to add the four deployed instances 0 to the traffic distribution list, so that when new requests are sent, not only the two instances 0 deployed in the cluster 1 are used to process these requests , the 2 ephemeral instances 0 deployed in cluster 2 can also be used to handle these requests. Therefore, in the case of burst traffic, the QoS of users can be guaranteed, and a large number of failed requests can be avoided in the process of waiting for node expansion.
  • the LB220 can distribute user requests to each instance in the traffic distribution list based on the traffic distribution policy.
  • traffic distribution policies can vary by instance type. For example, when instances are temporarily deployed on bidding nodes (also called idle nodes) on other clusters due to a surge in traffic, the LB220 can allocate the same number of requests to the instances on the bidding node as the instances in the original cluster. That is, the ratio of the traffic obtained by the cluster where the idle node is located to the traffic obtained by the original cluster is the ratio of the number of their respective application instances. For another example, when a single cluster cannot handle the current traffic due to the continuous increase of traffic, the cloud application engine 210 will add new clusters to help distribute the traffic. At this time, the distribution strategy of the LB220 can be to allow the cluster with high priority to obtain as much traffic as possible, for example, to reach the upper limit of the traffic that it can handle while meeting the SLA.
  • Step 320 The cloud application engine 210 migrates the instance to the cluster 1 when the cluster 1 has nodes that satisfy the resources of the instance.
  • the cloud application engine 210 may migrate the temporary instance 0 to the cluster 1 after the newly added node in the cluster 1 is ready. For example, after the newly added node 90 in the cluster 1 is ready, the temporary instance 0 deployed in the cluster 2 can be migrated to the node 90 in the cluster 1. In this way, on the one hand, since the node of the temporary instance 0 deployed in cluster 2 is a bidding node and can be withdrawn at any time, there is no guarantee for the SLA applied in cluster 1. Therefore, migrating the two temporary instances 0 deployed in the cluster 2 to the node 90 of the cluster 1 can ensure the service quality of the application.
  • the newly added node 90 in the cluster 1 can report its status to the cloud application engine 210, indicating that the request can be received.
  • the cloud application engine 210 receives the message, it creates two instances 0 of the same number as the temporary instance 0 on the newly added node 90 in the cluster 1 shown in FIG. 5 .
  • the cloud application engine 210 notifies the LB 220 to add the two instances 0 created on the node 90 to the traffic offload list, and to remove the two temporary instances 0 deployed in the cluster 2 from the traffic offload list.
  • the cloud application engine 210 may also notify the two temporary instances 0 deployed in the cluster 2 to prepare for migration.
  • the cloud application engine 210 After the two temporary instances 0 have processed all the requests sent to them, they report their status to the cloud application engine 210, indicating that they can be migrated, and the cloud application engine 210 destroys the two temporary instances 0 deployed in the cluster 2. As shown in Figure 5, four instances 0 that need to be expanded have been created in cluster 1, and instance 0 that is temporarily created is not included in cluster 2.
  • the instances may be temporarily deployed on idle nodes in the resource pool.
  • the QoS of users can be improved when there is a burst of traffic, and a large number of failed requests can be avoided in the process of waiting for capacity expansion.
  • the utilization rate of idle resources can also be improved, and the cost of the user can be saved.
  • clusters are subject to a maximum capacity limit.
  • the created cluster has been expanded to the maximum number of nodes it can manage, and user requests continue to increase, the created cluster
  • the resources in can not guarantee the QoS of the application very well.
  • a small cluster may manage a maximum of 50 nodes.
  • the small cluster initially has 3 nodes. As the traffic increases, it performs expansion operations until it expands to 50 nodes. But if the traffic continues to increase at this time, it will not be able to expand, because it can expand to a maximum of 50 nodes.
  • the current cluster is upgraded to a large cluster, and after the new large cluster is completely ready, all the instances in the original cluster are migrated to the new large cluster.
  • the disadvantage of this solution is that, while waiting for the new large cluster to be ready, since the user traffic continues to increase, the original cluster is not enough to handle the traffic, which will result in a decrease in QoS.
  • the embodiment of the present application further provides another method for managing instances, which can improve the QoS of users while meeting the SLA and avoid generating a large number of failed requests during the process of upgrading a small cluster to a large cluster.
  • the cloud application engine 210 can Cluster 1 is upgraded to a large cluster. For example, the cloud application engine 210 newly creates a cluster 2, and the maximum number of nodes that the cluster 2 can manage is, for example, 200.
  • the cloud application engine 210 can also migrate the instance deployed in the original cluster 1 to the cluster 2 after the cluster 2 is fully prepared, so that the QoS of the user can be improved when the user traffic continues to increase while satisfying the SLA.
  • the cluster 1 has been expanded to the upper limit of 50 nodes, but 70 nodes are required to process the current traffic.
  • the cloud application engine 210 will decide to create a large cluster (for example, cluster 2, which can manage the number of nodes)
  • the upper limit is 100). Since a large cluster (for example, cluster 2) is being created, there will be resources on the nodes that can be used to create instances one after another. These already available nodes can report their status to the cloud application engine 210, indicating that they are ready.
  • the cloud application engine 210 deploys the instance on the node that has been created in the cluster 2, and notifies the LB 220 to add the instance deployed on the new node in the large cluster 2 to the traffic distribution list.
  • the cloud application engine 210 will distribute traffic between the nodes of cluster 1 and cluster 2. After cluster 2 is fully prepared (that is, all 70 nodes are created), cluster 1 will be destroyed and all traffic will be sent to cluster 2. In this way, when new requests are sent, not only the original small cluster 1 can be used to process these requests, but the available nodes in the large cluster 2 can also be used to process these requests.
  • the cloud application engine 210 may add a cluster of a suitable model (or known as a cluster that can manage an appropriate number of nodes) and distributes traffic between the large cluster and the newly added cluster.
  • a cluster of a suitable model or known as a cluster that can manage an appropriate number of nodes
  • the original cluster 1 manages a maximum of 50 nodes.
  • the cluster 1 is upgraded to a cluster 2, and the cluster 2 can manage a maximum of 100 nodes.
  • the LB 220 when the same application is deployed on multiple clusters, when the traffic is reduced to the point where so many clusters are not needed, the LB 220 will report this information to the cloud application engine 210, and the cloud application engine 210 The recycle cluster operation will be performed.
  • the capacity can be reduced through the traffic distribution policy of the LB220.
  • the cluster priority can be defined. When scaling down, the cluster with lower priority will be scaled down first. The traffic distribution strategy of LB220 is to let the cluster with higher priority undertake as much as possible under the condition of satisfying the application SLA. Lots of traffic.
  • the LB 220 has no traffic to send to the cluster 2 for a long time, it will report to the cloud application engine 210, indicating that the cluster 2 may no longer be needed. After receiving the message, the cloud application engine 210 checks the status of the cluster 2, and if it is true that no worker nodes exist, the cluster 2 is recycled.
  • the cluster can be reduced to a small cluster. For example, if a cluster that can manage up to 200 nodes is scaled down to 30 nodes due to little traffic received, the LB 220 will send this information to the cloud application engine 210 .
  • the cloud application engine 210 will reduce the current cluster to a small cluster (eg, a cluster that manages at most 50 nodes).
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
  • FIG. 7 is a schematic block diagram of an apparatus 700 for managing an instance provided by an embodiment of the present application.
  • the apparatus 700 for managing an instance can perform each step of the method shown in FIG. 3 , and in order to avoid repetition, details are not described here.
  • the apparatus 700 for managing instances includes: a creation module 710, a migration module 720,
  • a creating module 710 configured to create an instance on a node other than the first cluster when the first cluster does not satisfy the resources of the instance;
  • the migration module 720 is configured to migrate the instance to the first cluster when the first cluster has nodes that satisfy the resources of the instance.
  • the apparatus 700 further includes: a determining module 730, configured to instruct, when the first cluster creates an instance, to determine whether the first cluster has a node that satisfies the resources of the instance.
  • a determining module 730 configured to instruct, when the first cluster creates an instance, to determine whether the first cluster has a node that satisfies the resources of the instance.
  • the apparatus 700 further includes: an adding module 740, configured to add a node that satisfies the resources of the instance in the first cluster when the first cluster does not have the resources that satisfy the instance.
  • an adding module 740 configured to add a node that satisfies the resources of the instance in the first cluster when the first cluster does not have the resources that satisfy the instance.
  • the creating module 710 is further configured to create the third cluster equal to multiple instances on the first cluster when the resource amount of the third cluster is greater than the resource amount of the first cluster Multiple instances of the function; the migration module 720 is further configured to remove multiple instances on the first cluster after the third cluster completes the creation of multiple instances.
  • FIG. 8 is a schematic block diagram of a cloud application engine 800 provided by an embodiment of the present application.
  • the cloud application engine 800 can execute each step of the method shown in FIG. 3 , which will not be described in detail here in order to avoid repetition.
  • the cloud application engine 800 includes: a memory 810 , a processor 820 and an input and output interface 830 .
  • the processor 820 may be connected in communication with the input and output interface 830 .
  • the memory 810 may be used to store program codes and data of the cloud application engine 800 . Therefore, the memory 810 may be an internal storage unit of the processor 820, or may be an external storage unit independent of the processor 820, or may be a storage unit including an internal storage unit of the processor 820 and an external storage unit independent of the processor 820. part.
  • the cloud application engine 800 may further include a bus 840 .
  • the memory 810 and the input/output interface 830 may be connected to the processor 820 through the bus 840 .
  • the bus 840 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus 840 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
  • the processor 820 may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an on-site A field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • the input and output interface 830 may be a circuit including the above-mentioned antenna, transmitter chain, and receiver chain, and the two may be independent circuits or the same circuit.
  • the processor 820 is configured to perform the following operations:
  • the instance is migrated to the first cluster when the first cluster has nodes that satisfy the resources of the instance.
  • the processor 820 is further configured to: instruct, when the first cluster creates an instance, to determine whether the first cluster has a node that satisfies the resources of the instance.
  • the processor 820 is further configured to: instruct, when the first cluster creates an instance, to determine whether the first cluster has a node that satisfies the resources of the instance.
  • the processor 820 is further configured to: when the amount of resources of the third cluster is greater than the amount of resources of the first cluster, creating the third cluster is equivalent to multiple instances on the first cluster Multiple instances of the function; after the third cluster completes the creation of the multiple instances, the multiple instances on the first cluster are removed.
  • modules of the above-described examples can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
  • An embodiment of the present application further provides a chip, the chip obtains an instruction and executes the instruction to implement the method for the above management instance, or the instruction is used to implement the above device for the management instance.
  • the chip includes a processor and a data interface, and the processor reads the instructions stored in the memory through the data interface, and executes the above method for managing the instance.
  • the chip may also include a memory, in which an instruction is stored, the processor is used to execute the instruction stored on the memory, and when the instruction is executed, the processor is used to execute the above-mentioned management. instance method.
  • Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium stores instructions, and the instructions are used for the method for managing instances in the foregoing method embodiments, or the instructions are used for implementing the foregoing management instances. device.
  • Embodiments of the present application further provide a computer program product including instructions, where the instructions are used to implement the method for managing instances in the foregoing method embodiments, or the instructions are used to implement the foregoing apparatus for managing instances.
  • the processor may be a central processing unit (CPU), the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), application specific integrated circuits (application specific integrated circuits) circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory Fetch memory
  • direct memory bus random access memory direct rambus RAM, DR RAM
  • plural means two or more.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, rather than the implementation process of the embodiments of the present application. constitute any limitation.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computing device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供了一种管理实例的方法和装置,该方法包括:在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。上述技术方案中,可以在满足SLA的同时,保证用户的QoS。

Description

管理实例的方法、装置以及云应用引擎
本申请要求于2020年12月31日提交中国专利局、申请号为202011634458.4、申请名称为“管理实例的方法、装置以及云应用引擎”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,并且更具体地,涉及一种管理实例的方法、装置以及云应用引擎。
背景技术
服务质量(quality of service,QoS)指一个网络能够利用各种基础技术,为指定的网络通信提供更好的服务能力,是网络的一种安全机制。服务质量可以根据应用程序的要求,保证数据流的性能达到一定的水准。
一个集群中的资源如果没有满足创建新的实例的资源时,会在该集群中增加节点,该节点准备还之后,其上的资源可以用于创建该新的实例。由于在集群中增加节点需要花费一定时间(例如从开始到集群中节点的资源完全准备好并可以接收请求,大概需要2到5分钟),在这个等待节点准备的时间段内会产生大量的失败请求,降低了用户的QoS。
发明内容
本申请提供一种管理实例的方法、装置以及云应用引擎,可以满足服务等级协议(service level agreement,SLA)的同时,保证用户的服务质量(quality of service,QoS)。
第一方面,提供了一种管理实例的方法,包括:在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。
上述技术方案中,在第一集群没有满足所述实例的资源时,先可以在第一集群以外的其它节点创建实例,并在第一集群中的节点准备好之后,将其它节点上创建的实例迁移到第一集群中。这样,在第一集群的节点准备的过程中,可以由第一集群以外的其它节点上创建的实例以及第一集群中的实例对用户请求进行处理,可以在满足SLA的同时,保证用户的QoS,避免在等待准备节点的过程中产生大量的失败请求。并且,还可以提高空闲资源的利用率,节省用户的成本。
结合第一方面,在第一方面的某些实现方式中,所述第一集群以外的其它节点属于第二集群。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:在所述第一集群没 有满足所述实例的资源时,在所述第一集群增加满足所述实例的资源的节点。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:在第三集群的资源量大于所述第一集群的资源量时,在所述第三集群创建与所述第一集群上的多个实例等同功能的多个实例;在所述第三集群完成多个实例的创建之后,移出所述第一集群上的多个实例。
第二方面,提供了一种管理实例的装置,包括:创建模块、迁移模块,
创建模块,用于在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;
迁移模块,用于在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。
结合第二方面,在第二方面的某些实现方式中,所述第一集群以外的其它节点属于第二集群。
结合第二方面,在第二方面的某些实现方式中,所述装置还包括:确定模块,用于指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
结合第三方面,在第三方面的某些实现方式中,所述装置还包括:增加模块,用于在所述第一集群没有满足所述实例的资源时,在所述第一集群增加满足所述实例的资源的节点。
结合第二方面,在第二方面的某些实现方式中,所述创建模块,还用于在第三集群的资源量大于所述第一集群的资源量时,在所述第三集群创建与所述第一集群上的多个实例等同功能的多个实例;所述迁移模块,还用于在所述第三集群完成多个实例的创建之后,移出所述第一集群上的多个实例。
第三方面,提供了一种云应用引擎,包括输入输出接口、处理器和存储器,其中所述处理器用于控制所述输入输出接口收发信息,所述存储器用于存储计算机程序,所述处理器用于从存储器中调用并运行该计算机程序,使得所述执行第一方面或第一方面任意一种可能的实现方式中所述的方法。
可选地,该处理器可以是通用处理器,可以通过硬件来实现也可以通过软件来实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。
第四方面,提供了一种芯片,该芯片获取指令并执行该指令来实现上述第一方面以及第一方面的任意一种实现方式中的方法。
可选地,作为一种实现方式,该芯片包括处理器与数据接口,该处理器通过该数据接口读取存储器上存储的指令,执行上述第一方面以及第一方面的任意一种实现方式中的方法。
可选地,作为一种实现方式,该芯片还可以包括存储器,该存储器中存储有指令,该处理器用于执行该存储器上存储的指令,当该指令被执行时,该处理器用于执行第一方面以及第一方面中的任意一种实现方式中的方法。
第五方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述第一方面以及第一方面的 任意一种实现方式中的方法。
第六方面,提供了一种计算机可读存储介质,包括指令;所述指令用于实现上述第一方面以及第一方面的任意一种实现方式中的方法。
可选地,作为一种实现方式,上述存储介质具体可以是非易失性存储介质。
附图说明
图1是集群100的示意性框图。
图2是适用于本申请的一种应用场景的示意性框图。
图3是本申请实施例提供的一种管理实例的方法的示意性流程图。
图4是本申请实施例提供的一种跨集群管理实例的场景示意图。
图5是本申请实施例提供的一种跨集群迁移实例的场景示意图。
图6是本申请实施例提供的一种集群升级的场景示意图。
图7是本申请实施例提供的管理实例的装置700的示意性框图。
图8是本申请实施例提供的云应用引擎800的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请将围绕包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。
另外,在本申请实施例中,“示例的”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。
本申请实施例中,“相应的(corresponding,relevant)”和“对应的(corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。
本申请实施例描述的网络架构以及业务场景是为了更加清楚地说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:包括单独存在A,同时存在A和B,以及单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指 的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
由于本申请实施例涉及大量的专业术语,为了便于理解,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。
(1)服务等级协议(service level agreement,SLA)
服务等级协议可以指服务提供者和用户之间签订的一个合约或协议。服务等级协议定义了服务提供商与受服务用户之间具体承诺的服务指标(例如,质量、可用性、责任等)。
(2)服务质量(quality of service,QoS)
服务质量可以指一个网络能够利用各种基础技术,为指定的网络通信提供更好的服务能力,是网络的一种安全机制。服务质量可以根据应用程序的要求,保证数据流的性能达到一定的水准。
(3)负载均衡器(load balancer,LB)
负载均衡器可以用于在多个计算设备(也可以称为计算设备集群)或其他资源中分配负载以达到最佳化资源使用、最大化吞吐率、最小化响应时间、同时避免过载的目的。负载均衡器通常由专用软件和硬件来完成,主要作用是将大量作业合理地分摊到多个操作单元上进行执行,用于解决互联网架构中的高并发和高可用的问题。
(4)实例(instance)
实例可以指应用实例,即为运行一个应用而创建的实例。作为示例,实例可以是运行在一个节点上的Pod。Pod中可以包括运行应用程序的一个或多个容器,为应用运行的载体。当需要创建一个应用时,会先把应用打包成镜像,再用此镜像创建容器,再将容器放到Pod当中。
(5)节点(node)
节点上可以创建和运行实例。节点可以是一个(virtual machine,VM)虚拟机或者物理机器,本申请对此不做具体限定。应理解,虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。
(6)集群(cluster)
集群是一组相互独立的、通过高速网络互联的计算设备,它们构成了一个组,并以单一系统的模式加以管理,用于管理容器化的工作负载和服务。例如,一个集群中可以包括一个或多个节点,集群会对这些节点做统一管理。创建集群的人可以通过对集群进行配置来选择集群中包括的节点。一个用户可以独享一个集群,也可以多个用户共享一个集群。
图1是集群100的示意性框图。如图1所示,该集群100中可以包括多个节点,例如,节点110、节点120、节点130。其中,节点110上运行实例111、实例112,节点120上运行实例121、实例122,节点130上运行实例监测器131、节点监测器132。
对于实例层的弹性伸缩而言,实例监测器131用于对集群100中的实例111、实例112、实例121、实例122的指标进行监控。作为示例,该指标例如可以包括但不限于:实例的中央处理器(central processing unit,CPU)使用率、平均内存使用率、每秒钟的处理量(queries per second,QPS)等。例如,假设用户的请求量增大,实例监测器131监测到上述实例的指标当前值高于预设目标值,可以对实例进行扩容操作(即在集群100中创建 新的实例),以保证用户的QoS不受影响。又如,假设用户的请求量减小,实例监测器131监测到上述某个实例的指标当前值低于预设目标值,可以对实例进行缩容操作(即在集群100中释放实例),以降低成本。作为示例,可以由集群100中的水平pod自动缩放器(horizontal pod autoscaler,HPA)负责对群100中的实例进行扩容或缩容。应理解,HPA为一种弹性伸缩常用的组件。
对于节点的管理而言,节点层的扩容操作(即在集群100中添加新的节点)和实例层的扩容操作(即创建新的实例)相关。同样的,节点层的缩容操作(即在集群100中移除节点)和实例层的缩容操作(即释放或休眠实例)相关。一个举例说明,可以由集群100中的插件集群自动缩放器(cluster autoscaler,CA)负责在集群100中新增节点或移除节点。下面分别对节点层的扩容和缩容进行举例说明。
作为一个示例,实例层的弹性伸缩触发了扩容操作(即创建新的实例),节点监测器132监测到集群100中的节点没有足够的资源分配给新增的实例,那么节点层的扩容操作就会被触发,新的节点会被添加到集群100中。比如创建一个实例(一个Pod)需要1core CPU,1GB随机存储存储器(random access memory,RAM),但目前节点上只剩1core CPU,0.5GB RAM,不够创建这个实例,那么就会触发集群100中的节点扩容。
另一个示例,实例层的弹性伸缩触发了缩容操作(即释放或休眠实例),如果节点监测器132监测到集群100中的某个节点的资源使用情况低于预设值,那么就会将该节点从集群100中移除出去。该节点的资源使用情况例如可以包括但不限于:节点的CPU使用率和/或内存使用率。例如,集群100中的节点110为8cores CPU,16GB RAM。如果节点110上运行了2个实例,每个实例需要使用的资源为3core CPU,3GB RAM,那么节点110就会使用6cores CPU,6GB RAM,CPU使用率为6/8=75%,内存使用率为6/16=37.5%。集群100中的节点120为8cores CPU,16GB RAM。如果节点120上运行了1个实例,每个实例需要使用的资源为3core CPU,3GB RAM,那么节点120就会使用3cores CPU,3GB RAM,CPU使用率为3/8=37.5%,内存使用率为3/16=18.75%。假设CPU和内存使用率的默认目标都是50%,那么在两者的使用率均低于50%时,就会触发节点的缩容操作。在上述例子中,节点110的内存使用率虽然低于50%,但CPU使用率是75%,是高于50%的,所以节点110不会被从集群100中移除。节点120的CPU和内存使用率都低于50%,所以节点120会从集群100中移除。
由于在集群中增加节点需要花费一定时间(例如从开始到集群中节点的资源完全准备好并可以接收请求,大概需要2到5分钟),在这个等待节点准备的时间段内会产生大量的失败请求,降低了用户的QoS。
有鉴于此,本申请实施例提供了一种管理实例的方法,可以在集群中的节点准备的过程中,由集群以外的其它节点上创建的实例以及第一集群中的实例对用户请求进行处理。这样,可以在满足SLA的同时,保证用户的QoS,避免在等待准备节点的过程中产生大量的失败请求。
为了便于描述,下面先结合图2,对适用于本申请的一种场景示意图进行描述和说明。
图2是适用于本申请的一种应用场景的示意性框图。如图2所示,该应用场景中可以包括云应用引擎210、LB220、集群1、集群2。
云应用引擎210,用于跨集群进行资源选择、集群的状态监控、集群中的实例部署、 集群升级等。具体的请参见下面具体实施例中的描述,此处暂不详述。
LB220,用于将用户请求分发至集群1和/或集群2部署的实例中。作为示例,LB220可以基于流量分发策略,将用户请求分发至流量分发清单中的各个实例中。例如,LB220上的一种流量分流方法是根据每个集群上运行应用的实例数目来分流。若p jk表示应用j在集群k(k=1,2,…,n)上的总实例数目,那么各个集群被分到的发送给应用j的流量比例为:
Figure PCTCN2021120102-appb-000001
集群1,包括节点10、节点20、节点30、节点40。其中,节点10上运行有实例11、实例12,节点20上运行有实例21,节点30上运行有实例31,节点40上运行有实例监测器41、节点监测器42。
集群2,包括节点50、节点60、节点70、节点80。其中,节点50上运行有实例51,节点60上运行有实例61,节点80上运行有实例81、实例82,节点70上运行有实例监测器71、节点监测器72。
图3是本申请实施例提供的一种管理实例的方法的示意性流程图。参见图3,该方法可以包括步骤310-320,下面分别对步骤310-320进行详细描述。
步骤310:云应用引擎210在集群1没有满足实例的资源时,在集群1以外的其它节点创建实例。
可选地,在步骤310之前,云应用引擎210还用于在集群1创建实例时,确定所述集群1是否具有满足所述实例的资源的节点。应理解,实例的资源可以是创建实例所需的资源,即创建实例需要占用的节点的资源。
具体的,一种示例,在用户对集群1的请求量剧增的情况下,实例监测器41监测到集群1中的实例的指标当前值高于预设目标值,会触发实例的扩容操作(即在集群100中创建新的实例)。假设集群1中需要增加4个实例0,如果节点监测器42监测到集群1的节点上的资源最多只够部署2个实例0(例如,在集群1中的节点20上创建1个实例0,在节点30上创建1个实例0)时,为了将剩余的2个实例0部署到集群1中,需要为集群1新增1个节点,该1个节点上的资源能够创建该2个实例0。云应用引擎210可以通过监测集群1的状态确定集群1需要增加1个节点90,并在该节点90上创建2个实例0。为了便于描述,下面可以将在新增加的节点90上创建的2个实例0称为临时实例0。
云应用引擎210在集群1中准备新增加的节点90的过程中,不会等待该节点90准备好之后再处理用户的请求,而是通过云应用引擎210从资源池中选择其他节点(该其他节点上的资源能够满足创建上述2个临时实例0),并在该其他节点上部署上述2个临时实例0。也就是说,在集群1中准备新增加的节点90的同时,云应用引擎210会暂时将上述2个临时实例0部署在其他节点上。作为示例,该其他节点为集群1以外的其它节点。优选的,该其他节点属于集群2。为了便于描述,下面可以将该其他节点称为闲置节点。
具体的,作为示例,云应用引擎210可以通过监控资源池中各个节点的参数来确定的闲置节点,一种实现方式,云应用引擎210可以向资源池中的集群/节点发送请求以获取集群中各个节点的参数,以便于云应用引擎210可以确定闲置节点。另一种实现方式,资源池中的集群/节点还可以主动向云应用引擎210汇报节点的参数,以便于云应用引擎210 确定闲置节点。上述各个节点的参数例如可以是节点的CPU使用率和/或内存使用率。一个示例,云应用引擎210向资源池中的集群/节点发送请求,以便于该集群中的节点反馈CPU使用率和/或内存使用率。如果该集群中的某些节点没有被充分利用,比如一个节点有8cores CPU,16GB RAM,但只被使用了5cores CPU,5GB RAM,那么该节点就可以是上述闲置节点,并将临时实例0部署到这个节点上。
可选地,如果云应用引擎210确定多个集群中都有闲置节点时,可以从该多个集群中选择一个集群中的闲置节点,并在该集群的闲置节点上部署临时实例0。具体的,可以考虑如下因素中的一种或多种:(1)将临时实例0部署到闲置节点上之后,可以满足应用的SLA;(2)在将临时实例0部署到该集群之后,不能影响该集群上原有应用的SLA;(3)尽可能将所有临时实例0都部署到同一个集群上。应理解,为了满足条件(1),就需要在将临时实例0临时部署到闲置节点上之后,该闲置节点不会突然被收回。例如,可以使用预测算法预测在未来的2到5分钟之内,各个集群中的闲置节点被收回的概率大小,优先选择其中最不容易被收回的闲置节点。一种实现的方式中,可以将上述3个因素分别设置相应的权重,从而得到资源池中每个备选集群的得分。并从多个备选集群中选择一个目标集群,在该目标集群的闲置节点上部署临时实例0。
可选地,由于只是临时使用闲置节点,对这些闲置节点的计费可以按照竞价实例的价格来计费。这样,在维持QoS的同时,不仅提高了闲置节点的利用率,还可以为用户节省花销。
举例说明,集群2可以作为上述目标集群,目标集群中的闲置节点可以是节点50、节点60。参见图4,本申请实施例中云应用引擎210可以将2个实例0分别部署在集群1的节点20上和节点30上,并将上述2个临时实例0分别部署在集群2的节点50和节点60上。云应用引擎210还可以通知LB220将上述部署的4个实例0添加到流量分发清单中,这样,在新的请求被发送过来时,不仅集群1中部署的2个实例0被用来处理这些请求,集群2中部署的2个临时实例0也可以被用来处理这些请求。从而在有突发流量的情况下可以保证用户的QoS,避免在等待节点扩容的过程中产生大量的失败请求。
LB220可以基于流量分发策略,将用户请求分发至流量分发清单中的各个实例中。作为示例,流量分发策略可以因实例类型的不同会有所变化。例如,当由于流量激增而在其他集群上的竞价节点(也可以称为闲置节点)上临时部署实例时,LB220可以给竞价节点上的实例与原集群中的实例分配到同样多的请求。即,闲置节点所在集群得到的流量与原集群得到的流量比例为各自应用实例数目的比例。又如,当由于流量不断增长导致单一集群不能处理当前流量时,云应用引擎210会新增集群来帮助分摊这些流量。这时,LB220的分发策略可以是让优先级高的集群获得尽可能多的流量,例如,达到它能在满足SLA的情况下能够处理的流量上限。
步骤320:云应用引擎210在集群1具有满足所述实例的资源的节点时,将所述实例迁移至所述集群1。
具体的,作为示例,云应用引擎210可以在集群1中新增加的节点准备好之后,将临时实例0迁移到集群1上。例如,可以在集群1中新增加的节点90准备好之后,可以将集群2中部署的临时实例0迁移到集群1的节点90上。这样,一方面,由于集群2中部署的临时实例0的节点是竞价节点,可以随时被收回,对集群1中应用的SLA没有保证。 因此,将部署在集群2中的2个临时实例0迁移到集群1的节点90上,可以保证应用的服务质量。另一方面,新增加的实例如果部署得很分散(分布于多个集群),会增加管理开销,因此,将部署在集群2中的2个临时实例0迁移到集群1的节点90上,可以降低多个集群的管理开销。
作为示例,在一种具体的实现方式中,集群1中新增加的节点90准备好之后,可以向云应用引擎210汇报自己的状态,表示可以接收请求。云应用引擎210收到该消息之后,在图5所示的集群1中新增加的节点90上创建与临时实例0同样数目的2个实例0。云应用引擎210通知LB220将在节点90上创建的2个实例0添加到流量分流清单,并将集群2中部署的2个临时实例0移除流量分流清单。云应用引擎210还可以通知集群2中部署的2个临时实例0准备迁移。2个临时实例0处理完发送给它的所有请求后,向云应用引擎210汇报自己的状态,表示可以迁移,云应用引擎210销毁集群2中部署的2个临时实例0。如图5所示,集群1中已创建需要扩容的4个实例0,集群2中不包括临时创建的实例0。
上述技术方案中,在原始集群中的节点准备的过程中,可以暂时先将实例临时部署在资源池中空闲的节点上。这样,可以在满足SLA的同时,提高在有突发流量的情况下用户的QoS,避免在等待扩容的过程中产生大量的失败请求。并且,还可以提高空闲资源的利用率,节省用户的成本。
应理解,集群是有最大容量限制的。作为示例,在创建集群时,集群所管理的节点数目是有上限的,当已创建的集群已经扩容到其能够管理的最大节点数目,且用户的请求还在持续增加时,该已创建的集群中的资源不能很好的保证应用的QoS。比如小集群可能最多管理50个节点,假设该小集群初始有3个节点,随着流量的增加,它执行扩容操作,一直扩容到50个节点。但如果这个时候流量还在持续增加,它就扩容不了了,因为它最多扩容到50个节点。传统的技术方案中,是将当前的集群升级为大集群,等到新的大集群完全准备好之后,将原集群中的实例全部迁移到新的大集群中。这种方案的弊端在于,在等待新的大集群准备好的过程中,由于用户流量依然在持续增加,原集群不足以处理这些流量,因而会造成QoS下降的结果。
因此,本申请实施例进一步还提供了另一种管理实例的方法,可以在将小集群升级为大集群的过程,在满足SLA的同时,提高用户的QoS,避免产生大量的失败请求。
如图6所示,假设原始集群1中可以管理的最大节点数目为50个,当原始集群1中的节点扩容到50个,但用户的请求还在持续增加时,云应用引擎210可以将原始集群1升级成一个大集群。举例说明,云应用引擎210新创建一个集群2,该集群2例如可以管理的最大节点数目为200个。云应用引擎210还可以在集群2完全准备好之后,将原始集群1中部署的实例迁移到集群2中,从而在满足SLA的同时,可以提高在有用户流量持续增长的情况下用户的QoS。
具体的,作为示例,比如集群1已经扩容到上限50个节点,但要处理当前流量需要70个节点,这时,云应用引擎210会决定创建大集群(例如集群2,其能够管理的节点数目上限为100个)。由于大集群(例如集群2)被创建的过程中,会陆续有节点上的资源可以用于创建实例。这些已经可用的节点可以向云应用引擎210汇报自己的状态,表示自己已经准备好。云应用引擎210收到这个消息之后,在集群2中已经创建好的节点上部署 实例,并通知LB220将大集群2中新的节点上部署的实例加入流量分发清单中。例如,在集群2从1个节点逐渐扩容为70个节点过程中,云应用引擎210会把流量在集群1和集群2节点之间分发。在集群2完全准备好(即70个节点全部创建完成)之后,会销毁集群1,并将流量全部发给集群2。这样,在新的请求被发送过来时,不仅原先的小集群1可以被用来处理这些请求,大集群2中的可用节点也可以用于处理这些请求。
上述技术方案中,在上述小集群升级为大集群的过程中,可以在两个集群之间做流量分发,从而可以保证用户的QoS。
可选地,在一些实施例中,对于流量持续不断增长的场景,如果升级之后的大集群(例如集群2)无法满足用户的QoS,云应用引擎210可以新增一个合适型号的集群(也可以称为可以管理合适数量节点的集群),并将流量在大集群和新增的集群之间分发。具体的,作为示例,比如原先集群1最多管理50个节点,随流量的不断增长,将集群1升级为集群2,集群2最多能管理100个节点。如果此时流量依然继续增长(比如实际上需要120个节点才能很好地处理当前流量),假设目前只有上限50个节点的集群和上限100个节点这两种集群可供选择,本申请实施例可以新增一个上限50个节点的集群3,并将流量在集群2和集群3之间分发。
可选地,在一些实施例中,当同一个应用被部署在多个集群上时,当流量减少到不需要这么多集群时,LB220会将这个信息汇报给云应用引擎210,云应用引擎210就会进行回收集群操作。一个示例,若应用分布在多个集群上,可以通过LB220的流量分发策略来缩容。例如,可以定义集群优先级,在缩容时,优先级低的集群会先被缩容,LB220的流量分发策略是在满足应用SLA的条件下,尽可能多地让优先级高的集群承担更多流量。
举例说明,假设应用同时部署在集群1和集群2上。处理能力较高的集群1的优先级高于处理能力较低的集群2。如果两个集群中节点的处理能力相同,并且在满足SLA的情况下,一个节点最多可以同时处理100个请求。由于LB220在分发流量时会尽量让集群1处理更多的流量,而集群1最多能同时处理20000个请求(200个节点*100个请求/节点=20000请求)。因此,当总的请求数目低于20000时,LB220会将全部请求发送给集群1,集群1中的节点进而平分请求数目。如果总的请求数目高于20000,剩余的请求会被发给集群2。可以看到,当总的请求数目处于20000以下一段时间之后,集群2中实例层的自动伸缩和节点层的自动伸缩都会被触发,最后变成无工作节点的集群。当LB220长期没有流量发送给集群2时,会向云应用引擎210汇报,表示有可能已经不需要集群2了。云应用引擎210接到消息之后查看集群2的状态,如果的确已经没有工作节点存在,就回收集群2。
可选地,如果仅剩一个集群或应用只部署在一个集群上,并且流量依然少到集群中的节点数目缩容到预设百分比之下,可以对该集群降为小集群。例如,最多可管理200个节点的集群由于接收到的流量很少而缩容到30个节点,LB220会将这个信息发送给云应用引擎210。云应用引擎210会将当前的集群降为小集群(如最多管理50个节点的集群)。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上文结合图1至图6,详细描述了一种管理实例的方法,下面将结合图7-图8,详细 描述本申请的装置实施例。
图7是本申请实施例提供的一种管理实例的装置700的示意性框图。管理实例的装置700能够执行图3所示的方法的各个步骤,为了避免重复,此处不再详述。管理实例的装置700包括:创建模块710、迁移模块720,
创建模块710,用于在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;
迁移模块720,用于在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。
可选地,所述第一集群以外的其它节点属于第二集群。
可选地,所述装置700还包括:确定模块730,用于指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
可选地,所述装置700还包括:增加模块740,用于在所述第一集群没有满足所述实例的资源时,在所述第一集群增加满足所述实例的资源的节点。
可选地,所述创建模块710,还用于在第三集群的资源量大于所述第一集群的资源量时,在所述第三集群创建与所述第一集群上的多个实例等同功能的多个实例;所述迁移模块720,还用于在所述第三集群完成多个实例的创建之后,移出所述第一集群上的多个实例。
图8是本申请实施例提供的云应用引擎800的示意性框图。云应用引擎800能够执行图3所示的方法的各个步骤,为了避免重复,此处不再详述。云应用引擎800包括:存储器810、处理器820以及输入输出接口830。
其中,该处理器820可以与输入输出接口830通信连接。该存储器810可以用于存储该云应用引擎800的程序代码和数据。因此,该存储器810可以是处理器820内部的存储单元,也可以是与处理器820独立的外部存储单元,还可以是包括处理器820内部的存储单元和与处理器820独立的外部存储单元的部件。
可选的,云应用引擎800还可以包括总线840。其中,存储器810、输入输出接口830可以通过总线840与处理器820连接。总线840可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线840可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
举例说明,处理器820例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
输入输出接口830可以是包括上述天线和发射机链和接收机链的电路,二者可以是独立的电路,也可以是同一个电路。
当存储器810中存储的云应用引擎800的程序代码和数据被执行时,一种可能的实现方式中,所述处理器820用于执行以下操作:
在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;
在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。
可选地,所述第一集群以外的其它节点属于第二集群。
可选地,所述处理器820还用于:指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
可选地,所述处理器820还用于:指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
可选地,所述处理器820还用于:在第三集群的资源量大于所述第一集群的资源量时,在所述第三集群创建与所述第一集群上的多个实例等同功能的多个实例;在所述第三集群完成多个实例的创建之后,移出所述第一集群上的多个实例。
上述描述的各示例的模块,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例还提供一种芯片,该芯片获取指令并执行该指令来实现上述管理实例的方法,或者该指令用于实现上述的管理实例的装置。
可选地,作为一种实现方式,该芯片包括处理器与数据接口,该处理器通过该数据接口读取存储器上存储的指令,执行上述管理实例的方法。
可选地,作为一种实现方式,该芯片还可以包括存储器,该存储器中存储有指令,该处理器用于执行该存储器上存储的指令,当该指令被执行时,该处理器用于执行上述管理实例的方法。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质存储有指令,该指令用于上述方法实施例中的管理实例的方法,或者该指令用于实现上述的管理实例的装置。
本申请实施例还提供一种包含指令的计算机程序产品,该指令用于实现上述方法实施例中的管理实例的方法,或者该指令用于实现上述的管理实例的装置。
一种实现举例,处理器可以为中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
一种实现举例,存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数 据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。
本申请中,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (14)

  1. 一种管理实例的方法,其特征在于,所述方法包括:
    在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;
    在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。
  2. 根据权利要求1所述的方法,其特征在于,所述第一集群以外的其它节点属于第二集群。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法包括:
    指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    在所述第一集群没有满足所述实例的资源时,在所述第一集群增加满足所述实例的资源的节点。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:
    在第三集群的资源量大于所述第一集群的资源量时,在所述第三集群创建与所述第一集群上的多个实例等同功能的多个实例;
    在所述第三集群完成多个实例的创建之后,移出所述第一集群上的多个实例。
  6. 一种管理实例的装置,其特征在于,包括:
    创建模块,用于在第一集群没有满足所述实例的资源时,在所述第一集群以外的其它节点创建实例;
    迁移模块,用于在所述第一集群具有满足所述实例的资源的节点时,将所述实例迁移至所述第一集群。
  7. 根据权利要求6所述的装置,其特征在于,所述第一集群以外的其它节点属于第二集群。
  8. 根据权利要求6或7所述的装置,其特征在于,所述装置还包括:
    确定模块,用于指示在所述第一集群创建实例时,确定所述第一集群是否具有满足所述实例的资源的节点。
  9. 根据权利要求6至8中任一项所述的装置,其特征在于,所述装置还包括:
    增加模块,用于在所述第一集群没有满足所述实例的资源时,在所述第一集群增加满足所述实例的资源的节点。
  10. 根据权利要求6至9中任一项所述的装置,其特征在于,
    所述创建模块,还用于在第三集群的资源量大于所述第一集群的资源量时,在所述第三集群创建与所述第一集群上的多个实例等同功能的多个实例;
    所述迁移模块,还用于在所述第三集群完成多个实例的创建之后,移出所述第一集群上的多个实例。
  11. 一种云应用引擎,其特征在于,包括处理器和存储器;所述处理器运行所述存储器中的指令,使得所述云应用引擎执行如权利要求1至5中任一项所述的方法。
  12. 一种云应用引擎,其特征在于,包括处理器和存储器;所述处理器运行所述存储 器中的指令,使得所述云应用引擎部署如权利要求6至10中任一项所述的管理实例的装置。
  13. 一种计算机可读存储介质,其特征在于,包括指令;所述指令用于实现如权利要求1至5中任一项所述的方法。
  14. 一种计算机可读存储介质,其特征在于,包括指令;所述指令用于实现如权利要求6至10中任一项所述的管理实例的装置。
PCT/CN2021/120102 2020-12-31 2021-09-24 管理实例的方法、装置以及云应用引擎 WO2022142515A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011634458.4A CN114691283A (zh) 2020-12-31 2020-12-31 管理实例的方法、装置以及云应用引擎
CN202011634458.4 2020-12-31

Publications (1)

Publication Number Publication Date
WO2022142515A1 true WO2022142515A1 (zh) 2022-07-07

Family

ID=82134625

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120102 WO2022142515A1 (zh) 2020-12-31 2021-09-24 管理实例的方法、装置以及云应用引擎

Country Status (2)

Country Link
CN (1) CN114691283A (zh)
WO (1) WO2022142515A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214117A (zh) * 2010-04-07 2011-10-12 中兴通讯股份有限公司 虚拟机管理方法、系统及虚拟机管理服务器
US20180123863A1 (en) * 2016-10-31 2018-05-03 Microsoft Technology Licensing, Llc Flighting of Node Controller in Pilot Mode in Resource Management System
CN110221920A (zh) * 2019-06-04 2019-09-10 合肥讯飞数码科技有限公司 部署方法、装置、存储介质及系统
CN110289983A (zh) * 2019-05-17 2019-09-27 平安科技(深圳)有限公司 负载均衡应用创建方法、装置、计算机设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214117A (zh) * 2010-04-07 2011-10-12 中兴通讯股份有限公司 虚拟机管理方法、系统及虚拟机管理服务器
US20180123863A1 (en) * 2016-10-31 2018-05-03 Microsoft Technology Licensing, Llc Flighting of Node Controller in Pilot Mode in Resource Management System
CN110289983A (zh) * 2019-05-17 2019-09-27 平安科技(深圳)有限公司 负载均衡应用创建方法、装置、计算机设备及存储介质
CN110221920A (zh) * 2019-06-04 2019-09-10 合肥讯飞数码科技有限公司 部署方法、装置、存储介质及系统

Also Published As

Publication number Publication date
CN114691283A (zh) 2022-07-01

Similar Documents

Publication Publication Date Title
US10985989B2 (en) Cross layer signaling for network resource scaling
US10810045B2 (en) Method and apparatus for allocating central processing unit (CPU) resources in a default resource pool
JP5510556B2 (ja) 仮想マシンのストレージスペースおよび物理ホストを管理するための方法およびシステム
US9588789B2 (en) Management apparatus and workload distribution management method
US9367340B2 (en) Resource management method and apparatus for virtual machine system, and virtual machine system
US9442763B2 (en) Resource allocation method and resource management platform
CN112867050B (zh) 一种upf网元管理方法及系统
WO2015196931A1 (zh) 基于磁盘io的虚拟资源分配方法及装置
CN110383764B (zh) 无服务器系统中使用历史数据处理事件的系统和方法
CN111796908B (zh) 一种资源自动弹性伸缩的系统、方法及云平台
CN109726005B (zh) 用于管理资源的方法、服务器系统和计算机可读介质
WO2016078178A1 (zh) 一种虚拟cpu调度方法
EP3584998A1 (en) Method for virtual machine capacity expansion and reduction and virtual management device
WO2013139037A1 (zh) 用于调度资源的方法及装置
WO2023071576A1 (zh) 容器集群构建方法及系统
WO2014154045A1 (zh) 多内核操作系统实现方法和实现装置及系统
CN113760549B (zh) 一种pod部署方法及装置
Wu et al. ABP scheduler: Speeding up service spread in docker swarm
US11057263B2 (en) Methods and subsystems that efficiently distribute VM images in distributed computing systems
WO2022142515A1 (zh) 管理实例的方法、装置以及云应用引擎
CN107408058A (zh) 一种虚拟资源的部署方法、装置及系统
US10649816B2 (en) Elasticity engine for availability management framework (AMF)
CN102696257B (zh) 实现多物理服务器之间温度均衡的方法及装置
WO2024098926A1 (zh) 一种计算资源的管理方法以及装置
US10042682B2 (en) Copy message from application buffer to send buffer within kernel

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21913260

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21913260

Country of ref document: EP

Kind code of ref document: A1