Application copy scheduling method and device, medium, electronic equipment and program product

By using target profiles and virtual clustering technology, the problem of inefficient deployment of high-availability applications is solved, enabling efficient deployment of application replicas without understanding the details of resource clusters, and supporting failure recovery.

CN119806560APending Publication Date: 2025-04-11BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411847788.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art requires users to specify a large number of infrastructure details when deploying high availability applications, resulting in inefficient deployment.

Method used

By obtaining the target configuration file, the file includes the topological relationship between the application copy to be deployed and the application copy, build a virtual cluster and a virtual scheduling unit, perform scheduling simulation to obtain a simulated scheduling method, and deploy the application copy based on this method.

Benefits of technology

Users only need to care about the distribution of application replicas in multiple resource clusters, and can complete deployment without understanding the infrastructure attribute information of the resource cluster, which improves deployment efficiency and supports redeployment based on the same configuration file when a failure occurs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806560A_ABST
    Figure CN119806560A_ABST
Patent Text Reader

Abstract

The invention provides an application copy scheduling method and device, a medium, electronic equipment and a program product, and relates to the technical field of resource scheduling, and the method comprises the steps: obtaining a target configuration file comprising a plurality of to-be-deployed application copies and a topological relation among the plurality of application copies, creating a corresponding virtual cluster and a virtual scheduling unit, performing scheduling simulation on the virtual scheduling unit in the virtual cluster according to the topological relation to obtain a simulation scheduling mode, and deploying the plurality of application copies in the resource cluster based on the simulation scheduling mode, so that a user only needs to concern the distribution form of the application copies in the plurality of resource clusters; and the deployment of the high-availability application can be completed without understanding the attribute information of the infrastructure in the resource cluster. Due to the fact that the topological relation describes the distribution form of the application copies in the multiple resource clusters, even if the deployed application copies break down, the application copies can be re-deployed based on the target configuration file, and the target configuration file does not need to be modified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of resource scheduling, and in particular, to an application replica scheduling method, device, medium, electronic device and program product. Background Art

[0002] High-availability applications refer to applications that can withstand disaster recovery at the fault domain level to continuously provide stable services. In related technologies, deployment strategies for deploying high-availability applications that include multiple application replicas often require users to specify a large number of infrastructure details and provide a complete strategy to complete the deployment of a high-availability application, which greatly reduces the deployment efficiency of high-availability applications. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides an application replica scheduling method, comprising:

[0005] Obtaining a target configuration file, the target configuration file including a plurality of application replicas to be deployed and a topological relationship between the plurality of application replicas, the topological relationship being used to describe a distribution form of the plurality of application replicas in a plurality of resource clusters without relying on attribute information of the resource clusters;

[0006] In response to the target configuration file, a virtual cluster is constructed based on the multiple resource clusters, the virtual cluster includes virtual nodes corresponding one to one to real nodes in the resource cluster, the virtual cluster is used to simulate the real environment of the resource cluster and schedule the application replica;

[0007] Based on the multiple application copies to be deployed, construct a virtual scheduling unit corresponding to the application copies one by one;

[0008] According to the topological relationship between the plurality of application replicas, a scheduling simulation is performed on the virtual scheduling unit in the virtual cluster to obtain a simulated scheduling mode, wherein the simulated scheduling mode includes a deployment mode of each virtual scheduling unit in each virtual node;

[0009] Based on the simulation scheduling method, a plurality of application replicas are deployed in the resource cluster.

[0010] In a second aspect, the present disclosure provides an application replica scheduling device, comprising:

[0011] an acquisition module configured to acquire a target configuration file, wherein the target configuration file includes a plurality of application replicas to be deployed and a topological relationship between the plurality of application replicas, wherein the topological relationship is used to describe a distribution form of the plurality of application replicas in the plurality of resource clusters without relying on attribute information of the resource clusters;

[0012] A first construction module is configured to respond to the target configuration file and to construct a virtual cluster based on the multiple resource clusters, wherein the virtual cluster includes virtual nodes corresponding to real nodes in the resource cluster one by one, and the virtual cluster is used to simulate a real environment of the resource cluster to schedule the application replica;

[0013] A second construction module is configured to construct a virtual scheduling unit corresponding to the application copies one by one based on the multiple application copies to be deployed;

[0014] A simulation module is configured to perform a scheduling simulation on the virtual scheduling unit in the virtual cluster according to a topological relationship between the plurality of application replicas to obtain a simulated scheduling mode, wherein the simulated scheduling mode includes a deployment mode of each virtual scheduling unit in each virtual node;

[0015] The deployment module is configured to deploy the multiple application replicas in the resource cluster based on the simulation scheduling method.

[0016] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0017] In a fourth aspect, the present disclosure provides an electronic device, including:

[0018] a storage device having a computer program stored thereon;

[0019] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0020] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0021] Based on the above technical solution, by obtaining a target configuration file, the target configuration file includes multiple application copies to be deployed and the topological relationship between the multiple application copies, the topological relationship is used to describe the distribution form of multiple application copies in multiple resource clusters without relying on the attribute information of the resource cluster, and create corresponding virtual clusters and virtual scheduling units, and then according to the topological relationship between the multiple application copies, the virtual scheduling unit is scheduled and simulated in the virtual cluster to obtain a simulated scheduling method, and then based on the simulated scheduling method, the multiple application copies are deployed in the resource cluster, so that the user only needs to care about the distribution form of the application copies in multiple resource clusters, without understanding the attribute information of the infrastructure in the resource cluster, and the deployment of high-availability applications can be completed. Moreover, since the target configuration file describes the distribution form of the application copies in multiple resource clusters through the topological relationship, even if the deployed application copies fail, they can be redeployed based on the target configuration file without modifying the target configuration file. In addition, by using the virtual cluster for scheduling simulation and then deploying the application copies in the resource cluster based on the simulated scheduling method, the success rate and deployment efficiency of the application copy deployment can also be guaranteed.

[0022] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0024] Figure 1 is a flowchart of an application replica scheduling method according to some embodiments.

[0025] Figure 2 is a schematic diagram of an application replica scheduling method according to some embodiments.

[0026] Figure 3 It is a schematic diagram showing the principles of an application replica scheduling method according to some embodiments.

[0027] Figure 4 is a schematic diagram showing a distribution form according to some embodiments.

[0028] Figure 5 It is a structural diagram of an application replica scheduling device according to some embodiments.

[0029] Figure 6 is a schematic diagram of the structure of an electronic device according to some embodiments. DETAILED DESCRIPTION

[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0032] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0036] Figure 1 FIG. 1 is a flow chart of an application replica scheduling method according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides an application replica scheduling method, which can be executed by an electronic device, specifically, by an application replica scheduling device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.

[0037] In step 110, a target configuration file is obtained, which includes multiple application copies to be deployed and topological relationships between the multiple application copies. The topological relationship is used to describe the distribution of the multiple application copies in multiple resource clusters without relying on attribute information of the resource clusters.

[0038] Here, an application is a set of workloads that can provide services to the outside world, and an application replica is a copy of an application. In a database scenario, a database instance includes multiple applications (such as HA (High Availability), ProxyDBEngine (database proxy service)), which are deployed in a resource cluster in the form of multiple application replicas to make the deployed database instance highly available.

[0039] A resource cluster is a collection of multiple nodes that are interconnected through a high-speed network and work together as a whole to provide resources and services to users. It should be understood that in different scenarios, resource clusters can be different types of clusters. For example, if the application replica is a database application, the resource cluster can be a data plane cluster. If the application replica is a computing application, the resource cluster is a computing cluster.

[0040] Exemplarily, the resource cluster may be a k8s (Kubernetes) cluster. Among them, the k8s cluster is a system composed of multiple nodes for automatically deploying, expanding, and managing containerized applications. Of course, in the embodiments of the present disclosure, the resource cluster may be a k8s cluster, which is only an example and does not mean that the resource cluster can only be a k8s cluster. In any high-availability application deployment scenario, the application replica scheduling method provided in the present disclosure can be used to deploy application replicas. In other words, the application replica scheduling method provided in the embodiments of the present disclosure is applicable to any scenario where multiple application replicas need to be scheduled.

[0041] The user can specify the number of application copies to be deployed and the topological relationship between multiple application copies to be deployed in the target configuration file, so as to describe the distribution form of multiple application copies to be deployed in multiple resource clusters without relying on the attribute information of the resource cluster.

[0042] The distribution pattern refers to how application copies are distributed on different resource clusters, such as multiple application copies are evenly distributed, symmetrically distributed, diagonally distributed, etc. in the resource clusters. For example, assuming there are 2 resource clusters and 4 application copies, the distribution pattern may mean that the 4 application copies are evenly distributed in the 2 resource clusters, and 2 application copies can be deployed in each resource cluster.

[0043] By describing the distribution of application copies in multiple resource clusters through topological relationships, users do not need to describe in detail in the target configuration file how the resource clusters achieve the distribution goal. Therefore, users do not need to understand the attribute information of the infrastructure (nodes) in the resource cluster in detail, but can complete the deployment of multiple application copies by describing the distribution of multiple application copies in multiple resource clusters through topological relationships.

[0044] In other words, the target configuration file is essentially used to declare the distribution of multiple application copies to be deployed in multiple resource clusters without relying on the attribute information of the resource cluster, so as to achieve the decoupling of high-availability applications and resource clusters. Through this target configuration file, the infrastructure selects a suitable location to pull up the process corresponding to the application copy. Among them, the attribute information of the resource cluster refers to the detailed information of the nodes in the resource cluster, including but not limited to the resource information of the node and other information that affects resource scheduling (such as labels, etc.).

[0045] In step 120, in response to the target configuration file, a virtual cluster is constructed based on multiple resource clusters, where the virtual cluster includes virtual nodes that correspond one-to-one to real nodes in the resource cluster.

[0046] Here, the real node in the resource cluster can refer to the node pool in the resource cluster or the node in the resource cluster. Depending on the dimension of application replica scheduling, it can be set according to the actual situation. For example, if the application replica is scheduled in the node pool dimension, the real node in the resource cluster is the node pool; if the application replica is scheduled in the node dimension, the real node in the resource cluster is the node.

[0047] Exemplarily, each real node in the resource cluster can be abstracted as a virtual node and unified into the same virtual cluster, wherein each virtual node has attribute information consistent with the real node, and the attribute information may include storage, computing, network and the like information.

[0048] Among them, the virtual cluster is used to simulate the real environment of the resource cluster and schedule the application replicas. It is worth noting that scheduling simulation in the virtual cluster will not affect the normal operation of the resource cluster. Moreover, if the application replica is directly deployed in the resource cluster, it will also be limited by the physical resources of the resource cluster, resulting in scheduling failure. Simulation scheduling through the virtual cluster is not limited by the physical resources of the resource cluster, so as to ensure the success rate and deployment efficiency of the application replica deployment.

[0049] In step 130, based on a plurality of application replicas to be deployed, a virtual scheduling unit corresponding to each application replica is constructed.

[0050] Here, each application copy to be deployed corresponds to a virtual scheduling unit in the virtual cluster. For example, for a k8s cluster, an application is generally composed of multiple container groups (pods). Therefore, the virtual scheduling unit corresponding to each application copy can refer to a group of container groups in the virtual cluster.

[0051] Exemplarily, a virtual scheduling unit corresponding to each application copy may be created in the virtual cluster according to the attribute information of the workload corresponding to the application copy, wherein the virtual scheduling unit has the same attribute information as the corresponding application copy.

[0052] In step 140, a scheduling simulation is performed on a virtual scheduling unit in a virtual cluster according to the topological relationship between the multiple application copies to obtain a simulated scheduling mode.

[0053] Here, the virtual cluster includes virtual nodes corresponding one-to-one to real nodes in the resource cluster, and the simulation scheduling method includes the deployment method of each virtual scheduling unit in each virtual node.

[0054] After receiving the target configuration file, a virtual cluster can be constructed according to the attribute information of the real nodes in the multiple resource clusters, and then a virtual scheduling unit corresponding to each application copy is created in the virtual cluster according to the number of multiple application copies to be deployed included in the target configuration file, and then a scheduling simulation is performed on the virtual scheduling unit in the virtual cluster according to the topological relationship included in the target configuration file to obtain a simulated deployment mode of the virtual scheduling unit in the virtual node. In the simulated deployment mode, the distribution form of the virtual scheduling unit in the virtual node will be consistent with the distribution form of the application copy in the resource cluster in the target configuration file.

[0055] It should be understood that the simulated scheduling mode actually indicates on which virtual node the virtual scheduling unit is specifically deployed. For example, assuming that it includes virtual scheduling unit 1, virtual scheduling unit 2, virtual node A, virtual node B and virtual node C, the simulated deployment mode may mean that virtual scheduling unit 1 is deployed on virtual node A, and virtual scheduling unit 2 is deployed on virtual node B.

[0056] It is worth noting that the scheduling algorithm used for scheduling simulation is not limited in the embodiments of the present disclosure, and scheduling simulation can be performed using any scheduling algorithm.

[0057] In step 150, multiple application replicas are deployed in a resource cluster based on a simulated scheduling method.

[0058] Here, since the virtual scheduling unit corresponds one-to-one to the application copy and the virtual node corresponds one-to-one to the real node, the simulated scheduling method actually indicates on which virtual node the virtual scheduling unit is specifically deployed. Therefore, after obtaining the simulated scheduling method of the virtual scheduling unit in the virtual node, multiple application copies are deployed in the real nodes of the resource cluster through the simulated scheduling method.

[0059] For example, the simulated scheduling method indicates that virtual scheduling unit 1 is deployed on virtual node A and virtual scheduling unit 2 is deployed on virtual node B. Then the application copy corresponding to virtual scheduling unit 1 is deployed on the real node corresponding to virtual node A, and the application copy corresponding to virtual scheduling unit 2 is deployed on the real node corresponding to virtual node B.

[0060] Figure 2 FIG. 1 is a schematic diagram of an application replica scheduling method according to some embodiments. Figure 2 As shown, when scheduling starts, the scheduling request can be parsed. When the scheduling request indicates that scheduling simulation is required, the scheduling simulation process is entered. When the scheduling request does not require scheduling simulation, the real scheduling process on the resource cluster is entered. In the scheduling simulation process, a virtual scheduling unit can be created in the virtual cluster. If the creation of the virtual scheduling unit fails, retries are made until the virtual scheduling unit is successfully created in the virtual cluster. If the virtual scheduling unit is successfully created, scheduling simulation is performed in the virtual cluster and the state of the virtual cluster is observed. The state of the virtual cluster includes the existence of unscheduled virtual scheduling units and the fact that all virtual scheduling units have been scheduled. When the state of the virtual cluster indicates that there are unscheduled virtual scheduling units, it indicates that the scheduling has failed. When the state of the virtual cluster indicates that all virtual scheduling units have been scheduled, it indicates that the scheduling has succeeded. When scheduling fails, the resources of the virtual cluster are cleaned up. If the cleanup fails, retries are made until the cleanup succeeds. If the application copy scheduling is completed and the cleanup is completed, the scheduling is terminated. If the scheduling simulation fails and the cleanup succeeds, the step of parsing the scheduling request is continued.

[0061] In the real scheduling process on the resource cluster, create an application copy in the resource cluster according to the simulated scheduling method. If the application copy creation fails, retry until the application copy is successfully created. If the application copy is successfully created, observe the status of the resource cluster. If the status of the resource cluster indicates that there are unscheduled application copies, reschedule. If the status of the resource cluster indicates that all application copies have been scheduled. After the application copy scheduling is completed, clean up the resources of the virtual cluster.

[0062] Thus, by obtaining a target configuration file, the target configuration file includes multiple application copies to be deployed and the topological relationship between the multiple application copies, the topological relationship is used to describe the distribution form of multiple application copies in multiple resource clusters without relying on the attribute information of the resource cluster, and create a corresponding virtual cluster and a virtual scheduling unit, and then according to the topological relationship between the multiple application copies, the virtual scheduling unit is scheduled and simulated in the virtual cluster to obtain a simulated scheduling method, and then based on the simulated scheduling method, the multiple application copies are deployed in the resource cluster, so that the user only needs to care about the distribution form of the application copies in the multiple resource clusters, without understanding the attribute information of the infrastructure in the resource cluster, and the deployment of high-availability applications can be completed. Moreover, since the target configuration file describes the distribution form of the application copies in the multiple resource clusters through the topological relationship, even if the deployed application copies fail, they can be redeployed based on the target configuration file without modifying the target configuration file. In addition, by using the virtual cluster for scheduling simulation and then deploying the application copies in the resource cluster based on the simulated scheduling method, the success rate and deployment efficiency of the application copy deployment can also be guaranteed.

[0063] In some practicable implementations, the topological relationship includes a distribution relationship of multiple application replicas in the fault domains of multiple resource clusters, wherein the distribution relationship may refer to the number of application replicas deployed in each fault domain.

[0064] Accordingly, the application replicas deployed in each fault domain can be declared through the provided declarative configuration channel to obtain the target configuration file.

[0065] Here, the fault domain refers to the physical area or logical area where the fault source that causes data interruption or service unavailability is located. The fault domain can be a unit consisting of a group of devices or subsystems.

[0066] It should be understood that the dimensions of the fault domain may be different depending on the scheduling requirements. For example, the availability zone may be used as a fault domain, the resource cluster may be used as a fault domain, the node pool may be used as a fault domain, and the node may be used as a fault domain.

[0067] The declarative configuration channel may refer to a declarative interface (API) provided by the scheduling system, which allows users to express the topological relationship of application replicas in a declarative manner to describe the distribution form of application replicas in multiple resource clusters, rather than specifying how resource clusters achieve this distribution form step by step through an imperative method.

[0068] Users can use the provided declarative configuration channel to use preset fields to declare the application replicas deployed in each fault domain and obtain the target configuration file.

[0069] For example, there are fault domains A, B, and C in multiple resource clusters, and application replicas include application replica XA, application replica XB, and application replica XC. Users can use the declarative configuration channel to declare that application replica XA is deployed in fault domain A, application replica XB is deployed in fault domain B, and application replica XC is deployed in fault domain C, thereby obtaining the distribution relationship of multiple application replicas in the fault domains of multiple resource clusters.

[0070] Based on the above topological relationship, during the scheduling simulation, the scheduler will schedule the virtual scheduling unit corresponding to the application replica XA to the virtual node corresponding to fault domain A, the virtual scheduling unit corresponding to the application replica XB to the virtual node corresponding to fault domain B, and the virtual scheduling unit corresponding to the application replica XC to the virtual node corresponding to fault domain C.

[0071] It is worth noting that the distribution relationship of application replicas in the fault domains of multiple resource clusters actually reflects the affinity and anti-affinity of application replicas with respect to the fault domains. If application replica A is declared to be deployed in a fault domain A, then application replica A has affinity with fault domain A, and application replica A has anti-affinity with fault domain B.

[0072] Therefore, through the above target configuration file, users can complete the deployment of high-availability applications based on fault domains by declaring application replicas deployed in each fault domain, which greatly improves the deployment efficiency of high-availability applications.

[0073] In some feasible implementations, the fault domain includes availability zones in multiple resource clusters. Accordingly, a target configuration file can be obtained by declaring a set of application replicas deployed in each availability zone of multiple resource clusters, declaring that application replicas under the same application replica set are distributed in the same resource cluster, and declaring that application replicas under different application replica sets are distributed in different resource clusters through a declarative configuration channel.

[0074] Here, the availability zone can be understood as a type of fault domain. The availability zone refers to a physically or logically separated area in a resource cluster. It should be noted that the same availability zone can include different resource clusters (equivalent to infrastructure).

[0075] Through the declarative configuration channel, users can declare the application replica sets deployed in each availability zone of multiple resource clusters, declare that the application replicas under the same application replica set are distributed in the same resource cluster, and declare that the application replicas under different application replica sets are distributed in different resource clusters through preset fields in the configuration file, thereby building the final target configuration file.

[0076] An application replica set includes one or more application replicas. Through the above declaration, all application replicas under the same application replica set will be deployed in the same resource cluster, and application replicas under different application replica sets will be deployed in different resource clusters.

[0077] For example, in the target configuration file, you can declare that the application replica set dbengine-set-a is deployed in availability zone zone-a, and declare that the application replica set dbengine-set-b is deployed in availability zone zone-b. The application replica set dbengine-set-a can include application replicas unirs-rw and unirs-ro-0, and the application replica set dbengine-set-b can include application replicas unirs-standby and unirs-ro-1. Then, the application replicas unirs-rw and unirs-ro-0 are distributed in the same resource cluster under availability zone zone-a, and unirs-standby and unirs-ro-1 are distributed in the same resource cluster under availability zone zone-b. Moreover, the application replicas under the application replica set dbengine-set-a and the application replicas under the application replica set dbengine-set-b will be distributed in different resource clusters (different resource clusters can be across availability zones).

[0078] It is worth noting that the distribution relationship of application replicas in the availability zone can be understood as the affinity and anti-affinity of the application replicas relative to the availability zone, and whether the application replicas are in the same application replica set can also be understood as the affinity and anti-affinity between the application replicas.

[0079] In an embodiment of the present disclosure, in a target configuration file, fields of different hierarchical structures can be used to declare a set of application replicas deployed in each availability zone of multiple resource clusters, to declare that application replicas under the same application replica set are distributed in the same resource cluster, and to declare that application replicas under different application replica sets are distributed in different resource clusters.

[0080] Therefore, through the above-mentioned target configuration file, the user can specify the application replica deployed in a specific availability zone, and realize the high-availability application deployment in a multi-availability zone scenario. For example, in the database field, it is possible to realize the deployment of a high-availability database instance in a multi-availability zone scenario. Of course, the application replica scheduling method provided by the embodiment of the present disclosure is not only applicable to the database field. As long as the resource cluster can define the fault domain, the target configuration file can be defined by the application replica scheduling method provided by the embodiment of the present disclosure, thereby completing the deployment of a high-availability application, which greatly simplifies the deployment process of a high-availability application.

[0081] In some achievable implementations, the topological relationship may also include affinity relationships between application replicas and / or affinity relationships between application replicas and resource clusters. Accordingly, the affinity relationships between application replicas and / or affinity relationships between application replicas and resource clusters may be declared through a declarative configuration channel.

[0082] Here, the affinity relationship between application copies includes the affinity size between application copies and the anti-affinity size between application copies. If there is affinity between two application copies, the two application copies tend to be deployed in the same resource cluster, and the larger the affinity size, the more the two application copies tend to be deployed in the same resource cluster. If there is anti-affinity between two application copies, the two application copies tend not to be deployed in the same resource cluster, and the larger the anti-affinity size, the less the two application copies tend to be deployed in the same resource cluster.

[0083] The affinity relationship between the application copy and the resource cluster may include the affinity size between the application copy and the resource cluster and the anti-affinity size between the application copy and the resource cluster. If an application copy has affinity with a resource cluster, the application copy tends to be deployed in the resource cluster, and the larger the affinity size, the more the application copy tends to be deployed in the resource cluster. If an application copy has anti-affinity with a resource cluster, the application copy tends not to be deployed in the resource cluster, and the larger the affinity size, the more the application copy tends not to be deployed in the resource cluster.

[0084] In the target configuration file, in addition to declaring the topological relationship between the application replicas and the fault domains, the affinity relationship between the application replicas and / or the affinity relationship between the application replicas and the resource clusters can also be declared in the target configuration file.

[0085] Following the above embodiment, the affinity relationship between each application replica set and / or the affinity relationship between each application replica set and the resource cluster may be declared through a declarative configuration channel.

[0086] In some embodiments, the affinity relationship between application replica sets can be declared through a declarative configuration channel to declare the affinity relationship between application replicas.

[0087] It should be noted that since application replicas are distributed in application replica sets, by declaring the affinity relationship between each application replica set, the affinity relationship between all application replicas under one application replica set and all application replicas under another application replica set can be declared.

[0088] In some embodiments, the affinity relationship between each application replica set and the resource cluster can be declared through a declarative configuration channel.

[0089] It should be noted that, since application replicas are distributed in application replica sets, by declaring the affinity relationship between each application replica set and a resource cluster, the affinity relationship between all application replicas under one application replica set and the resource cluster can be declared.

[0090] For example, by declaring the affinity between application replicas and the affinity between application replicas and resource clusters, you can limit the application replica unirs-rw under the application replica set dbengine-set-a to be deployed in one of the resource clusters mix-panel-a, mix-panel-b, and mix-panel-c, and preferably deployed in the resource cluster mix-panel-a, limit the application replica unirs-standby under the application replica set dbengine-set-b to not be deployed in the resource cluster redis-only, and limit the application replica unirs-standby to not be deployed in the same resource cluster as the application replica unirs-rw.

[0091] It is worth noting that affinity relationships can be declared in the target configuration file through preset fields. For example, the key:topology.superkruise.io / cluster-name field can be used to declare that the application replica unirs-rw under the application replica set dbengine-set-a must be deployed in one of the resource clusters mix-panel-a, mix-panel-b, and mix-panel-c. The key:topology.superkruise.io / cluster-name field can be used to declare that the application replica under the application replica set dbengine-set-a is preferably deployed in the resource cluster mix-panel-a.

[0092] Therefore, by declaring the affinity between application copies and / or the affinity between application copies and resource clusters, the distribution of application copies in resource clusters can be controlled to quickly complete the deployment of high-availability applications without relying on the attribute information of resource clusters.

[0093] In some achievable implementations, a target configuration file may be obtained by declaring application replicas deployed in each fault domain and declaring application templates referenced by the application replicas through a provided declarative configuration channel.

[0094] Here, the application template includes a workload for supporting the application replica to provide external services, and the application template is used to build the application replica based on the workload included in the application template when deploying the application replica.

[0095] An application is a set of workloads that can provide services to the outside world, and an application template is used to describe the workloads included in an application. When you need to build an application copy, you can generate the corresponding application copy based on the workloads included in the application template referenced by the application copy.

[0096] By declaring the application template referenced by each application copy in the target configuration file in the target configuration file, the corresponding virtual scheduling unit can be directly built based on the application template during scheduling simulation, and the corresponding application copy can be built and deployed based on the application template during real scheduling.

[0097] In the database scenario, the workload of a MysSQLDBEngine application includes a MySQL statefulset and a configmap. Accordingly, in the application template, you can declare that the workload of a MysSQLDBEngine application is a MySQL statefulset and a configmap.

[0098] It should be noted that in an application template, a workload set can be declared through a preset field (resourceTemplates), and then the workloads included in the workload set can be declared through other fields. For example, the first workload is declared as configmap through the name:config field, and the second workload is declared as statefulset through the name:dbengine field.

[0099] In the target configuration file, the application template referenced by the application replica can be represented by the customUnitedResourceTemplateRef:mysql-dbengine-tpl field, where mysql-dbengine-tpl is the application template. Therefore, when deploying an application replica, the corresponding application replica can be created based on the application template referenced by the application replica in the target configuration file.

[0100] Therefore, by declaring the application template referenced by the application copy in the target configuration file, when performing scheduling simulation, the virtual scheduling unit corresponding to the application copy can be directly built based on the application template, and during real scheduling, the corresponding application copy can be generated and deployed directly based on the application template, without the need for users to create application copies one by one, greatly improving the deployment efficiency of application copies.

[0101] In some feasible implementations, corresponding personalized information may also be configured for a target application copy in the application copy through a declarative configuration channel.

[0102] Here, a differential configuration option may be provided in the declarative configuration channel, so that the user can configure personalized information corresponding to the target application copy configuration in the application copy through the differential configuration option.

[0103] The target application copy in the application copy may be an application copy specified by the user. For example, in a target configuration file, including application copy unirs-rw, application copy unirs-ro-0, application copy unirs-standby, and application copy unirs-ro-1, the user may specify application copy unirs-rw and application copy unirs-standby among application copy unirs-rw, application copy unirs-ro-0, application copy unirs-standby, and application copy unirs-ro-1 as the target copy.

[0104] The personalized information is used to adjust the target application copy based on the personalized information when the target application copy is deployed in the resource cluster.

[0105] The personalized information is used to describe the differentiated configuration of the application replicas, so that the user can customize each application replica by configuring different personalized information. Exemplarily, the personalized information may refer to the name of the configured workload. For example, the name of the workload statefulset under the application replica unirs-rw and the application replica unirs-standby may be modified to main through the personalized information.

[0106] For example, the name of the workload statefulset under the application replica unirs-rw and the application replica unirs-standby can be changed to main through the following fields:

[0107] {overrideRules:#Differential configuration options for application copies

[0108] -targetUnitedResources:

[0109] names:[unirs-rw,unirs-standby]#Configure application replicas unirs-rw and unirs-standby differently

[0110] overriders:

[0111] jsonPatch:

[0112] -path: / spec / resource / Template / 1 / template / metadata / name#Change the name of the workload statefulset to main

[0113] op:replace

[0114] value:main}

[0115] It should be understood that by configuring different personalized information, the user can customize each application copy in the high-availability application through the target configuration file to meet business needs.

[0116] Figure 3 FIG. 1 is a schematic diagram showing the principle of an application replica scheduling method according to some embodiments. Figure 3 As shown, the application template includes workload A and workload B, and the target configuration file can reference the application template to indicate that each application replica includes workload A and workload B. In the target configuration file, its topological relationship includes "fault domain A: application replica XA, fault domain B: application replica XB, fault domain C: application replica XC" and different application replicas are distributed in different resource clusters, where fault domain A: application replica XA means that application replica XA is deployed in fault domain A. Moreover, in the target configuration file, it is stated that application replica XA is adjusted through personalized information A, application replica XB is adjusted through personalized information B, and application replica XC is adjusted through personalized information C.

[0117] like Figure 3 As shown, after scheduling based on the target configuration file, the application replica XA is deployed in resource cluster A of fault domain A, the application replica XB is deployed in resource cluster B of fault domain B, and the application replica XC is deployed in resource cluster C of fault domain C.

[0118] When the application replica XA is deployed in the resource cluster A of the fault domain A, the application replica XA is configured through the personalized information A, and the workload of the application replica XA deployed in the resource cluster A of the fault domain A includes workload A and workload B.

[0119] That is to say, through the topological relationship in the above target configuration file, the distribution form of application replica XA, application replica XB and application replica XC in multiple resource clusters is actually described as follows: application replica XA, application replica XB and application replica XC are distributed in different fault domains, and application replica XA, application replica XB and application replica XC are distributed in different resource clusters.

[0120] Therefore, the target configuration file provided by the embodiment of the present disclosure actually describes the distribution form of a high-availability application in multiple resource clusters without relying on detailed information of the resource cluster, thereby decoupling the high-availability application from the resource cluster and enabling rapid deployment of the high-availability application.

[0121] Figure 4 is a schematic diagram showing the distribution form according to some embodiments. Figure 4 As shown, a database instance includes multiple applications HA, application Proxy, and application DBEngine. Application HA is described by the target configuration file: HA, and the target configuration file: HA references the application template: HA of application Proxy. Application Proxy is described by the target configuration file: Proxy, and the target configuration file: Proxy references the application template: Proxy of application Proxy. Application DBEngine is described by the target configuration file: DBEngine, and the target configuration file: DBEngine references the application template: DBEngine of application DBEngine.

[0122] Since only one application HA can be distributed in one availability zone and two application HAs cannot be distributed in the same resource cluster, the topological relationship of the application replicas (application replica set: HAA-0 and application replica set: HAA-1) corresponding to the application HA can be described through the target configuration file: HA, so that the application replica set: HAA-0 is deployed in resource cluster A in availability zone A, and the application replica set: HAA-1 is deployed in resource cluster B in availability zone B.

[0123] The topological relationship of the application copies (application copy set: DBEngineA-0, application copy set: DBEngineB-0, application copy set: DBEngineA-1, application copy set: ProxyB-1) corresponding to the application DBEngine can be described through the target configuration file: DBEngine as being evenly distributed in two availability zones and two resource clusters. Based on the topological relationship of the target configuration file: DBEngine, the distribution pattern of the application copies is: application copy set: DBEngineA-0 will be deployed in resource cluster A in availability zone A, application copy set: DBEngineB-0 will be deployed in resource cluster A in availability zone B, application copy set: DBEngineA-1 will be deployed in resource cluster B in availability zone A, and application copy set: ProxyB-1 will be deployed in resource cluster B in availability zone B.

[0124] Similarly, the topological relationship of the application replicas of the application Proxy (application replica set: ProxyA-0, application replica set: ProxyB-0, application replica set: ProxyA-1, and application replica set: ProxyB-1) can be described through the target configuration file: Proxy as being evenly distributed in two availability zones and two resource clusters. Based on the topological relationship of the target configuration file: Proxy, the distribution pattern of the application replicas is: application replica set: ProxyA-0 will be deployed in resource cluster A in availability zone A, application replica set: ProxyB-0 will be deployed in resource cluster A in availability zone B, application replica set: ProxyA-1 will be deployed in resource cluster B in availability zone A, and application replica set: ProxyB-1 will be deployed in resource cluster B in availability zone B.

[0125] Combination Figure 3 as well as Figure 4 It can be seen that by describing the distribution of application replicas in multiple resource clusters through topological relationships in the target configuration file, high-availability application deployment can be quickly achieved.

[0126] In some practicable implementations, in step 140, the topological relationship between the multiple application replicas may be converted into affinity rules in the virtual cluster, where the affinity rules include a first affinity rule between virtual scheduling units and / or a second affinity rule between the virtual scheduling unit and the virtual node. Then, based on the first affinity rule and / or the second affinity rule, a scheduling simulation is performed on the virtual scheduling unit in the virtual cluster to obtain a simulated scheduling method.

[0127] Here, the first affinity rule between virtual scheduling units refers to the affinity relationship between virtual scheduling units, and the affinity relationship between virtual scheduling units is equivalent to the affinity relationship between application copies. The relevant description of the above embodiment can be referred to and will not be repeated here. The second affinity rule between the virtual scheduling unit and the virtual node refers to the affinity relationship between the virtual scheduling unit and the virtual node, and the affinity relationship between the virtual scheduling unit and the virtual node is equivalent to the affinity relationship between the application copy and the resource cluster. The relevant description of the above embodiment can be referred to and will not be repeated here.

[0128] Continuing from the above embodiments, in the target configuration file, the topological relationship may include the distribution relationship of multiple application replicas in the fault domains of multiple resource clusters. Since the distribution relationship of application replicas in the fault domains of multiple resource clusters actually reflects the affinity and anti-affinity of the application replicas with respect to the fault domains, the distribution relationship may be converted into the first affinity rule and / or the second affinity rule in the virtual cluster.

[0129] Similarly, following the above embodiment, the topological relationship in the target configuration file also includes the affinity relationship between application copies and / or the affinity relationship between application copies and resource clusters. The affinity relationship between application copies can be converted into a first affinity rule between virtual scheduling units in the virtual cluster, and the affinity relationship between application copies and resource clusters can be converted into a second affinity rule between virtual scheduling units and virtual nodes in the virtual cluster.

[0130] After converting the topological relationship into the first affinity rule and / or the second affinity rule, the scheduler performs scheduling simulation on the virtual scheduling unit in the virtual cluster by using the first affinity rule and / or the second affinity rule to obtain a simulated scheduling mode.

[0131] It is worth noting that in the embodiments of the present disclosure, the virtual scheduling unit scheduling simulation is performed in the virtual cluster based on the first affinity rule and / or the second affinity rule to obtain a simulated scheduling method. In the actual scheduling simulation process, other constraints may also be included. For example, an application copy may have corresponding resource demand information (including storage resources, computing resources, network resources, etc.), and the resource demand information determines whether the real node has sufficient resources to carry the corresponding application copy.

[0132] When the virtual cluster is a k8s cluster, the resource requirement information of the workload can be converted into a resource key based on the idea of ​​GPU resource scheduling in k8s, and then the resource key can be converted into the resource requirement information of the virtual scheduling unit, so as to perform application copy scheduling simulation in the virtual cluster based on the resource requirement information of the virtual scheduling unit, the first affinity rule and / or the second affinity rule to obtain a simulated scheduling method.

[0133] Therefore, by converting the topological relationship between multiple application copies into affinity rules in a virtual cluster, users can deploy high-availability applications by describing the topological relationship between multiple application copies, greatly improving the deployment efficiency of high-availability applications.

[0134] It is worth noting that the target configuration file provided in the above embodiment is essentially a hierarchical structure of interface interaction, which is used to describe the distribution form of multiple application copies in multiple resource clusters. Any user can design target configuration files in different forms. The target configuration file includes application templates, topological relationships and personalized information to complete the deployment of a high-availability application.

[0135] Figure 5 is a schematic diagram of the structure of an application replica scheduling device according to some embodiments. Figure 5 As shown, the embodiment of the present disclosure provides an application replica scheduling device 500, and the application replica scheduling device 500 includes:

[0136] The acquisition module 501 is configured to acquire a target configuration file, wherein the target configuration file includes a plurality of application replicas to be deployed and a topological relationship between the plurality of application replicas, wherein the topological relationship is used to describe the distribution form of the plurality of application replicas in the plurality of resource clusters without relying on attribute information of the resource clusters;

[0137] A first construction module 502 is configured to respond to the target configuration file and, based on the multiple resource clusters, construct a virtual cluster, wherein the virtual cluster includes virtual nodes corresponding one-to-one to real nodes in the resource cluster, and the virtual cluster is used to simulate a real environment of the resource cluster to schedule the application replica;

[0138] The second construction module 503 is configured to construct a virtual scheduling unit corresponding to each of the application copies based on the multiple application copies to be deployed;

[0139] The simulation module 504 is configured to perform a scheduling simulation on the virtual scheduling unit in the virtual cluster according to the topological relationship between the plurality of application replicas to obtain a simulated scheduling mode, wherein the simulated scheduling mode includes a deployment mode of each virtual scheduling unit in each virtual node;

[0140] The deployment module 505 is configured to deploy the multiple application replicas in the resource cluster based on the simulation scheduling method.

[0141] Optionally, the topological relationship includes a distribution relationship of the plurality of application replicas in the fault domains of the plurality of resource clusters;

[0142] The application replica scheduling device 500 further includes:

[0143] The configuration module is configured to declare the application replicas deployed in each of the fault domains through a provided declarative configuration channel to obtain the target configuration file.

[0144] Optionally, the fault domain includes available zones in the multiple resource clusters; and the configuration module is specifically configured to:

[0145] Through the declarative configuration channel, the application replica sets deployed in each availability zone of the multiple resource clusters are declared, the application replicas under the same application replica set are declared to be distributed in the same resource cluster, and the application replicas under different application replica sets are declared to be distributed in different resource clusters to obtain the target configuration file.

[0146] Optionally, the topological relationship further includes an affinity relationship between application replicas and / or an affinity relationship between an application replica and a resource cluster; and the configuration module is further configured to:

[0147] The affinity relationship between the application replicas and / or the affinity relationship between the application replica and the resource cluster is declared through the declarative configuration channel.

[0148] Optionally, the configuration module is specifically configured as follows:

[0149] Through the provided declarative configuration channel, the application replica deployed in each of the fault domains and the application template referenced by the application replica are declared to obtain the target configuration file, wherein the application template includes a workload for supporting the application replica to provide external services, and the application template is used to build the application replica based on the workload included in the application template when deploying the application replica.

[0150] Optionally, the configuration module is further configured to:

[0151] Through the declarative configuration channel, corresponding personalized information is configured for the target application copy in the application copies, and the personalized information is used to adjust the target application copy based on the personalized information when the target application copy is deployed in the resource cluster.

[0152] Optionally, the simulation module 504 is specifically configured as follows:

[0153] Converting the topological relationship between the plurality of application replicas into affinity rules in the virtual cluster, wherein the affinity rules include a first affinity rule between the virtual scheduling units and / or a second affinity rule between the virtual scheduling unit and the virtual node;

[0154] Based on the first affinity rule and / or the second affinity rule, a scheduling simulation is performed on the virtual scheduling unit in the virtual cluster to obtain the simulated scheduling mode.

[0155] The logic of the method executed by each functional module in the above-mentioned application replica scheduling device 500 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.

[0156] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device (terminal device or server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0157] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0158] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0159] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0160] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0161] In some embodiments, the electronic device can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0162] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0163] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a target configuration file, the target configuration file includes multiple application copies to be deployed and the topological relationship between the multiple application copies, the topological relationship is used to describe the distribution form of the multiple application copies in the multiple resource clusters without relying on the attribute information of the resource cluster; in response to the target configuration file, based on the multiple resource clusters, a virtual cluster is constructed, the virtual cluster includes virtual nodes corresponding to the real nodes in the resource cluster, the virtual cluster is used to simulate the real environment of the resource cluster and schedule the application copies; based on the multiple application copies to be deployed, a virtual scheduling unit corresponding to the application copy is constructed; according to the topological relationship between the multiple application copies, the virtual scheduling unit is scheduled in the virtual cluster to obtain a simulated scheduling method, the simulated scheduling method includes the deployment method of each virtual scheduling unit in each virtual node; based on the simulated scheduling method, the multiple application copies are deployed in the resource cluster.

[0164] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0165] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0166] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0167] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0168] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0169] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0170] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0171] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for scheduling application replicas, characterized in that: include: Obtaining a target configuration file, the target configuration file including a plurality of application replicas to be deployed and a topological relationship between the plurality of application replicas, the topological relationship being used to describe a distribution form of the plurality of application replicas in a plurality of resource clusters without relying on attribute information of the resource clusters; In response to the target configuration file, a virtual cluster is constructed based on the multiple resource clusters, the virtual cluster includes virtual nodes corresponding one to one to real nodes in the resource cluster, the virtual cluster is used to simulate the real environment of the resource cluster and schedule the application replica; Based on the multiple application copies to be deployed, construct a virtual scheduling unit corresponding to the application copies one by one; According to the topological relationship between the plurality of application replicas, a scheduling simulation is performed on the virtual scheduling unit in the virtual cluster to obtain a simulated scheduling mode, wherein the simulated scheduling mode includes a deployment mode of each virtual scheduling unit in each virtual node; Based on the simulation scheduling method, a plurality of application replicas are deployed in the resource cluster.

2. The method according to claim 1, characterized in that The topological relationship includes a distribution relationship of the plurality of application replicas in the fault domains of the plurality of resource clusters; The target configuration file is obtained by the following steps: Through the provided declarative configuration channel, the application replicas deployed in each of the fault domains are declared to obtain the target configuration file.

3. The method according to claim 2, characterized in that The fault domain includes availability zones in the plurality of resource clusters; Declaring the application replicas deployed in each of the fault domains through the provided declarative configuration channel to obtain the target configuration file includes: Through the declarative configuration channel, the application replica sets deployed in each availability zone of the multiple resource clusters are declared, the application replicas under the same application replica set are declared to be distributed in the same resource cluster, and the application replicas under different application replica sets are declared to be distributed in different resource clusters to obtain the target configuration file.

4. The method according to claim 2, characterized in that: The topological relationship also includes affinity relationships between application replicas and / or affinity relationships between application replicas and resource clusters; the method also includes: The affinity relationship between the application replicas and / or the affinity relationship between the application replica and the resource cluster is declared through the declarative configuration channel.

5. The method according to claim 2, characterized in that: Declaring the application replicas deployed in each of the fault domains through the provided declarative configuration channel to obtain the target configuration file includes: Through the provided declarative configuration channel, the application replica deployed in each of the fault domains and the application template referenced by the application replica are declared to obtain the target configuration file, wherein the application template includes a workload for supporting the application replica to provide external services, and the application template is used to build the application replica based on the workload included in the application template when deploying the application replica.

6. The method according to claim 2, characterized in that The method further comprises: Through the declarative configuration channel, corresponding personalized information is configured for the target application copy in the application copies, and the personalized information is used to adjust the target application copy based on the personalized information when the target application copy is deployed in the resource cluster.

7. The method according to any one of claims 1 to 6, characterized in that The performing scheduling simulation on the virtual scheduling unit in the virtual cluster according to the topological relationship between the plurality of application replicas to obtain a simulated scheduling mode includes: Converting the topological relationship between the plurality of application replicas into affinity rules in the virtual cluster, wherein the affinity rules include a first affinity rule between the virtual scheduling units and / or a second affinity rule between the virtual scheduling unit and the virtual node; Based on the first affinity rule and / or the second affinity rule, a scheduling simulation is performed on the virtual scheduling unit in the virtual cluster to obtain the simulated scheduling mode.

8. An application replica scheduling device, characterized in that: include: an acquisition module configured to acquire a target configuration file, wherein the target configuration file includes a plurality of application replicas to be deployed and a topological relationship between the plurality of application replicas, wherein the topological relationship is used to describe a distribution form of the plurality of application replicas in the plurality of resource clusters without relying on attribute information of the resource clusters; A first construction module is configured to respond to the target configuration file and to construct a virtual cluster based on the multiple resource clusters, wherein the virtual cluster includes virtual nodes corresponding to real nodes in the resource cluster one by one, and the virtual cluster is used to simulate a real environment of the resource cluster to schedule the application replica; A second construction module is configured to construct a virtual scheduling unit corresponding to the application copies one by one based on the multiple application copies to be deployed; A simulation module is configured to perform a scheduling simulation on the virtual scheduling unit in the virtual cluster according to a topological relationship between the plurality of application replicas to obtain a simulated scheduling mode, wherein the simulated scheduling mode includes a deployment mode of each virtual scheduling unit in each virtual node; The deployment module is configured to deploy the multiple application replicas in the resource cluster based on the simulation scheduling method.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Application deployment method, device, server and storage medium

    CN110413288A

  • Resource scheduling method, device and system

    CN113553140A

  • Method and apparatus for managing network service based on virtualization

    KR1020160050553A

  • System and method for deploying an application in a computer system

    US20160381133A1

  • Provisional resource scheduling in a cloud computing environment

    US20230401098A1