Application migration method and device, equipment and storage medium

By obtaining and creating cluster configuration information, gradually migrating traffic and detecting status, the problems of low cluster migration efficiency and service stability are solved, and an efficient application migration process is achieved.

CN119172226APending Publication Date: 2024-12-20CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310739136.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the case of application upgrades or abnormalities deployed in a cluster environment, the existing technology relies on manual migration, resulting in low migration efficiency and difficulty in ensuring service stability and traffic switching.

Method used

By obtaining the configuration information of the target application in the first cluster, creating and starting the configuration information of the second cluster, and gradually migrating traffic to the second cluster, detecting the cluster status to determine whether it is running normally, and if it is abnormal, rolling back the traffic to ensure stable service sex and migration efficiency.

Benefits of technology

It realizes lossless traffic during application migration, ensures service stability, improves migration efficiency, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172226A_ABST
    Figure CN119172226A_ABST
Patent Text Reader

Abstract

The invention provides an application migration method and device, equipment and a storage medium. The method comprises the steps of obtaining first configuration information of a target application in a first cluster, creating second configuration information of the target application in a second cluster according to the first configuration information, then starting the second cluster based on the second configuration information, and migrating a preset proportion of traffic of the target application from the first cluster to the second cluster after starting. According to the method and the device, the first state of the target application in the second cluster is determined, if the first state is a normal state, the residual flow of the target application is migrated from the first cluster to the second cluster, and flow mixing is realized in the migration process, so that the flow is lossless in the application migration process, the service stability is ensured, and the migration efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an application migration method, device, equipment and storage medium. Background Art

[0002] For applications deployed in a cluster environment, such as distributed applications in a large Kubernetes container cluster, if the cluster needs to be upgraded (for example, the operating system or interface service version that the applications in the cluster rely on is upgraded) or the cluster has an abnormality, the applications in the cluster need to be migrated to other clusters.

[0003] Currently, the upgrade of applications in a cluster is usually performed manually by operation and maintenance personnel. For example, the corresponding configuration of the migrated application is manually created in the new cluster, which makes it difficult to ensure stable service startup and traffic switching during the entire application migration process, resulting in low efficiency of application migration. Summary of the invention

[0004] The present application provides an application migration method, device, equipment and storage medium, which are used to solve the problem of low migration efficiency caused by manual application migration in related technologies.

[0005] In a first aspect, the present application provides an application migration method, comprising:

[0006] Obtaining first configuration information of a target application in a first cluster;

[0007] Creating second configuration information of the target application in a second cluster according to the first configuration information;

[0008] Based on the second configuration information, start the second cluster;

[0009] Migrating a preset proportion of traffic of the target application from the first cluster to the second cluster;

[0010] Determine a first state of a target application in the second cluster, where the first state is a normal state or an abnormal state;

[0011] If the first state is a normal state, the remaining traffic of the target application except the preset proportion of traffic is migrated from the first cluster to the second cluster.

[0012] In a possible implementation, the first configuration information includes port information, storage space information, and a configuration file of the target application;

[0013] The step of creating second configuration information of the target application in the second cluster according to the first configuration information includes:

[0014] Determining an information configuration specification of the second cluster;

[0015] The second configuration information is created in the second cluster according to the port information, the storage space information, and the configuration file and in accordance with the information configuration specification.

[0016] In a possible implementation manner, determining the first state of the target application in the second cluster includes:

[0017] Within a preset time period after the second cluster is successfully started, multiple service requests corresponding to the target application in the second cluster are tracked through link tracking to determine whether the service requests are executed;

[0018] If it is determined that the multiple service requests are executed, determining that the first state is a normal state;

[0019] If it is determined that at least one service request among the plurality of service requests has not been executed, the first state is determined to be an abnormal state.

[0020] In a possible implementation manner, determining the first state of the target application in the second cluster includes:

[0021] Within a preset time after the second cluster is successfully started, detecting the log of the target application in the second cluster;

[0022] If no log alarm is detected, determining that the first state is a normal state;

[0023] If the log alarm is detected, it is determined that the first state is an abnormal state.

[0024] In a possible implementation, the method further includes:

[0025] If the first state of the target application in the second cluster is an abnormal state, a rollback operation is performed on the target application, and a preset proportion of traffic of the target application is migrated to the first cluster.

[0026] In a possible implementation, migrating a preset proportion of traffic of the target application from the first cluster to the second cluster includes:

[0027] Performing health monitoring on the second cluster to obtain a second state of the second cluster, where the second state is a healthy state or an unhealthy state;

[0028] If the second state is a healthy state, a preset proportion of traffic of the target application is migrated from the first cluster to the second cluster.

[0029] In a possible implementation manner, the obtaining first configuration information of the target application in the first cluster includes:

[0030] Obtaining an application migration request, the application migration request including an identifier of a target application, an identifier of the first cluster, and an identifier of the second cluster to which the target application is to be migrated;

[0031] According to the application migration request, the first configuration information is obtained from the first cluster.

[0032] In a second aspect, the present application provides an application migration device, comprising:

[0033] An acquisition module, used to acquire first configuration information of a target application in a first cluster;

[0034] A creation module, used to create second configuration information of the target application in a second cluster according to the first configuration information;

[0035] A startup module, used for starting the second cluster based on the second configuration information;

[0036] A first traffic migration module, configured to migrate a preset proportion of traffic of the target application from the first cluster to the second cluster;

[0037] A determination module, configured to determine a first state of a target application in the second cluster, wherein the first state is a normal state or an abnormal state;

[0038] The second traffic migration module is configured to migrate the remaining traffic of the target application except the preset proportion of traffic from the first cluster to the second cluster if the first state is a normal state.

[0039] In a possible implementation, the first configuration information includes port information, storage space information, and a configuration file of the target application;

[0040] The creation module is specifically used for:

[0041] Determining an information configuration specification of the second cluster;

[0042] The second configuration information is created in the second cluster according to the port information, the storage space information, and the configuration file and in accordance with the information configuration specification.

[0043] In a possible implementation manner, the determining module is specifically configured to:

[0044] Within a preset time period after the second cluster is successfully started, multiple service requests corresponding to the target application in the second cluster are tracked through link tracking to determine whether the service requests are executed;

[0045] If it is determined that the multiple service requests are executed, determining that the first state is a normal state;

[0046] If it is determined that at least one service request among the plurality of service requests has not been executed, the first state is determined to be an abnormal state.

[0047] In a possible implementation manner, the determining module is specifically configured to:

[0048] Within a preset time after the second cluster is successfully started, detecting the log of the target application in the second cluster;

[0049] If no log alarm is detected, determining that the first state is a normal state;

[0050] If the log alarm is detected, it is determined that the first state is an abnormal state.

[0051] In a possible implementation manner, the device further includes a processing module.

[0052] The processing module is specifically used for:

[0053] If the first state of the target application in the second cluster is an abnormal state, a rollback operation is performed on the target application, and a preset proportion of traffic of the target application is migrated to the first cluster.

[0054] In a possible implementation manner, the first traffic migration module is specifically configured to:

[0055] Performing health monitoring on the second cluster to obtain a second state of the second cluster, where the second state is a healthy state or an unhealthy state;

[0056] If the second state is a healthy state, a preset proportion of traffic of the target application is migrated from the first cluster to the second cluster.

[0057] In a possible implementation, the acquisition module is specifically used to:

[0058] Obtaining an application migration request, the application migration request including an identifier of a target application, an identifier of the first cluster, and an identifier of the second cluster to which the target application is to be migrated;

[0059] According to the application migration request, the first configuration information is obtained from the first cluster.

[0060] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0061] The memory stores computer-executable instructions;

[0062] The processor executes the computer-executable instructions stored in the memory to implement the application migration method as described in the first aspect.

[0063] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer, they are used to implement the application migration method as described in the first aspect.

[0064] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a computer, is used to implement the application migration method described in the first aspect.

[0065] The present application provides an application migration method, apparatus, device and storage medium, which obtains first configuration information of a target application in a first cluster, creates second configuration information of the target application in a second cluster based on the first configuration information, and then starts the second cluster based on the second configuration information. After startup, a preset proportion of traffic of the target application is migrated from the first cluster to the second cluster, and the first state of the target application in the second cluster is determined. If the first state is a normal state, the remaining traffic of the target application is migrated from the first cluster to the second cluster, and traffic mixing is achieved during the migration process, so that the traffic is lossless during the application migration process, and the stability of the service is ensured, thereby improving the migration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0067] Figure 1 A schematic diagram of an application scenario applicable to the present application;

[0068] Figure 2 A flowchart of an application migration method provided in an embodiment of the present application;

[0069] Figure 3 A flowchart of another application migration method provided in an embodiment of the present application;

[0070] Figure 4 A schematic diagram of the structure of an application migration device provided in an embodiment of the present application;

[0071] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0072] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0073] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0074] Kubernetes (k8s for short) is a container orchestration engine that supports automated deployment, large-scale scalability, and application container management. It has become a standard in the field of container orchestration. It has the advantages of managing large container clusters and providing high reliability services.

[0075] For distributed applications in a large k8s container cluster, there are two situations where application migration is required:

[0076] Case 1: Cluster version upgrade: Cluster version upgrade (for example, the operating system or interface service version upgrade that the applications in the cluster rely on) cannot guarantee the compatibility between multiple versions. If the application configuration of the old cluster is used with the new cluster, the service may not be created. For example, some parameters of the new version of the cluster have been abandoned.

[0077] Case 2: Deploy the application in multiple clusters. When a cluster has a problem, you can migrate the application from that cluster to another cluster.

[0078] Currently, there is no solution that can smoothly migrate applications between multiple clusters. Most of the time, operations and maintenance personnel manually upgrade the applications in the cluster, such as manually creating the configuration corresponding to the migrated application in the new cluster, which makes it difficult to ensure stable service startup and traffic switching during the entire application migration process, resulting in low efficiency of application migration. Currently.

[0079] Therefore, the present application provides an application migration method. In order to maintain the consistency between the old and new clusters, the configuration information of the target application is created in the new cluster (i.e., the second cluster) according to the configuration information of the target application in the old cluster (i.e., the first cluster). Then, in order to ensure the stability of the service, a part of the traffic can be migrated to the new cluster, and the traffic of the new cluster and the old cluster can be mixed. After the new cluster is normal, the remaining traffic can be migrated from the old cluster to the new cluster, thereby achieving lossless traffic during the migration process and improving the efficiency of application migration.

[0080] For ease of understanding, the following Figure 1 The examples are used to illustrate the application scenarios to which the embodiments of the present application are applicable.

[0081] Figure 1 For a schematic diagram of an application scenario applicable to this application, please see Figure 1 , including: a first cluster 101, a second cluster 102, and a migration server 103. The first cluster 101 includes multiple servers, each server serves as a node in the first cluster 101. The second cluster 102 includes multiple servers, each server serves as a node in the second cluster 102.

[0082] The nodes of the first cluster 101, the nodes of the second cluster 102, and the migration server 103 can communicate and collaborate with each other through the network. It can be understood that the client of the application also accesses the nodes in the cluster through the network.

[0083] When there is a need for application migration, the target application in the first cluster 101 needs to be migrated to the second cluster. The migration server 103 can create the configuration information of the target application in the second cluster 102 according to the configuration information of the target application in the first cluster 102, so that the target application remains consistent between the two clusters to determine the stability of the services provided by the target application.

[0084] Then, the migration server 103 can migrate part of the traffic of the client accessing the target application in the first cluster 101 to the target application in the second cluster 102 by load balancing, so that the traffic is intact during the migration process. After the target application in the second cluster 102 is normal, the remaining traffic is migrated to the second cluster, so as to realize the migration of the target application between the first cluster 101 and the second cluster 102.

[0085] Exemplarily, the target application may include multiple microservices, each of which is responsible for one function. Taking the first cluster 101 as an example, the target application is deployed in the first cluster 101, and the multiple microservices may be deployed on multiple nodes in the first cluster 101 for separate deployment and operation. During application migration, the multiple microservices of the target application may also be deployed on multiple nodes in the second cluster 102.

[0086] It can be understood that the number of nodes in the first cluster 101 and the second cluster 102 can be multiple, which is not shown in the figure.

[0087] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments may exist independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0088] Figure 2 A flow chart of an application migration method provided in an embodiment of the present application, the method can be executed by a migration server, or by an application migration device set in the migration server, the device can be a chip, a chip module, or an integrated development environment (IDE), etc., refer to Figure 2 , the method comprises the following steps:

[0089] S201. Obtain first configuration information of a target application in a first cluster.

[0090] When application migration is triggered, the migration server may obtain first configuration information of the target application in the first cluster, that is, the migration server may detect service dependencies of the target application in the first cluster.

[0091] Exemplarily, the first configuration information may include, for example, port information, storage space information, and configuration files of the target application.

[0092] The storage space information may be, for example, storage information of storage mounted via a persistent volume (PV) / persistent volume claim (PVC).

[0093] The port information may be, for example, port information of a port for external cluster traffic exposed by the target application to access an application within the cluster, such as a node port (Nodeport).

[0094] The configuration file may be, for example, a configuration file mounted by the target application through a Configmap component.

[0095] In one possible implementation, application migration can be triggered in the following ways:

[0096] The migration server may obtain an application migration request, where the application migration request includes an identifier of a target application, an identifier of a first cluster, and an identifier of a second cluster to which the target application is to be migrated.

[0097] Then, the migration server may obtain the first configuration information from the first cluster according to the application migration request. Specifically, the migration server may detect the first configuration information of the target application from the first cluster according to the identifier of the first cluster and the identifier of the target application.

[0098] Among them, the application migration request can be manually triggered by the operation and maintenance personnel when determining that the application needs to be migrated, or the migration server can send application migration information to the terminal device of the operation and maintenance personnel when detecting the need for application migration (for example, there is a version upgrade in the first cluster) to obtain the application migration request sent by the operation and maintenance personnel through their terminal device to confirm the application migration.

[0099] S202: Create second configuration information of the target application in the second cluster according to the first configuration information.

[0100] After acquiring the first configuration information, the migration server may create second configuration information of the target application in the second cluster according to the first configuration information.

[0101] Specifically, the migration server may create second configuration information of the target application in the second cluster.

[0102] S203: Start the second cluster based on the second configuration information.

[0103] After creating the second configuration information, the migration server may start the second cluster based on the second configuration information. After the second cluster is successfully started, the target application in the second cluster is started.

[0104] S204: Migrate a preset proportion of traffic of the target application from the first cluster to the second cluster.

[0105] After the second cluster is successfully started, the migration service can migrate a preset proportion of traffic of the target application from the first cluster to the second cluster.

[0106] Exemplarily, the preset ratio may be 10% or 30%, ie, a small portion of the traffic of the target application of the first cluster.

[0107] It can be understood that at this time, a preset proportion of traffic accesses the target application of the second cluster, and the remaining traffic accesses the target application of the first cluster, thereby achieving mixed traffic operation.

[0108] S205: Determine a first state of the target application in the second cluster, where the first state is a normal state or an abnormal state.

[0109] After migrating part of the traffic to the first cluster, a first state of the target application in the second cluster may be determined, where the first state is a normal state or an abnormal state.

[0110] Exemplarily, the first state may be determined by determining whether the target application in the second cluster can provide services normally.

[0111] S206: If the first state is a normal state, migrate the remaining traffic of the target application except for a preset proportion of traffic from the first cluster to the second cluster.

[0112] If the first state is a normal state, the migration server may migrate the remaining traffic of the target application except for a preset proportion of traffic from the first cluster to the second cluster.

[0113] If the first state is an abnormal state, the migration server may perform a rollback operation to migrate a preset proportion of traffic of the target application to the first cluster to ensure normal provision of services.

[0114] In this embodiment, the first configuration information of the target application in the first cluster is obtained, and the second configuration information of the target application in the second cluster is created according to the first configuration information, and then the second cluster is started based on the second configuration information. After startup, a preset proportion of the traffic of the target application is migrated from the first cluster to the second cluster, and the first state of the target application in the second cluster is determined. If the first state is a normal state, the remaining traffic of the target application is migrated from the first cluster to the second cluster, and traffic mixing is achieved during the migration process, so that the traffic is lossless during the application migration process, and the stability of the service is ensured, thereby improving the migration efficiency.

[0115] Next, another application migration method provided by the present application is described through another embodiment.

[0116] Figure 3 A flow chart of another application migration method provided in an embodiment of the present application, the method can be executed by a migration server, or by an application migration device set in the migration server, the device can be a chip, a chip module, or an IDE, etc., refer to Figure 3 , the method comprises the following steps:

[0117] S301: Obtain first configuration information of a target application in a first cluster.

[0118] For the description of the first configuration information, reference may be made to the above embodiment and will not be repeated here.

[0119] S302: Determine an information configuration specification for the second cluster.

[0120] When creating the second configuration information in the second cluster, an information configuration specification of the second cluster may be determined. The information configuration specification may be understood as the format of the second cluster configuration information, which may include template parameters for configuring relevant configuration information of the target application in the second cluster.

[0121] S303: Create second configuration information in the second cluster according to the port information, the storage space information, and the configuration file and the information configuration specification.

[0122] The migration server may create the second configuration information in the second cluster according to the port information, storage space information, and configuration file in the first configuration information and the information configuration specification of the second cluster.

[0123] S304: Start the second cluster based on the second configuration information.

[0124] S305: Migrate a preset proportion of traffic of the target application from the first cluster to the second cluster.

[0125] After starting the second cluster, the migration server may migrate a preset proportion of traffic of the target application from the first cluster to the second cluster.

[0126] In a possible implementation, in order to further improve the stability of services provided by the target application, the migration server may perform health monitoring on the second cluster after starting the second cluster to obtain a second state of the second cluster, where the second state is a healthy state or an unhealthy state.

[0127] If the second state is a healthy state, it means that the target application in the second cluster is available, and a preset proportion of traffic of the target application can be migrated from the first cluster to the second cluster.

[0128] If the second state is an unhealthy state, it means that the target application in the second cluster is unavailable. It can also be understood that the unhealthy state of the second cluster will affect the stability of services provided by the target application. The health of the second cluster can be continuously monitored without traffic migration until the second state of the second cluster is a healthy state, and then the traffic migration operation can be performed.

[0129] Exemplarily, the migration server may migrate a preset proportion of traffic of the target application from the first cluster to the second cluster through a load balancing system (Nginx, etc.).

[0130] S306: Within a preset time period after the second cluster is successfully started, determine whether the first state of the target application in the second cluster is a normal state.

[0131] If the first state of the target application in the second cluster is a normal state, S307 is executed; if the first state of the target application in the second cluster is not a normal state, that is, the first state is an abnormal state, S308 is executed.

[0132] Exemplarily, the migration server may make a judgment once or multiple times within a preset time period, and the multiple judgments may be made at preset time intervals.

[0133] In a possible implementation, the migration server can track multiple service requests corresponding to the target application in the second cluster through link tracking within a preset time after the second cluster is successfully started, and determine whether the service requests are executed. If it is determined that the multiple service requests are executed, the first state is determined to be a normal state. If it is determined that at least one service request among the multiple service requests is not executed, the first state is determined to be an abnormal state.

[0134] In another possible implementation, the migration server can detect the log of the target application in the second cluster within a preset time after the second cluster is successfully started, and if no log alarm is detected, the first state is determined to be a normal state, and if a log alarm is detected, the first state is determined to be an abnormal state. The log alarm is determined based on the log of the target application, and if the target application is abnormal, a log alarm will be generated.

[0135] Through the above two methods, the migration server can determine the first state of the target application to ensure whether the target application of the second cluster is available, thereby ensuring the stability of the service.

[0136] S307: Migrate the remaining traffic of the target application except for a preset proportion of traffic from the first cluster to the second cluster.

[0137] If the first state of the target application in the second cluster is a normal state, the migration server may migrate the remaining traffic of the target application except for a preset proportion of traffic from the first cluster to the second cluster to provide corresponding services through the target application of the second cluster.

[0138] In a possible implementation, after migrating the remaining traffic of the target application except for a preset proportion of traffic from the first cluster to the second cluster, the migration server may perform a recycling operation of the target application of the first cluster, thereby releasing resources of the first cluster.

[0139] S308: Perform a rollback operation on the target application, and migrate a preset proportion of traffic of the target application to the first cluster.

[0140] If the first state of the target application in the second cluster is an abnormal state, the migration server may perform a rollback operation on the target application and migrate a preset proportion of traffic of the target application to the first cluster to ensure that the service request of the client is normally served.

[0141] In this embodiment, by obtaining the first configuration information of the target application in the first cluster and determining the information configuration specification of the second cluster, the second configuration information is then created in the second cluster according to the port information, storage space information, and configuration files in accordance with the information configuration specification. The second cluster is then started based on the second configuration information, and after startup, a preset proportion of the traffic of the target application is migrated from the first cluster to the second cluster, and within a preset time after the second cluster is successfully started, it is determined whether the first state of the target application in the second cluster is a normal state. If so, the remaining traffic of the target application is migrated from the first cluster to the second cluster. If not, a rollback operation is performed on the target application, and a preset proportion of the traffic of the target application is migrated to the first cluster, so that the client's service request can obtain normal service. The embodiment of the present application realizes mixed traffic during the migration process, so that the traffic is lossless during the application migration process, and the stability of the service is ensured, thereby improving the migration efficiency.

[0142] Figure 4 A schematic diagram of the structure of an application migration device provided in an embodiment of the present application. Figure 4 The device 40 includes: an acquisition module 401, a creation module 402, a startup module 403, a first traffic migration module 404, a determination module 405 and a second traffic migration module 406.

[0143] The acquisition module 401 is configured to acquire first configuration information of a target application in a first cluster.

[0144] The creation module 402 is used to create second configuration information of the target application in the second cluster according to the first configuration information.

[0145] The starting module 403 is used to start the second cluster based on the second configuration information.

[0146] The first traffic migration module 404 is configured to migrate a preset proportion of traffic of a target application from the first cluster to the second cluster.

[0147] The determination module 405 is used to determine a first state of the target application in the second cluster, where the first state is a normal state or an abnormal state.

[0148] The second traffic migration module 406 is configured to migrate the remaining traffic of the target application except for a preset proportion of traffic from the first cluster to the second cluster if the first state is a normal state.

[0149] In a possible implementation manner, the first configuration information includes port information, storage space information, and a configuration file of the target application.

[0150] The creation module 402 is specifically used for:

[0151] An information configuration specification for the second cluster is determined.

[0152] The second configuration information is created in the second cluster according to the port information, the storage space information, and the configuration file and in accordance with the information configuration specification.

[0153] In a possible implementation, the determination module 405 is specifically configured to:

[0154] Within a preset time period after the second cluster is successfully started, multiple service requests corresponding to the target application in the second cluster are tracked through link tracking to determine whether the service requests are executed.

[0155] If it is determined that a plurality of service requests are executed, the first state is determined to be a normal state.

[0156] If it is determined that at least one service request among the plurality of service requests has not been executed, the first state is determined to be an abnormal state.

[0157] In a possible implementation, the determination module 405 is specifically configured to:

[0158] Within a preset time period after the second cluster is successfully started, the logs of the target application in the second cluster are detected.

[0159] If no log alarm is detected, the first state is determined to be a normal state.

[0160] If a log alarm is detected, the first state is determined to be an abnormal state.

[0161] In a possible implementation manner, the device further includes a processing module.

[0162] The processing module is specifically used for:

[0163] If the first state of the target application in the second cluster is an abnormal state, a rollback operation is performed on the target application, and a preset proportion of traffic of the target application is migrated to the first cluster.

[0164] In a possible implementation, the first traffic migration module 404 is specifically configured to:

[0165] Perform health monitoring on the second cluster to obtain a second state of the second cluster, where the second state is a healthy state or an unhealthy state.

[0166] If the second state is a healthy state, a preset proportion of traffic of the target application is migrated from the first cluster to the second cluster.

[0167] In a possible implementation, the acquisition module 401 is specifically used to:

[0168] Obtaining an application migration request, where the application migration request includes an identifier of a target application, an identifier of a first cluster, and an identifier of a second cluster to which the target application is to be migrated;

[0169] According to the application migration request, first configuration information is obtained from the first cluster.

[0170] The device of this embodiment can be used to execute the technical solution of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0171] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device 50 may include: at least one processor 501 and a memory 502 .

[0172] The memory 502 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.

[0173] The memory 502 may include a random access memory (RAM), and may also include a non-volatile memory (Non-volatile Memory), such as at least one disk memory.

[0174] The processor 501 is used to execute the computer-executable instructions stored in the memory 502 to implement the method described in the aforementioned method embodiment. The processor 501 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0175] Optionally, the electronic device 50 may further include: a communication interface 503. In a specific implementation, if the communication interface 503, the memory 502 and the processor 501 are implemented independently, the communication interface 503, the memory 502 and the processor 501 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0176] Optionally, in a specific implementation, if the communication interface 503, the memory 502 and the processor 501 are integrated on a chip, the communication interface 503, the memory 502 and the processor 501 can communicate through an internal interface.

[0177] The electronic device 50 may be a migration server or the like.

[0178] The electronic device of this embodiment can be used to execute the technical solution of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0179] The embodiment of the present application provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a RAM, a disk or an optical disk, and other media that can store computer-executable instructions. Specifically, the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer, the technical solution shown in the above method embodiment is executed. The specific implementation method and technical effect are similar and will not be repeated here.

[0180] An embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a computer, the technical solution shown in the above method embodiment is executed. The specific implementation method and technical effect are similar and will not be repeated here.

[0181] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0182] It should be understood that the present application is not limited to the precise 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 application is limited only by the appended claims.

[0183] In this application, "and / or" is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship.

[0184] "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where each of a, b, c can be an element itself or a set containing one or more elements.

[0185] In this application, "at least one" means one or more. "Multiple" means two or more. The first, second, etc. descriptions that appear in the embodiments of this application are only used for illustration and distinction of the described objects. There is no order, nor does it represent a special limitation on the number of devices in the embodiments of this application, and cannot constitute any limitation on the embodiments of this application. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and do not represent the difference in size, priority or importance of the two thresholds.

[0186] In this application, "exemplary", "in some embodiments", "in other embodiments", etc. are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0187] In this application, "of", "corresponding, relevant", "corresponding", and "associated" can sometimes be used interchangeably. It should be noted that when the distinction is not emphasized, the meanings they express are consistent. In the embodiments of this application, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction is not emphasized, the meanings they express are consistent. For example, transmission can include sending and / or receiving, which can be a noun or a verb.

Claims

1. An application migration method, It is characterized in that include: Obtaining first configuration information of a target application in a first cluster; Creating second configuration information of the target application in a second cluster according to the first configuration information; Based on the second configuration information, start the second cluster; Migrating a preset proportion of traffic of the target application from the first cluster to the second cluster; Determine a first state of a target application in the second cluster, where the first state is a normal state or an abnormal state; If the first state is a normal state, the remaining traffic of the target application except the preset proportion of traffic is migrated from the first cluster to the second cluster.

2. The method according to claim 1, It is characterized in that The first configuration information includes port information, storage space information, and configuration files of the target application; The step of creating second configuration information of the target application in the second cluster according to the first configuration information includes: Determining an information configuration specification of the second cluster; The second configuration information is created in the second cluster according to the port information, the storage space information, and the configuration file and in accordance with the information configuration specification.

3. The method according to claim 1 or 2, It is characterized in that The determining a first state of the target application in the second cluster includes: Within a preset time period after the second cluster is successfully started, multiple service requests corresponding to the target application in the second cluster are tracked through link tracking to determine whether the service requests are executed; If it is determined that the multiple service requests are executed, determining that the first state is a normal state; If it is determined that at least one service request among the plurality of service requests has not been executed, the first state is determined to be an abnormal state.

4. The method according to claim 1 or 2, It is characterized in that The determining a first state of the target application in the second cluster includes: Within a preset time after the second cluster is successfully started, detecting the log of the target application in the second cluster; If no log alarm is detected, determining that the first state is a normal state; If the log alarm is detected, it is determined that the first state is an abnormal state.

5. The method according to claim 3 or 4, It is characterized in that The method further comprises: If the first state of the target application in the second cluster is an abnormal state, a rollback operation is performed on the target application, and a preset proportion of traffic of the target application is migrated to the first cluster.

6. The method according to any one of claims 1 to 5, It is characterized in that The migrating a preset proportion of traffic of the target application from the first cluster to the second cluster includes: Performing health monitoring on the second cluster to obtain a second state of the second cluster, where the second state is a healthy state or an unhealthy state; If the second state is a healthy state, a preset proportion of traffic of the target application is migrated from the first cluster to the second cluster.

7. The method according to claim 1, It is characterized in that The obtaining first configuration information of the target application in the first cluster includes: Obtaining an application migration request, the application migration request including an identifier of a target application, an identifier of the first cluster, and an identifier of the second cluster to which the target application is to be migrated; According to the application migration request, the first configuration information is obtained from the first cluster.

8. An application migration device, It is characterized in that include: An acquisition module, used to acquire first configuration information of a target application in a first cluster; A creation module, used to create second configuration information of the target application in a second cluster according to the first configuration information; A startup module, used for starting the second cluster based on the second configuration information; A first traffic migration module, configured to migrate a preset proportion of traffic of the target application from the first cluster to the second cluster; A determination module, configured to determine a first state of a target application in the second cluster, wherein the first state is a normal state or an abnormal state; The second traffic migration module is configured to migrate the remaining traffic of the target application except the preset proportion of traffic from the first cluster to the second cluster if the first state is a normal state.

9. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the application migration method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the application migration method according to any one of claims 1 to 7.