Service instance deployment method, device, electronic device and storage medium

By automatically comparing and selecting target clusters, it solves the problem of cumbersome service instance deployment and change processes, improves deployment efficiency and flexibility, reduces labor costs and resource occupation, and speeds up service upgrades.

CN114675927BActive Publication Date: 2024-09-10BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011560179.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-09-10
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

The service instance deployment and change process in the existing technology is cumbersome, resulting in low deployment efficiency, and the service instance deployment strategy is not flexible enough. Frequent communication and negotiation are required to specify the target cluster, which increases labor costs and resource occupation.

Method used

By determining the original deployment cluster and remaining resource information to which the target service belongs, automatically comparing the required resources with the remaining resources, selecting the target cluster that meets the conditions from the candidate clusters, and determining the number of instances based on the remaining resource information to achieve automatic deployment.

Benefits of technology

It improves the efficiency and flexibility of service deployment, reduces human communication costs, simplifies resource management, and improves service upgrade speed and cluster mobility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114675927B
    Figure CN114675927B
Patent Text Reader

Abstract

The present disclosure relates to a service instance deployment method, device, electronic device and storage medium. The method includes: in response to a change request for a target service, determining the original deployment cluster to which the target service belongs; determining the required resources according to the change request, and determining the remaining resource information of the original deployment cluster; comparing the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determining the target cluster from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in the candidate cluster whose remaining resources meet the change request and meet the cluster operation and maintenance conditions; determining the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster; and deploying the corresponding number of instances of the target service on the target cluster based on the number of instances. During the entire process, users do not need to communicate with other personnel, which reduces the human communication cost at the resource level and greatly improves the deployment efficiency of the change service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of cluster technology, and in particular to a service instance deployment method, device, electronic device, and storage medium. Background Art

[0002] Currently, containerized deployment has become the mainstream choice for enterprise service deployment. As the scale of enterprise business grows, the computing resources required for service deployment will increase, gradually exceeding the upper limit of computing resources that a single container cluster can carry. At this time, if you want to change the service that has been deployed in the previous cluster, the service manager needs to communicate and negotiate with the cluster manager to specify the target cluster so that the instance of the service that needs to be changed can be deployed to the target cluster.

[0003] However, in the related technology, the cluster used to deploy the changed service needs to be specified through communication and negotiation between the service manager and the cluster manager. Due to the large number of links in the entire change process, the deployment efficiency of the changed service is low. In addition, since the target cluster needs to be negotiated and specified, the service instance deployment strategy is not flexible enough. Summary of the invention

[0004] The present disclosure provides a service instance deployment method, device, electronic device and storage medium to at least solve the problem in the related art that the change process has too many links, resulting in low deployment efficiency of the change service, and the service instance deployment strategy is not flexible enough. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a service instance deployment method is provided, including:

[0006] In response to a change request for a target service, determining an original deployment cluster to which the target service belongs;

[0007] Determine required resources according to the change request, and determine remaining resource information of the original deployment cluster;

[0008] Compare the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determine the target cluster from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in which the remaining resources of the candidate cluster meet the change request and meet the cluster operation and maintenance conditions;

[0009] Determining the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster; and

[0010] Based on the number of instances, a corresponding number of instances of the target service are deployed on the target cluster.

[0011] In some embodiments of the present disclosure, the candidate cluster includes at least one new cluster, and the new cluster refers to a cluster where the target service has not been deployed; comparing the required resources corresponding to the change request with the remaining resource information of the original deployed cluster, and determining the target cluster from the candidate clusters according to the comparison result, includes:

[0012] Determine the remaining amount of resources of the original deployment cluster according to the remaining resource information of the original deployment cluster;

[0013] Subtract the required resources from the remaining resources of the original deployment cluster to obtain a first difference;

[0014] Determining whether the first difference is less than or equal to a first threshold;

[0015] When the first difference is less than or equal to the first threshold, determining remaining resource information of each of the new clusters;

[0016] The target cluster is determined from the at least one new cluster according to the required resources and the remaining resource information of each of the new clusters.

[0017] In some embodiments of the present disclosure, determining the target cluster from the at least one new cluster according to the required resources and the remaining resource information of each of the new clusters includes:

[0018] Prioritizing each of the new clusters according to the size of the remaining resource information;

[0019] The target cluster is determined from the at least one new cluster based on the priority ranking of each of the new clusters and the required resources, wherein the sum of remaining resources of the target cluster meets the required resources.

[0020] In some embodiments of the present disclosure, the method further includes:

[0021] When the first difference is greater than the first threshold, the original deployment cluster is determined as the target cluster.

[0022] In some embodiments of the present disclosure, the candidate cluster includes the original deployment cluster and at least one new cluster, the new cluster refers to a cluster where the target service has not been deployed; the original deployment cluster includes at least one cluster; comparing the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determining the target cluster from the candidate clusters according to the comparison result, includes:

[0023] According to the remaining resource information of each of the clusters in the original deployment clusters, determining a first cluster whose remaining amount of resources is greater than a second threshold from the at least one cluster;

[0024] Determining the total remaining resources of the first cluster;

[0025] Calculating a second difference between the required resources and the sum of remaining resources of the first cluster;

[0026] Determine a second cluster from the at least one new cluster according to the second difference, wherein the sum of remaining resources of the second cluster satisfies the second difference;

[0027] The first cluster and the second cluster are determined as the target clusters.

[0028] In some embodiments of the present disclosure, the deploying a corresponding number of instances of the target service on the target cluster based on the number of instances includes:

[0029] Generate a deployment request for the change operation; wherein the deployment request includes identification information corresponding to the target cluster;

[0030] The instances of the target service are deployed according to the number of instances and the deployment request, so that the instances of the target service are deployed on the corresponding target cluster.

[0031] In some embodiments of the present disclosure, the deploying the instance of the target service according to the number of instances and the deployment request so that the instance of the target service is deployed on the corresponding target cluster includes:

[0032] According to the deployment request, the deployment service of the target cluster is called to create containers of the same number as the number of the instances, so that the instances of the target service are deployed in corresponding containers.

[0033] In some embodiments of the present disclosure, the change request is a service upgrade request; after deploying a corresponding number of instances of the target service on the target cluster based on the number of instances, the method further includes:

[0034] The original instance of the target service deployed on the original deployment cluster is destroyed; wherein the original instance refers to the instance of the target service deployed on the original deployment cluster before the target service is upgraded.

[0035] According to a second aspect of an embodiment of the present disclosure, a service instance deployment device is provided, including:

[0036] A first determining unit is configured to determine, in response to a change request for a target service, an original deployment cluster to which the target service belongs;

[0037] A second determining unit is configured to determine required resources according to the change request, and determine remaining resource information of the original deployment cluster;

[0038] A third determining unit is configured to compare the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determine a target cluster from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in which the remaining resources of the candidate cluster meet the change request and meet the cluster operation and maintenance conditions;

[0039] a fourth determining unit, configured to determine the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster; and

[0040] The deployment unit is configured to deploy a corresponding number of instances of the target service on the target cluster based on the number of instances.

[0041] In some embodiments of the present disclosure, the candidate cluster includes at least one new cluster, and the new cluster refers to a cluster where the target service has not been deployed; the third determining unit is specifically configured to:

[0042] Determine the remaining amount of resources of the original deployment cluster according to the remaining resource information of the original deployment cluster;

[0043] Subtract the required resources from the remaining resources of the original deployment cluster to obtain a first difference;

[0044] Determining whether the first difference is less than or equal to a first threshold;

[0045] When the first difference is less than or equal to the first threshold, determining remaining resource information of each of the new clusters;

[0046] The target cluster is determined from the at least one new cluster according to the required resources and the remaining resource information of each of the new clusters.

[0047] In some embodiments of the present disclosure, the third determining unit is specifically configured to:

[0048] Prioritizing each of the new clusters according to the size of the remaining resource information;

[0049] The target cluster is determined from the at least one new cluster based on the priority ranking of each of the new clusters and the required resources, wherein the sum of remaining resources of the target cluster meets the required resources.

[0050] In some embodiments of the present disclosure, the third determining unit is further configured to:

[0051] When the first difference is greater than the first threshold, the original deployment cluster is determined as the target cluster.

[0052] In some embodiments of the present disclosure, the candidate cluster includes the original deployment cluster and at least one new cluster, the new cluster refers to a cluster where the target service has not been deployed; the original deployment cluster includes at least one cluster; the third determination unit is specifically configured to:

[0053] According to the remaining resource information of each of the clusters in the original deployment clusters, determining a first cluster whose remaining amount of resources is greater than a second threshold from the at least one cluster;

[0054] Determining the total remaining resources of the first cluster;

[0055] Calculating a second difference between the required resources and the sum of remaining resources of the first cluster;

[0056] Determine a second cluster from the at least one new cluster according to the second difference, wherein the sum of remaining resources of the second cluster satisfies the second difference;

[0057] The first cluster and the second cluster are determined as the target clusters.

[0058] In some embodiments of the present disclosure, the deployment unit is specifically configured as follows:

[0059] Generate a deployment request for the change operation; wherein the deployment request includes identification information corresponding to the target cluster;

[0060] The instances of the target service are deployed according to the number of instances and the deployment request, so that the instances of the target service are deployed on the corresponding target cluster.

[0061] In some embodiments of the present disclosure, the deployment unit is specifically configured as follows:

[0062] According to the deployment request, the deployment service of the target cluster is called to create containers of the same number as the number of the instances, so that the instances of the target service are deployed in corresponding containers.

[0063] In some embodiments of the present disclosure, the change request is a service upgrade request; the device further includes:

[0064] The destroying unit is configured to destroy the original instance of the target service deployed on the original deployment cluster; wherein the original instance refers to the instance of the target service deployed on the original deployment cluster before the service upgrade of the target service.

[0065] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0066] processor;

[0067] a memory for storing instructions executable by the processor;

[0068] The processor is configured to execute the instructions to implement the service instance deployment method described in the first aspect embodiment.

[0069] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0070] processor;

[0071] a memory for storing instructions executable by the processor;

[0072] The processor is configured to execute the instructions to implement the service instance deployment method described in the first aspect embodiment.

[0073] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the service instance deployment method described in the embodiment of the first aspect above.

[0074] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. When instructions in the computer program product are executed by a processor, the service instance deployment method described in the embodiment of the first aspect is executed.

[0075] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0076] In response to a change request for a target service, determine the original deployment cluster to which the target service belongs; determine the required resources according to the change request, and determine the remaining resource information of the original deployment cluster, compare the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determine the target cluster from the candidate clusters according to the comparison result, wherein the target cluster is a cluster in the candidate cluster whose remaining resources satisfy the change request and meet the cluster operation and maintenance conditions; then, determine the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster, and deploy the corresponding number of instances of the target service on the target cluster based on the number of instances. It can be seen from this that the present disclosure can realize the unified management of the deployment of services in various clusters, so that users only need to care about changes in services, and do not need to care about how many clusters the service is scattered in. During the service change process, users do not need to communicate with other personnel, which reduces the human communication cost at the resource level, greatly improves the deployment efficiency of the changed service, and greatly improves the execution efficiency of the change request. In addition, since the multi-cluster deployment method of the present invention can reduce user costs while breaking up all instances of the service into multiple clusters, thereby averaging the remaining resources of each cluster, most clusters will have a certain degree of liquidity. While improving the flexibility of service instance deployment, it also drives up the speed of service upgrades and reduces the lag of upgrade behavior.

[0077] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0079] Figure 1 This is an example diagram of a service instance deployment method in the prior art.

[0080] Figure 2 The present invention is a flowchart of a service instance deployment method according to an exemplary embodiment.

[0081] Figure 3 The figure is a flowchart of a service instance deployment method according to another exemplary embodiment.

[0082] Figure 4 The figure is a flowchart of a service instance deployment method according to another exemplary embodiment.

[0083] Figure 5 The figure is an example diagram showing a service instance deployment method according to an exemplary embodiment.

[0084] Figure 6 The present invention is a block diagram of a service instance deployment device according to an exemplary embodiment.

[0085] Figure 7 The present invention is a block diagram of a service instance deployment device according to another exemplary embodiment.

[0086] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0087] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0088] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0089] Currently, containerized deployment has become the mainstream choice for enterprise service deployment. As the scale of enterprise business grows, the computing resources required for service deployment will increase, and will gradually exceed the upper limit of computing resources that a single container cluster can carry. Computing resources refer to physical server machines. Due to issues such as state synchronization and the timeliness of data interaction, the number of physical servers in a single cluster can generally be controlled at around 4,000. In related technologies, if you want to change a service that has been deployed in a previous cluster, you usually do so in a newly built cluster, such as Figure 1 As shown, as the above situation repeats itself, service managers may need to deploy the same service in multiple clusters to meet the computing needs of the service.

[0090] However, the current problem is that when a service needs to be expanded, the service manager needs to contact the cluster manager first to find out whether the current cluster has enough remaining resources to support the expansion. If not, the operation and maintenance personnel need to tell which other cluster can support it; in extreme cases, the number of instances that need to be expanded may need to be shared among many clusters to achieve it, making the labor cost of a capacity expansion operation higher. When a service needs to be deployed in multiple clusters, it will become more laborious to upgrade the service each time. The above problems will continue to worsen as the scale of the enterprise's business grows, and may eventually lead to more services being forced to be dispersed in multiple clusters. Second, because key businesses grow faster and have more and more frequent expansion requirements, they are more serious for key businesses that consume a lot of resources. In addition, when temporary expansion is required due to temporary activities, emergencies, etc., the time consumption caused by the above process will be unacceptable, which is likely to cause more serious problems or even service failures.

[0091] In order to solve the above technical problems, the present disclosure proposes a service instance deployment method, device, electronic device and storage medium. Specifically, Figure 2 1 is a flow chart of a service instance deployment method according to an exemplary embodiment. It should be noted that the service instance deployment method of the embodiment of the present disclosure is applied to the service instance deployment device of the embodiment of the present disclosure. As an example, the service instance deployment device of the embodiment of the present disclosure can be configured on an electronic device in the form of a deployment platform. Figure 2 As shown, the service instance deployment method may include the following steps.

[0092] In step S21 , in response to a change request for a target service, an original deployment cluster to which the target service belongs is determined.

[0093] For example, the service instance deployment device of the embodiment of the present disclosure can provide an interactive interface for the user, and the user can input a change request for the target service through the interactive interface. When it is monitored that the user has input a change request for the target server in the interactive interface, in response to the change request for the target service, the original deployment cluster to which the target service belongs can be determined first. Among them, the original deployment cluster to which the target service belongs can be understood as the cluster that the target service has been deployed before. For example, taking service A as an example, assuming that service A is deployed in multiple clusters, such as cluster 1, cluster 2 and cluster 3, that is, the same service A is deployed in cluster 1, cluster 2 and cluster 3, then cluster 1, cluster 2 and cluster 3 can be considered as the original deployment clusters of service A.

[0094] In step S22, required resources are determined according to the change request, and remaining resource information of the original deployment cluster is determined.

[0095] When a change request for a target service is received, the change request may be parsed to determine the resources required for the change to the target service. When the original deployment cluster to which the target service belongs is determined, the remaining resource information of the original deployment cluster may be determined. In the disclosed embodiment, the remaining resource information may include but is not limited to the remaining capacity of the CPU (Central Processing Unit), the remaining amount of memory, etc.

[0096] As an example, the number of the original deployment clusters may be one or more. The remaining resource information of the original deployment clusters refers to the total amount of remaining resources of at least one original deployment cluster. As another example, when the number of the original deployment clusters is at least one, the remaining resource information of the original deployment clusters refers to the remaining resource information of each original deployment cluster.

[0097] In step S23, the required resources corresponding to the change request are compared with the remaining resource information of the original deployment cluster, and a target cluster is determined from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in which the remaining resources in the candidate cluster meet the change request and meet the cluster operation and maintenance conditions.

[0098] Optionally, the service instance deployment device of the embodiment of the present disclosure receives a change request for the target service, summarizes the remaining resources of all clusters, and decides whether to use the original cluster or a new cluster for this change, thereby automatically allocating the service instances among the clusters, improving deployment efficiency and change success rate, and indirectly improving cluster liquidity.

[0099] In some embodiments of the present disclosure, the candidate cluster may include at least one new cluster, which refers to a cluster where the target service has not been deployed. In the embodiments of the present disclosure, based on the comparison result of the required resources corresponding to the change request and the remaining resource information of the original deployed cluster, a cluster whose remaining resources can meet the change request can be determined from the new cluster, and the cluster that can meet the change request also meets the cluster operation and maintenance conditions. At this time, the cluster whose remaining resources meet the change request and meet the cluster operation and maintenance conditions can be determined as the target cluster.

[0100] In other embodiments of the present disclosure, the candidate cluster may include the original deployment cluster and at least one new cluster. In the embodiments of the present disclosure, based on the comparison result of the required resources corresponding to the change request and the remaining resource information of the original deployment cluster, a part of the cluster may be first selected from the original deployment cluster as a part of the target cluster, and then a cluster may be selected from the new cluster as another part of the target cluster. That is, when performing a change operation on the target service, based on the comparison result of the required resources corresponding to the change request and the remaining resource information of the original deployment cluster, a part of the cluster may be selected from the original deployment cluster and the new cluster respectively as the target cluster.

[0101] In step S24, the number of instances of the target service to be deployed on the target cluster is determined according to the remaining resource information of the target cluster.

[0102] That is to say, the number of instances of the target service to be deployed on the target cluster can be determined based on the remaining resource information of the target cluster. For example, assuming that the number of instances of the current target service and the cluster distribution are: a total of 50, of which cluster A has deployed 10 instances of the target service, cluster B has deployed 25 instances of the target service, and cluster C has deployed 15 instances of the target service. The user submits a capacity expansion demand for the target service, with an expansion target of 80, that is, 30 more capacity expansions are required. The service instance deployment device of the disclosed embodiment receives the capacity expansion demand for the target service, summarizes the remaining resources of all clusters, and learns that the number of scalable instances that each cluster can support is: 5 for cluster A, 0 for cluster B, 10 for cluster C, and 100 for cluster D. Then, based on the current number of instances of the target service and its distribution in each cluster, based on the cluster liquidity priority strategy, it can be concluded that the operation strategy for this time is: add 30 new instances in cluster D. That is, it can be determined that cluster D is the target cluster, and the number of instances of the target service to be deployed on cluster D is determined to be 30.

[0103] In step S25, based on the number of instances, a corresponding number of instances of the target service are deployed on the target cluster.

[0104] In some embodiments of the present disclosure, a deployment request for the change operation may be generated, wherein the deployment request may include identification information corresponding to the target cluster; the instance of the target service is deployed according to the number of instances and the deployment request, so that the instance of the target service is deployed on the corresponding target cluster. As an example, the deployment service of the target cluster may be called according to the deployment request to create the same number of containers as the number of instances, so that the instance of the target service is deployed in the corresponding container. Thus, the service instance can be deployed to the cluster through the container, that is, the deployment of the service instance is realized.

[0105] According to the service instance deployment method of the embodiment of the present disclosure, in response to a change request for a target service, the original deployment cluster to which the target service belongs is determined; the required resources are determined according to the change request, and the remaining resource information of the original deployment cluster is determined, the required resources corresponding to the change request are compared with the remaining resource information of the original deployment cluster, and the target cluster is determined from the candidate clusters according to the comparison result, wherein the target cluster is a cluster in the candidate cluster whose remaining resources meet the change request and meet the cluster operation and maintenance conditions; then, according to the remaining resource information of the target cluster, the number of instances of the target service to be deployed on the target cluster is determined, and based on the number of instances, a corresponding number of instances of the target service are deployed on the target cluster. It can be seen that the present invention determines the target cluster from the candidate clusters based on the comparison result between the required resources corresponding to the change request sent by the user and the remaining resource information of the original deployment cluster, so as to deploy the instance of the target service to the target cluster. In this way, it is possible to achieve unified management of the deployment of services in various clusters, so that users only need to care about service changes without having to care about how many clusters the service is scattered in. During the service change process, users do not need to communicate with other personnel, which reduces the human communication cost at the resource level, greatly improves the deployment efficiency of the changed service, and greatly improves the execution efficiency of the change request.

[0106] Figure 3 is a flow chart of a service instance deployment method according to another exemplary embodiment. It should be noted that the candidate cluster may include at least one new cluster, and the new cluster refers to a cluster in which the target service has not been deployed. In the embodiment of the present disclosure, based on the comparison result of the required resources corresponding to the change request with the remaining resource information of the original deployed cluster, a cluster whose remaining resources can meet the change request can be determined from the new cluster, and the cluster that can meet the change request also meets the cluster operation and maintenance conditions. At this time, the cluster whose remaining resources meet the change request and meet the cluster operation and maintenance conditions can be determined as the target cluster. Specifically, if Figure 3 As shown, the service instance deployment method may include the following steps:

[0107] In step S31 , in response to a change request for a target service, an original deployment cluster to which the target service belongs is determined.

[0108] In step S32, required resources are determined according to the change request, and remaining resource information of the original deployment cluster is determined.

[0109] In step S33, the remaining amount of resources of the original deployment cluster is determined according to the remaining resource information of the original deployment cluster.

[0110] In step S34, the required resources are subtracted from the remaining resources of the original deployment cluster to obtain a first difference.

[0111] In step S35, it is determined whether the first difference is less than or equal to a first threshold.

[0112] In step S36, when the first difference is less than or equal to the first threshold, the remaining resource information of each new cluster is determined.

[0113] In step S37, a target cluster is determined from at least one new cluster according to the required resources and the remaining resource information of each new cluster.

[0114] In an embodiment of the present disclosure, after determining the remaining resource information of each new cluster, each new cluster can be prioritized according to the size of the remaining resource information, and based on the priority ranking of each new cluster and the required resources corresponding to the change request, a target cluster is determined from at least one new cluster, wherein the sum of the remaining resources of the target cluster meets the required resources.

[0115] For example, each new cluster can be prioritized in descending order of remaining resource information, for example, the larger the remaining resource information, the higher the priority of the new cluster; based on the order of the priorities of the new clusters from high to low, and the required resources corresponding to the change request, the target cluster is determined from at least one new cluster. For example, assuming that the remaining resource information of the new cluster A is 30%, the remaining resource information of the new cluster B is 25%, and the remaining resource information of the new cluster C is 10%, and the required resource amount corresponding to the change request is 30%, based on the order of the priorities of the new clusters from high to low, and the required resources, the target clusters can be determined from the new cluster A, the new cluster B and the new cluster C as the new cluster A and the new cluster B, that is, the new cluster A and the new cluster B can be determined as the target cluster. Therefore, by prioritizing each new cluster according to the size of the remaining resource information and determining the target cluster according to the priority ranking, it can be ensured that the target service instance is deployed on the cluster with more remaining resources, that is, the target service instance is preferentially deployed to the cluster with more remaining resources.

[0116] In step S38, when the first difference is greater than the first threshold, the original deployment cluster is determined as the target cluster.

[0117] That is, when the remaining resource information of the original deployment cluster is relatively large and can satisfy the required resources of the change request, the original deployment cluster can be determined as the target cluster, so that the instances of the target service are deployed as concentratedly as possible in the original cluster.

[0118] In step S39, the number of instances of the target service to be deployed on the target cluster is determined according to the remaining resource information of the target cluster.

[0119] In step S310 , based on the number of instances, a corresponding number of instances of the target service are deployed on the target cluster.

[0120] According to the service instance deployment method of the embodiment of the present disclosure, it can be determined whether the remaining resources of the original deployment cluster can meet the change request, such as calculating the difference between the remaining resources of the original deployment cluster and the required resources of the change request, and determining whether the difference is less than or equal to a threshold. If so, it means that the remaining resource information of the original deployment cluster cannot meet the change request, and it is necessary to determine a cluster whose remaining resources can meet the change request from a new cluster where the target service has not been deployed, and the cluster that can meet the change request also meets the cluster operation and maintenance conditions. At this time, the cluster whose remaining resources meet the change request and meet the cluster operation and maintenance conditions can be determined as the target cluster, and then the change to the target service is implemented on the target cluster. Therefore, by summarizing the remaining resources of all clusters, it is used to decide whether to use the original deployment cluster or the new cluster for this change, thereby automatically realizing the distribution of service instances among various clusters, improving deployment efficiency and change success rate, and indirectly improving cluster liquidity; and, based on the change request and the remaining resource information of the original deployment cluster, the target cluster is determined from the cluster (such as the new cluster) where the target service has never been deployed, so that the target service instance can be deployed to the corresponding undeployed cluster, thereby realizing the distribution of service instances among various clusters, and avoiding excessive occupation of the resource information of the original deployment cluster, which causes the remaining resources of the original deployment cluster to exceed the computing resource limit that the cluster can bear.

[0121] Figure 4 is a flowchart of a service instance deployment method according to another exemplary embodiment. It should be noted that the candidate cluster may include the original deployment cluster and at least one new cluster, and the original deployment cluster includes at least one cluster. In the embodiment of the present disclosure, based on the comparison result of the required resources corresponding to the change request and the remaining resource information of the original deployment cluster, a part of the cluster can be first selected from the original deployment cluster as part of the target cluster, and then a cluster can be selected from the new cluster as another part of the target cluster. Specifically, Figure 4 As shown, the service instance deployment method may include the following steps:

[0122] In step S41 , in response to a change request for a target service, an original deployment cluster to which the target service belongs is determined.

[0123] In step S42, required resources are determined according to the change request, and remaining resource information of the original deployment cluster is determined.

[0124] In step S43, according to the remaining resource information of each cluster in the original deployment cluster, a first cluster having a remaining resource amount greater than a second threshold is determined from at least one cluster.

[0125] The original deployment cluster may include at least one cluster. In the embodiment of the present disclosure, a first cluster whose remaining amount of resources is greater than a second threshold value may be determined from the at least one cluster according to the remaining resource information of each cluster in the original deployment cluster. That is, a cluster whose remaining amount of resources is greater than the second threshold value may be first determined from the original deployment cluster, and the cluster whose remaining amount of resources is greater than the second threshold value may be used as the first cluster in the original deployment cluster.

[0126] In step S44, the total remaining resources of the first cluster are determined.

[0127] In step S45, a second difference between the required resources and the sum of the remaining resources of the first cluster is calculated.

[0128] In step S46, a second cluster is determined from the at least one new cluster according to the second difference, wherein the sum of remaining resources of the second cluster satisfies the second difference.

[0129] That is, the second cluster may be determined from the new clusters according to the difference between the required resources corresponding to the change request and the sum of the remaining resources of the first cluster.

[0130] In step S47 , the first cluster and the second cluster are determined as target clusters.

[0131] That is, when a change operation is performed on a target service, a portion of clusters may be selected from the original deployment cluster and the new cluster as target clusters according to the change request and the remaining resource information of the original deployment cluster.

[0132] In step S48, the number of instances of the target service to be deployed on the target cluster is determined according to the remaining resource information of the target cluster.

[0133] In step S49, based on the number of instances, a corresponding number of instances of the target service are deployed on the target cluster.

[0134] According to the service instance deployment method of the embodiment of the present disclosure, when performing a change operation on the target service, a part of the cluster can be selected from the original deployment cluster and the new cluster respectively as the target cluster according to the comparison result of the required resources corresponding to the change request and the remaining resource information of the original deployment cluster, and then the change of the target service is implemented on the target cluster, which can realize the distribution of service instances in various clusters, improve deployment efficiency and change success rate, and indirectly improve cluster liquidity; in addition, by selecting a part of the cluster from the original deployment cluster and the new cluster as the target cluster respectively, it is possible to deploy the target service instances on the same cluster as much as possible, and can also make full use of the remaining resources of the cluster.

[0135] It should be noted that in some embodiments of the present disclosure, the change request may include but is not limited to a capacity expansion request or an upgrade request. The following takes the most common capacity expansion and upgrade operations in the change type as examples to describe the specific implementation steps of the present disclosure:

[0136] Taking the expansion scenario as an example (in which the expansion scenario is not accompanied by the instance destruction operation), the overall process of the function is as follows:

[0137] 1.1) Assume that the number of instances and cluster distribution of the current target service is: 50 in total, including 10 in cluster A, 25 in cluster B, and 15 in cluster C;

[0138] 1.2) The user (such as a service manager) submits a request for capacity expansion of the target service. The target is 80, which means that 30 more capacity expansions are needed.

[0139] 1.3) The deployment platform receives the demand for capacity expansion of the service and calls the resource module to find out that the number of scalable instances that each cluster can support is: 5 for cluster A, 0 for cluster B, 10 for cluster C, and 100 for cluster D. The resource module can summarize the remaining resources of all clusters to decide on the specific behavior of the change;

[0140] 1.4) The deployment platform queries the current number of instances of the service and their distribution in each cluster (as described in step 1.1). Based on the cluster liquidity priority strategy (the default strategy, i.e., selecting a cluster with sufficient remaining resources as much as possible for operation), the operation strategy for this operation is: add 30 instances in cluster D;

[0141] 1.5) Operate the container cluster and start 30 instances of the service in cluster D. Finally, the total number of instances of the service is 80. This achieves the expansion of the target service.

[0142] Taking the upgrade scenario as an example, the overall process of the function is as follows:

[0143] 2.1) Assume that the number of instances and cluster distribution of the target service is: 50 in total, including 20 in cluster A and 30 in cluster B;

[0144] 2.2) The deployment platform receives the upgrade request for the service, calls the resource module, and learns that the number of scalable instances in each cluster is: 5 for cluster A, 50 for cluster B, 0 for cluster C, and 100 for cluster D. Since the service version upgrade operation does not consume additional resources, in theory, clusters with existing instances can be upgraded regardless of the number of scalable instances. However, from the perspective of cluster operation and maintenance and deployment success rate, decisions still need to be made based on the following conditions;

[0145] 2.3) Cluster A meets the cluster operation and maintenance conditions (the cluster has not been marked as "prepared to go offline" by the cluster administrator), but because its cluster has a small number of scalable instances and low liquidity, the instances of this cluster are prepared to be destroyed and other clusters will make up for these instances (the reason for emphasizing "preparation" here is that if other clusters cannot bear the number of instances of this cluster, the deployment of cluster A still needs to be upgraded instead of being destroyed);

[0146] 2.4) Although cluster B has a large number of scalable instances, it is marked as "preparing to go offline" by the administrator, so the instances of this cluster are also prepared to be destroyed and the corresponding number of instances will be taken over by other clusters;

[0147] 2.5) The number of scalable instances in cluster C is 0 and is not considered;

[0148] 2.6) Cluster D has enough scalable instances and meets the operation and maintenance conditions, so 50 instances are started in the cluster;

[0149] 2.7) Deploy the container cluster on the platform side, and finally the instances of the service are distributed as follows: 50 in cluster D. This enables the upgrade of the target service.

[0150] It should be noted that in some embodiments of the present disclosure, for upgrade scenarios, after deploying a corresponding number of instances of the target service on the target cluster based on the number of instances, the original instance of the target service deployed on the original deployment cluster may be destroyed, wherein the original instance refers to the instance of the target service deployed on the original deployment cluster before the target service is upgraded. Figure 5 As shown in the figure, in the upgrade scenario, the liquidity of cluster A is released, and all instances of the target service are withdrawn from cluster B. If cluster B is forced to go offline later, the services and users affected will be reduced.

[0151] It is worth noting that the present disclosure separates the concepts of service and deployment, and the deployment platform manages all deployments of the same service, hiding the concept of deployment from users, so that users do not need to know which clusters their deployments exist in, thereby reducing the learning cost of the deployment function. In addition, the present disclosure combines the resource module (which can summarize the remaining resources of all clusters to determine the specific behavior of the change) to decide whether to use the original cluster or the new cluster (the new cluster here refers to the cluster that the service has not been deployed before), thereby automatically realizing the allocation of service instances in various clusters, improving deployment efficiency and expansion success rate, and indirectly improving cluster liquidity. In addition, since the cluster selection right for service deployment is controlled by the deployment platform, the platform side realizes the transfer of instances between clusters according to the operation and maintenance conditions of the cluster. For example, when a cluster needs to be offline because the component version is too low or the physical machine server in it is too old, the platform side can start the new instance in the new cluster when the user changes, thereby releasing the original cluster resources. In addition, since the multi-cluster deployment method of the present invention can reduce user costs while spreading all instances of the service to multiple clusters, thereby averaging the remaining resources of each cluster, most clusters will have a certain degree of liquidity, which will increase the upgrade speed and reduce the lag of the upgrade behavior.

[0152] Figure 6 FIG. 1 is a block diagram of a service instance deployment device according to an exemplary embodiment. Figure 6 The device 600 includes: a first determining unit 601, a second determining unit 602, a third determining unit 603, a fourth determining unit 604 and a deployment unit 605.

[0153] Specifically, the first determining unit 601 is configured to determine, in response to a change request for a target service, an original deployment cluster to which the target service belongs.

[0154] The second determining unit 602 is configured to determine required resources according to the change request, and determine remaining resource information of the original deployment cluster.

[0155] The third determination unit 603 is configured to compare the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determine the target cluster from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in which the remaining resources in the candidate cluster meet the change request and meet the cluster operation and maintenance conditions.

[0156] The fourth determining unit 604 is configured to determine the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster.

[0157] The deployment unit 605 is configured to deploy a corresponding number of instances of the target service on the target cluster based on the number of instances. In some embodiments of the present disclosure, the deployment unit 605 generates a deployment request for the change operation; wherein the deployment request includes identification information corresponding to the target cluster; and the instances of the target service are deployed according to the number of instances and the deployment request, so that the instances of the target service are deployed on the corresponding target cluster.

[0158] As an example, the deployment unit 605 calls the deployment service of the target cluster to create containers of the same number as the number of instances according to the deployment request, so that the instances of the target service are deployed in the corresponding containers.

[0159] In some embodiments of the present disclosure, the candidate cluster includes at least one new cluster, and the new cluster refers to a cluster where the target service has not been deployed. In the embodiments of the present disclosure, the third determination unit 603 determines the remaining amount of resources of the original deployment cluster according to the remaining resource information of the original deployment cluster; subtracts the required resources from the remaining amount of resources of the original deployment cluster to obtain a first difference; determines whether the first difference is less than or equal to the first threshold; when the first difference is less than or equal to the first threshold, determines the remaining resource information of each new cluster, and determines the target cluster from at least one new cluster according to the required resources and the remaining resource information of each new cluster.

[0160] In the embodiment of the present disclosure, the specific implementation process of the third determination unit 603 determining the target cluster from at least one new cluster based on the required resources and the remaining resource information of each new cluster can be as follows: prioritizing each new cluster according to the size of the remaining resource information; based on the priority ranking and required resources of each new cluster, determining the target cluster from at least one new cluster, wherein the sum of the remaining resources of the target cluster meets the required resources.

[0161] In the embodiment of the present disclosure, the third determining unit 603 is further configured to: when the first difference is greater than a first threshold, determine the original deployment cluster as the target cluster.

[0162] In some embodiments of the present disclosure, the candidate cluster includes the original deployment cluster and at least one new cluster, the new cluster refers to the cluster where the target service has not been deployed; the original deployment cluster includes at least one cluster. Among them, in the embodiments of the present disclosure, the third determination unit 603 compares the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and the specific implementation process of determining the target cluster from the candidate cluster according to the comparison result can be as follows: according to the remaining resource information of each cluster in the original deployment cluster, determine the first cluster whose remaining amount of resources is greater than the second threshold from at least one cluster; determine the sum of the remaining resources of the first cluster; calculate the second difference between the required resources and the sum of the remaining resources of the first cluster; determine the second cluster from at least one new cluster according to the second difference, wherein the sum of the remaining resources of the second cluster satisfies the second difference; determine the first cluster and the second cluster as the target cluster.

[0163] It should be noted that, in some embodiments of the present disclosure, the change request may be a service upgrade request. Figure 7 As shown, the service instance deployment device 600 may further include: a destroying unit 606. The destroying unit 606 is configured to destroy the original instance of the target service deployed on the original deployment cluster; wherein the original instance refers to the instance of the target service deployed on the original deployment cluster before the target service is upgraded.

[0164] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0165] According to the service instance deployment device of the embodiment of the present disclosure, in response to the change request for the target service, the original deployment cluster to which the target service belongs is determined; the required resources are determined according to the change request, and the remaining resource information of the original deployment cluster is determined, the required resources corresponding to the change request are compared with the remaining resource information of the original deployment cluster, and the target cluster is determined from the candidate cluster according to the comparison result, wherein the target cluster is a cluster in the candidate cluster whose remaining resources meet the change request and meet the cluster operation and maintenance conditions; then, according to the remaining resource information of the target cluster, the number of instances of the target service to be deployed on the target cluster is determined, and based on the number of instances, the corresponding number of instances of the target service are deployed on the target cluster. It can be seen from this that the present disclosure can realize the unified management of the deployment of services in various clusters, so that users only need to care about the changes of the service, and do not need to care about how many clusters the service is scattered in. During the service change process, users do not need to communicate with other personnel, which reduces the human communication cost at the resource level, greatly improves the deployment efficiency of the changed service, and greatly improves the execution efficiency of the change request. In addition, since the multi-cluster deployment method of the present invention can reduce user costs while breaking up all instances of the service into multiple clusters, thereby averaging the remaining resources of each cluster, most clusters will have a certain degree of liquidity. While improving the flexibility of service instance deployment, it also drives up the speed of service upgrades and reduces the lag of upgrade behavior.

[0166] Figure 8 FIG. 2 is a block diagram of an electronic device 200 according to an exemplary embodiment. Figure 8 As shown, the electronic device 200 may include:

[0167] The memory 210 and the processor 220, the bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores instructions executable by the processor 220; wherein the processor 220 is configured to execute the instructions to implement the service instance deployment method described in the embodiment of the present disclosure.

[0168] Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0169] The electronic device 200 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 200, including volatile and non-volatile media, removable and non-removable media. The memory 210 can also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The electronic device 200 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 260 can be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 230 via one or more data medium interfaces. The memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0170] A program / utility 280 having a set (at least one) of program modules 270 may be stored, for example, in the memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 270 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0171] The electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 200, and / or communicate with any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 292. Furthermore, the electronic device 200 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via a network adapter 293. As shown, the network adapter 293 communicates with other modules of the electronic device 200 via a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0172] The processor 220 executes various functional applications and data processing by running the programs stored in the memory 210 .

[0173] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the service instance deployment method described in the embodiment of the present disclosure, and will not be repeated here.

[0174] In order to implement the above embodiments, the present disclosure also proposes a storage medium.

[0175] When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the service instance deployment method as described above.

[0176] In order to implement the above embodiments, the present disclosure further provides a computer program product. When instructions in the computer program product are executed by a processor, the electronic device can execute the service instance deployment method as described above.

[0177] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0178] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A service instance deployment method, characterized in that: include: In response to a change request for a target service, determining an original deployment cluster to which the target service belongs; Determine required resources according to the change request, and determine remaining resource information of the original deployment cluster; Compare the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determine the target cluster from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in which the remaining resources of the candidate cluster meet the change request and meet the cluster operation and maintenance conditions; Determining the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster; and Based on the number of instances, deploying a corresponding number of instances of the target service on the target cluster; Wherein, the candidate cluster includes at least one new cluster, and the new cluster refers to a cluster where the target service has not been deployed; the required resources corresponding to the change request are compared with the remaining resource information of the original deployment cluster, and the target cluster is determined from the candidate cluster according to the comparison result, including: determining the remaining resources of the original deployment cluster according to the remaining resource information of the original deployment cluster; subtracting the required resources from the remaining resources of the original deployment cluster to obtain a first difference; judging whether the first difference is less than or equal to a first threshold; when the first difference is less than or equal to the first threshold, determining the remaining resource information of each of the new clusters; determining the target cluster from the at least one new cluster according to the required resources and the remaining resource information of each of the new clusters; Alternatively, the candidate cluster includes the original deployment cluster and at least one new cluster, the new cluster refers to a cluster where the target service has not been deployed, and the original deployment cluster includes at least one cluster, wherein the required resources corresponding to the change request are compared with the remaining resource information of the original deployment cluster, and the target cluster is determined from the candidate cluster according to the comparison result, including: determining a first cluster whose remaining resources are greater than a second threshold from the at least one cluster according to the remaining resource information of each of the clusters in the original deployment cluster; determining the sum of the remaining resources of the first cluster; calculating a second difference between the required resources and the sum of the remaining resources of the first cluster; determining a second cluster from the at least one new cluster according to the second difference, wherein the sum of the remaining resources of the second cluster satisfies the second difference; and determining the first cluster and the second cluster as the target clusters.

2. The service instance deployment method according to claim 1, characterized in that: The step of determining the target cluster from the at least one new cluster according to the required resources and the remaining resource information of each of the new clusters includes: Prioritizing each of the new clusters according to the size of the remaining resource information; The target cluster is determined from the at least one new cluster based on the priority ranking of each of the new clusters and the required resources, wherein the sum of remaining resources of the target cluster meets the required resources.

3. The service instance deployment method according to claim 1, characterized in that: Also includes: When the first difference is greater than the first threshold, the original deployment cluster is determined as the target cluster.

4. The service instance deployment method according to claim 1, characterized in that: The deploying a corresponding number of instances of the target service on the target cluster based on the number of instances includes: Generate a deployment request for the change operation; wherein the deployment request includes identification information corresponding to the target cluster; The instances of the target service are deployed according to the number of instances and the deployment request, so that the instances of the target service are deployed on the corresponding target cluster.

5. The service instance deployment method according to claim 4, characterized in that: The deploying the instance of the target service according to the number of instances and the deployment request so that the instance of the target service is deployed on the corresponding target cluster includes: According to the deployment request, the deployment service of the target cluster is called to create containers of the same number as the number of the instances, so that the instances of the target service are deployed in corresponding containers.

6. The service instance deployment method according to any one of claims 1 to 5, characterized in that: The change request is a service upgrade request; After deploying a corresponding number of instances of the target service on the target cluster based on the number of instances, the method further includes: The original instance of the target service deployed on the original deployment cluster is destroyed; wherein the original instance refers to the instance of the target service deployed on the original deployment cluster before the target service is upgraded.

7. A service instance deployment device, characterized in that: include: A first determining unit is configured to determine, in response to a change request for a target service, an original deployment cluster to which the target service belongs; A second determining unit is configured to determine required resources according to the change request and determine remaining resource information of the original deployment cluster; A third determining unit is configured to compare the required resources corresponding to the change request with the remaining resource information of the original deployment cluster, and determine a target cluster from the candidate clusters according to the comparison result; wherein the target cluster is a cluster in which the remaining resources of the candidate cluster meet the change request and meet the cluster operation and maintenance conditions; a fourth determining unit, configured to determine the number of instances of the target service to be deployed on the target cluster according to the remaining resource information of the target cluster; A deployment unit, configured to deploy a corresponding number of instances of the target service on the target cluster based on the number of instances; Wherein, the candidate cluster includes at least one new cluster, and the new cluster refers to a cluster where the target service has not been deployed, and the third determination unit is specifically configured to: determine the remaining resources of the original deployment cluster according to the remaining resource information of the original deployment cluster; subtract the required resources from the remaining resources of the original deployment cluster to obtain a first difference; determine whether the first difference is less than or equal to a first threshold; when the first difference is less than or equal to the first threshold, determine the remaining resource information of each of the new clusters; determine the target cluster from the at least one new cluster according to the required resources and the remaining resource information of each of the new clusters; Alternatively, the candidate cluster includes the original deployment cluster and at least one new cluster, the new cluster refers to a cluster in which the target service has not been deployed, and the original deployment cluster includes at least one cluster, wherein the third determination unit is specifically configured to: determine, from the at least one cluster, a first cluster whose remaining resources are greater than a second threshold based on the remaining resource information of each of the clusters in the original deployment cluster; determine the sum of the remaining resources of the first cluster; calculate a second difference between the required resources and the sum of the remaining resources of the first cluster; determine a second cluster from the at least one new cluster based on the second difference, wherein the sum of the remaining resources of the second cluster satisfies the second difference; and determine the first cluster and the second cluster as the target clusters.

8. The service instance deployment device according to claim 7, characterized in that: The third determining unit is specifically configured to: Prioritizing each of the new clusters according to the size of the remaining resource information; The target cluster is determined from the at least one new cluster based on the priority ranking of each of the new clusters and the required resources, wherein the sum of remaining resources of the target cluster meets the required resources.

9. The service instance deployment device according to claim 7, characterized in that: The third determining unit is further configured to: When the first difference is greater than the first threshold, the original deployment cluster is determined as the target cluster.

10. The service instance deployment device according to claim 7, characterized in that: The deployment unit is specifically configured as follows: Generate a deployment request for the change operation; wherein the deployment request includes identification information corresponding to the target cluster; The instances of the target service are deployed according to the number of instances and the deployment request, so that the instances of the target service are deployed on the corresponding target cluster.

11. The service instance deployment device according to claim 10, characterized in that: The deployment unit is specifically configured as follows: According to the deployment request, the deployment service of the target cluster is called to create containers of the same number as the number of the instances, so that the instances of the target service are deployed in corresponding containers.

12. The service instance deployment device according to any one of claims 7 to 11, characterized in that: The change request is a service upgrade request; the device further includes: The destroying unit is configured to destroy the original instance of the target service deployed on the original deployment cluster; wherein the original instance refers to the instance of the target service deployed on the original deployment cluster before the service upgrade of the target service.

13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the service instance deployment method as described in any one of claims 1 to 6.

14. A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the service instance deployment method as described in any one of claims 1 to 6.

15. A computer program product, when instructions in the computer program product are executed by a processor, performs the service instance deployment method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Overall cooperative scheduling type DNS service deployment method and system

    CN107046584A

  • Method, device and system for expanding application cluster

    CN108076082A

  • Container resource allocation method and device, computer equipment and storage medium

    CN110597623A

  • Virtual machine deployment method and device

    CN111045790A

  • Multi-cluster management method and system, server and storage medium

    CN111405055A