Application scheduling method and device, medium, electronic equipment and program product
By initially deploying the packaged application in the central service cluster in the edge PaaS platform, and selecting the edge service cluster for scheduling according to needs, the service association problem when the application is scheduled across clusters is solved, and the overall scheduling and migration of application-dependent services are realized. Improves resource usage efficiency and maintains application availability under failure conditions.
Patent Information
- Application Number
- CN202411155982.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-10-18
AI Technical Summary
In the edge PaaS platform, when cross-cluster scheduling is applied, correlation problems between multiple services cause some services to be unsuccessfully scheduled or migrated, which in turn causes the problem of mutual access between services and low resource usage efficiency.
The packaged application is initially deployed in the central service cluster. According to the deployment requirements and resource requirements, a suitable edge service cluster is selected for scheduling, and the overall scheduling and migration of all services are ensured. Service decomposition and status monitoring are performed through the application controller to achieve Rescheduling and disaster recovery.
It ensures the integrity of all services that applications rely on in cross-cluster scheduling and migration, solves the problem of service inaccessibility, improves resource usage efficiency, and achieves disaster recovery in case of failures to maintain application availability.
Smart Images

Figure CN118796397A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to an application scheduling method, device, medium, electronic device and program product. Background Art
[0002] Today, cloud computing has become a mainstream computing form, among which Platform as a Service (PaaS) technology is particularly important. PaaS provides an environment in which users can run applications without having to manage infrastructure. The number of computer rooms that need to be deployed for edge PaaS platforms is very large. Compared with central computer rooms, edge computer rooms have more and more complex node removal and failure scenarios. Therefore, cross-cluster scheduling of applications is a normal capability, and how to solve the association problem between multiple services of an application when scheduling applications across clusters is also a challenge. 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 scheduling method based on edge computing, comprising: initially deploying an application in a central service cluster, wherein the application is an application packaged by all services on which the application depends; determining the deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the application to run; selecting a first target edge service cluster that is adapted to the deployment requirements and resource requirements of the application from the multiple edge service clusters based on the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in a plurality of edge service clusters; and scheduling the application deployed by the central service cluster to the first target edge service cluster.
[0005] In a second aspect, the present disclosure provides an application scheduling device based on edge computing, including: a deployment module, used to initially deploy an application in a central service cluster, wherein the application is an application packaged by all services on which the application depends; a determination module, used to determine the deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the application to run; a selection module, used to select a first target edge service cluster that is adapted to the deployment requirements and resource requirements of the application from the multiple edge service clusters based on the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters; a synchronization module, used to schedule the application deployed by the central service cluster to the first target edge service cluster.
[0006] 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 any one of the methods described in the first aspect.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods in the first aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods in the first aspect.
[0009] By adopting the above technical solution, since the application initially deployed in the central service cluster is an application packaged by all the services on which the application depends, and according to the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that adapts to the deployment requirements and resource requirements of the application is selected from the multiple edge service clusters, and then the application deployed by the central service cluster is scheduled to the first target edge service cluster. Therefore, since the application is an application packaged by all the services on which the application depends, all the services on which the application depends can be scheduled as a whole during application scheduling, thereby ensuring the overall cross-cluster scheduling or migration of all services on which the application depends, solving the problem in the related technology that some services in the application are not successfully scheduled or migrated across clusters due to the separate scheduling of each service on which the application depends, thereby causing different services on which the application depends to be unable to access each other, solving the scheduling requirements of multiple services on which the application depends in a distributed cluster, and improving the efficiency of resource utilization.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] 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: Figure 1 It is a schematic diagram of an application scheduling solution in related technology.
[0012] Figure 2 It is a flowchart of an application scheduling method based on edge computing according to an embodiment of the present disclosure.
[0013] Figure 3 It is a schematic block diagram of an application scheduling device based on edge computing according to an embodiment of the present disclosure.
[0014] Figure 4 It is a schematic diagram of an application scheduling architecture based on edge computing according to an embodiment of the present disclosure.
[0015] Figure 5 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0016] 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.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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".
[0021] 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.
[0022] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0023] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0024] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0025] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0026] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0027] In related technologies, container platforms and scheduling for edge scenarios usually adopt Figure 1In the scheme shown, the control node (master) is located in the central service cluster (referred to as the central cluster), and the computing node (node) is located in the edge service cluster (referred to as the edge cluster). The control node in the central service cluster controls the computing node in the edge service cluster. In addition, the various services that the application depends on are migrated and scheduled independently when they are migrated and scheduled across clusters. For example, Figure 1 In the example, the services that the application depends on include service A and service B (that is, if any one of service A and service B is missing, the entire application will be unavailable). If an application that includes service A and service B in an edge service cluster needs to be migrated to another edge service cluster due to a failure of the edge service cluster, service A and service B will be migrated separately.
[0028] The application scheduling scheme in the related art has the following defects: If the application consists of multiple services (for example, Figure 1 In the example, the application includes service A and service B, and the services need to access each other, so advance planning is required. Otherwise, if some services in the application are not successfully scheduled to the edge service cluster or cross-cluster migration fails, the entire application will become unavailable.
[0029] Figure 2 The flowchart of the application scheduling method based on edge computing according to an embodiment of the present disclosure is as follows. The application scheduling method based on edge computing can be applied to application scheduling scenarios in various types of clusters, such as cross-cluster scheduling scenarios of applications, especially cross-cluster scheduling scenarios of applications in PaaS platforms. Figure 2 As shown, the edge computing-based application scheduling method may include the following steps S21 to S24.
[0030] In step S21, an application is initially deployed in a central service cluster, wherein the application is an application packaged by all services on which the application depends.
[0031] The services that an application depends on are the services that the application needs to rely on in order to run.
[0032] Applications can be initially deployed in the central service cluster in the form of custom resource definitions (CRDs), and the deployment requirements of the application and the resource requirements corresponding to each of the services contained in the application are set during the initial deployment, so that application services can be provided in a cloud-native manner. The resource requirements corresponding to each of the services may include requirements for central processing units (CPUs) and memory (e.g., storage resources). Deployment requirements refer to deployment location requirements, such as requirements for which region to schedule the application to, requirements for which region to avoid scheduling the application to, and so on.
[0033] The central service cluster can be a k8s cluster or other types of clusters.
[0034] In step S22, the deployment requirements and resource requirements of the application are determined, wherein the resource requirements are used to indicate the resource conditions required for the application to run. This step can be performed on the central service cluster.
[0035] The resource requirements of the application may include requirements for CPU and memory. The deployment requirements of the application refer to deployment location requirements, for example, requirements for which region the application is expected to be deployed to, requirements for which region the application is not expected to be deployed to, and so on.
[0036] For example, the resource requirement of the application may be determined according to the resource requirements of each of the services on which the application depends.
[0037] For example, the resource requirement of the application may be the sum of the resource requirements of all services that the application depends on. For example, the services that the application depends on include service A and service B, the resource requirements of service A are 2 CPU cores and 4 GiB of memory, and the resource requirements of service B are 1 CPU core and 2 GiB of memory, then the resource requirements of the application are 2 CPU cores and 6 GiB of memory.
[0038] In step S23, according to the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that meets the deployment requirements and resource requirements of the application is selected from the multiple edge service clusters. This step can be performed on the central service cluster.
[0039] The edge service cluster can be a k8s cluster or other types of clusters.
[0040] The cluster state of the edge service cluster may include the region to which the cluster belongs, the remaining allocatable resources of the cluster, cluster fault information, etc. The cluster fault information may include information such as whether the edge service cluster is faulty and whether the edge service cluster is online. The cluster state of the edge service cluster may also include at least one of information such as cluster attributes and total resources of the cluster. The remaining allocatable resources of the cluster may include remaining allocatable CPU resources and remaining allocatable memory resources, etc.
[0041] By way of example, selecting a first target edge service cluster that is adapted to the deployment requirements and the resource requirements of the application from the multiple edge service clusters based on the deployment requirements and the resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters may include: periodically obtaining the cluster status of the multiple edge service clusters through a cluster controller in the central service cluster; and selecting the first target edge service cluster that is adapted to the deployment requirements and the resource requirements of the application from the multiple edge service clusters based on the cluster status of the multiple edge service clusters.
[0042] For example, the resource requirements of the application can be first determined based on the resource requirements of each service on which the application depends, and then an edge service cluster that meets the resource requirements of the application is determined based on the cluster status of each edge service cluster as the first target edge service cluster. If there are multiple edge service clusters that meet the resource requirements of the application, one edge service cluster can be selected as the first target edge service cluster, or an edge service cluster with the best performance can be selected as the first target edge service cluster.
[0043] For example, assuming that the services that the application depends on include service A and service B, the resource requirements of service A are 2-core CPU and 4GiB of memory, the resource requirements of service B are 1-core CPU and 2 GiB of memory, the deployment location requirement of the application is region 1, edge service cluster 1 is located in region 1 and its remaining allocatable resources are 3-core CPU and 7GiB of memory, edge service cluster 2 is located in region 1 and its remaining allocatable resources are 3-core CPU and 2GiB of memory, then, since the resource requirements of the entire application are 2-core CPU and 6 GiB of memory and the deployment location requirement is region 1, and edge service cluster 1 in region 1 meets the resource requirements of the application and edge service cluster 2 does not meet the resource requirements of the application, edge service cluster 1 in region 1 is determined as the first target edge service cluster.
[0044] In addition, the selection results can be stored for subsequent query. For example, a storage file named Placement can be defined in the form of CRD to store the scheduling requirements and scheduling results of the application. The scheduling requirements can include deployment location requirements, such as the requirements to schedule the application to a certain area, or the requirements to avoid scheduling the application to a certain area. The scheduling result can be the selection result mentioned above. In addition, the storage file can be maintained by the central service cluster.
[0045] In step S24, the application deployed by the central service cluster is scheduled to the first target edge service cluster. This step can be performed on the central service cluster to schedule the application deployed in the central service cluster to the first target edge service cluster.
[0046] By adopting the above technical solution, since the application initially deployed in the central service cluster is an application packaged by all the services on which the application depends, and according to the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that adapts to the deployment requirements and resource requirements of the application is selected from the multiple edge service clusters, and then the application deployed by the central service cluster is scheduled to the first target edge service cluster. Therefore, since the application is an application packaged by all the services on which the application depends, all the services on which the application depends can be scheduled as a whole during application scheduling, thereby ensuring the overall cross-cluster scheduling or migration of all services on which the application depends, solving the problem in the related technology that some services in the application are not successfully scheduled or migrated across clusters due to the separate scheduling of each service on which the application depends, thereby causing different services on which the application depends to be unable to access each other, solving the scheduling requirements of multiple services on which the application depends in a distributed cluster, and improving the efficiency of resource utilization.
[0047] In some embodiments, the edge computing-based application scheduling method according to the embodiment of the present disclosure may also include: decomposing the application into multiple independent services based on the service dimension through the application controller deployed in the first target edge service cluster.
[0048] For example, the services that the application depends on include service A and service B. By having the application controller on the first target edge service cluster decompose the application based on the service dimension, an independent service A and an independent service B can be obtained.
[0049] By decomposing the application, service A and service B can run independently, ensuring that the application can run on the first target edge service cluster.
[0050] In some embodiments, the edge computing-based application scheduling method according to the embodiment of the present disclosure may further include: obtaining the state of the application in the first target edge service cluster; if the state of the application is abnormal, rescheduling the application to the first target edge service cluster. This step may be performed on the central service cluster.
[0051] By acquiring the status of the application in the first target edge service cluster, when the status of the application is abnormal, the application can be rescheduled to the first target edge service cluster in a timely manner, thereby ensuring the operation of the application on the first target edge service cluster.
[0052] In some embodiments, the edge computing-based application scheduling method according to the embodiment of the present disclosure may further include: obtaining the cluster status of the multiple edge service clusters regularly through the cluster controller in the central service cluster, and when it is found that the first target edge service cluster is in an abnormal state after scheduling the application, rescheduling the application to the second target edge service cluster. This step can be performed on the central service cluster.
[0053] The cluster controller in the central service cluster can obtain the cluster status of multiple edge service clusters in real time or periodically.
[0054] The implementation manner of determining the second target edge service cluster may refer to the implementation manner of determining the first target edge service cluster described above, and will not be repeated here.
[0055] In addition, after the rescheduling is completed, the state of successful application deployment can be synchronized to the application state table, and the application can be deleted in the first target edge service cluster. The application state table can be maintained by the central service cluster.
[0056] By adopting the above technical solution, when the first target edge service cluster fails, the application rescheduling mechanism can be triggered to migrate the entire application to other suitable edge service clusters outside the first target edge service cluster, thereby realizing disaster recovery function, maintaining the availability of the application, and alleviating the application downtime problem that may occur in the case of cluster failure in related technologies. Moreover, since the application is migrated across clusters as a whole, the problem in related technologies that some services in the application are not successfully migrated across clusters due to the individual services on which the application depends being migrated across clusters separately, thus improving the efficiency of resource use.
[0057] In some embodiments, the edge computing-based application scheduling method according to the embodiment of the present disclosure may further include: controlling the computing nodes in the edge service cluster by the control node in the edge service cluster.
[0058] That is, each edge service cluster (for example, the first target edge service cluster and the second target edge service cluster described above) includes both control nodes and computing nodes, wherein the control nodes are responsible for scheduling and managing resources in the edge service cluster, and the computing nodes are responsible for running various applications (for example, containerized applications) in the edge service cluster. By including both control nodes and computing nodes, the edge service cluster can be run as an independent cluster, so that the autonomy of the edge service cluster can be achieved in the scenario where the edge service cluster is disconnected from the central service cluster.
[0059] Figure 3 The present invention is a schematic block diagram of an edge computing-based application scheduling device according to an embodiment of the present invention. The edge computing-based application scheduling device can be applied to application scheduling scenarios in edge clusters, such as cross-cluster scheduling scenarios of applications, especially cross-cluster scheduling scenarios of applications in PaaS platforms. Figure 3 As shown, the application scheduling device based on edge computing may include: a deployment module 31, used to initially deploy an application in a central service cluster, wherein the application is an application packaged by all services on which the application depends; a determination module 32, used to determine the deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the application to run; a selection module 33, used to select a first target edge service cluster that is adapted to the deployment requirements and resource requirements of the application from the multiple edge service clusters according to the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters; a synchronization module 34, used to schedule the application deployed by the central service cluster to the first target edge service cluster.
[0060] The application can be initially deployed on the central service cluster. The deployment module 31, the determination module 32, the selection module 33 and the synchronization module 34 can be located on the central service cluster. The edge service cluster and the central service cluster can be k8s clusters or other types of clusters.
[0061] By adopting the above technical solution, since the application initially deployed in the central service cluster is an application packaged by all the services on which the application depends, and according to the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that adapts to the deployment requirements and resource requirements of the application is selected from the multiple edge service clusters, and then the application deployed by the central service cluster is scheduled to the first target edge service cluster. Therefore, since the application is an application packaged by all the services on which the application depends, all the services on which the application depends can be scheduled as a whole during application scheduling, thereby ensuring the overall cross-cluster scheduling or migration of all services on which the application depends, solving the problem in the related technology that some services in the application are not successfully scheduled or migrated across clusters due to the separate scheduling of each service on which the application depends, thereby causing different services on which the application depends to be unable to access each other, solving the scheduling requirements of multiple services on which the application depends in a distributed cluster, and improving the efficiency of resource utilization.
[0062] Optionally, the deployment module 31 initially deploys the application in the central service cluster, which may include: The application is initially deployed in the central service cluster in the form of a custom resource definition and the deployment requirements of the application and the resource requirements corresponding to each of the services included in the application are set during the initial deployment, wherein the resource requirements corresponding to each of the services include CPU requirements and memory requirements.
[0063] Optionally, the determining module 32 determining the resource requirement of the application may include: determining the resource requirement of the application according to the resource requirements of each of the services on which the application depends; The selection module 33 selects a first target edge service cluster that is adapted to the deployment requirements and the resource requirements of the application from the multiple edge service clusters according to the deployment requirements and the resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, which may include: Regularly obtaining the cluster status of the multiple edge service clusters through the cluster controller in the central service cluster; The first target edge service cluster that meets the deployment requirement and the resource requirement of the application is selected from the multiple edge service clusters according to the cluster states of the multiple edge service clusters.
[0064] Optionally, the edge computing-based application scheduling device may further include: The application controller deployed in the first target edge service cluster is used to decompose the application into multiple independent services based on the service dimension.
[0065] Optionally, the edge computing-based application scheduling device may further include a cluster controller located in the central service cluster, configured to periodically obtain cluster status of the multiple edge service clusters; and The rescheduling module is configured to execute rescheduling to reschedule the application to a second target edge service cluster when it is found that the first target edge service cluster is in an abnormal state after scheduling the application.
[0066] Optionally, the edge computing-based application scheduling device may also include: a status synchronization module, used to synchronize the successful deployment status of the application to the application status table after the rescheduling is completed; and a deletion module, used to delete the application in the first target edge service cluster.
[0067] Optionally, the edge computing-based application scheduling device may further include a control node and a computing node located in the edge service cluster, wherein: the control node controls the operation of the computing node.
[0068] The specific implementation methods of the operations performed by each module in the edge computing-based application scheduling device according to the embodiment of the present disclosure have been described in detail in the relevant edge computing-based application scheduling method, and will not be repeated here.
[0069] Figure 4 It is a schematic diagram of an application scheduling architecture based on edge computing according to an embodiment of the present disclosure.
[0070] like Figure 4As shown, the overall architecture of the edge computing-based application scheduling architecture according to the embodiment of the present disclosure is a distributed cluster architecture in which clusters are deployed on clusters. For example, the entire application scheduling architecture includes a central service cluster 10 and edge service clusters 201, 202, and 203, wherein a control node (not shown) is deployed in the central service cluster 10, and a control node 21 is also deployed in the edge service clusters 201, 202, and 203, so that the edge service clusters 201, 202, and 203 can be operated as independent clusters, so that the autonomy of the edge service clusters 201, 202, and 203 can be achieved in the scenario where the edge service clusters 201, 202, and 203 are disconnected from the central service cluster 10, that is, the edge service clusters 201, 202, and 203 can still maintain the normal operation of the applications thereon by themselves. Computing nodes (not shown) are also deployed in the edge service clusters 201, 202, and 203. Edge service cluster 201 is located in Internet Data Center (IDC) 110, edge service cluster 202 is located in IDC 120, edge service cluster 203 is located in IDC 130, and IDC 110 and IDC 120 are deployed in region 100. Central service cluster 10 and edge service clusters 201, 202, and 203 can be k8s clusters or other types of clusters. In addition, it should be noted that Figure 4 In the description, the number of edge service clusters, the number of IDCs, the number of edge service clusters in each IDC, and the number of IDCs in each region are all examples and do not constitute limitations to the present disclosure.
[0071] A central scheduler 41 , a central rescheduler 43 , an application synchronizer 42 , and a cluster controller 44 are deployed in the central service cluster 10 to implement cross-cluster scheduling or migration of applications initially deployed in the central service cluster 10 .
[0072] The application may be an application packaged from all services on which the application depends. The application may be initially deployed in the central service cluster 10 in the form of a CRD, so that application services can be provided in a cloud-native manner. The application is obtained by packaging all services on which the application depends, and the application can be deployed and scheduled as a whole in the central service cluster 10, for example, the application can be sent as a whole to the corresponding edge service cluster.
[0073] The cluster controller 44 obtains the cluster status of each edge service cluster 201, 202 and 203 in real time or regularly, for example, the remaining allocatable resources of the cluster, the region to which the cluster belongs, cluster faults and other information, and synchronizes the obtained cluster status information to the cluster status storage file 46 in the central service cluster 10. The remaining allocatable resources of the cluster may include the remaining allocatable CPU resources and the remaining allocatable memory resources. The cluster status storage file 46 may be a storage file defined in the form of CRD. The cluster status storage file 46 may include information such as cluster attributes, total cluster resources, remaining allocatable resources of the cluster, cluster fault information, the region to which the cluster belongs, and the IDC to which the cluster belongs.
[0074] The central scheduler 41 determines the resource requirements of the application according to the resource requirements of each service on which the application depends, and determines the first target edge service cluster according to the resource requirements and deployment requirements of the application and the cluster status of each edge service cluster. The implementation method of determining the first target edge service cluster has been described in detail in the previous text and will not be repeated here. The central scheduler 41 can obtain the cluster status information of each edge service cluster from the cluster status storage file 46. After selecting the first target edge service cluster, the central scheduler 41 can store the selection result in the deployment location storage file 45. The deployment location storage file 45 can be a storage file defined in the form of CRD, which is used to store the scheduling demands and scheduling results of the application, wherein the scheduling demands may include deployment location requirements, such as the demands to which area the application is scheduled, or the demands to avoid scheduling the application to which area, and the scheduling results may be the aforementioned selection results. The operations performed by the central scheduler 41 are similar to the operations performed by the determination module 32 and the selection module 33 in the previous text, and have been described in detail in the relevant methods, which will not be repeated here.
[0075] The application synchronizer 42 can monitor the selection result in the deployment location storage file 45. If it is monitored that the target edge service cluster of the application has been selected, the application is synchronized to the selected target edge service cluster, such as the first target edge service cluster. The operation performed by the application synchronizer 42 is similar to the operation performed by the synchronization module 34 in the above text, and has been described in detail in the relevant method, which will not be repeated here.
[0076] The control node 21 of the edge service cluster may include an application controller 22, which is used to decompose the application synchronized to the edge service cluster into independent services. For example, assuming that the services the application depends on include service A and service B, the application controller 22 will decompose the application into independent service A and independent service B.
[0077] In addition, the application synchronizer 42 can also obtain the application status (that is, the status of the application, or the status of each decomposed independent service) in each edge service cluster 201, 202 and 203, and return the obtained application status in real time to the application status table in the central service cluster 10. Moreover, if the application status is abnormal, the application synchronizer 42 can also reschedule the application from the central service cluster 10 to the first target edge service cluster.
[0078] At this point, the initial scheduling of the application is completed.
[0079] Furthermore, if a failure occurs in the first target edge service cluster, the cluster controller 44 will synchronize the failure information to the cluster state storage file 46 .
[0080] The central rescheduler 43 monitors the cluster state storage file 46 in real time. If it is detected that the first target edge service cluster fails, the application on the first target edge service cluster will be rescheduled to another suitable target edge service cluster (such as the second target edge service cluster), and the deployment location storage file 45 will be updated. The rescheduling process is similar to the scheduling process performed by the central scheduler 41, and will not be repeated here.
[0081] If the application synchronizer 42 monitors that the scheduling result in the deployment location storage file 45 has changed, it will delete the application from the first target edge service cluster (if the first target edge service cluster is disconnected, this operation is ignored), and synchronize the application from the central service cluster 10 to the second target edge service cluster. In addition, the application synchronizer 42 can also synchronize the status of successful application deployment to the application status table of the central service cluster 10.
[0082] At this point, the rescheduling of the application is completed.
[0083] By adopting the above technical solution, since the application initially deployed in the central service cluster is an application packaged by all the services on which the application depends, and according to the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that adapts to the deployment requirements and resource requirements of the application is selected from the multiple edge service clusters, and then the application deployed by the central service cluster is scheduled to the first target edge service cluster. Therefore, since the application is an application packaged by all the services on which the application depends, all the services on which the application depends can be scheduled as a whole during application scheduling, thereby ensuring the overall cross-cluster scheduling or migration of all services on which the application depends, solving the problem in the related technology that some services in the application are not successfully scheduled or migrated across clusters due to the separate scheduling of each service on which the application depends, thereby causing different services on which the application depends to be unable to access each other, solving the scheduling requirements of multiple services on which the application depends in a distributed cluster, and improving the efficiency of resource utilization. In addition, when a failure occurs in the first target edge service cluster, the application rescheduling mechanism can be triggered to migrate the entire application to other suitable edge service clusters outside the first target edge service cluster, thereby realizing disaster recovery function, maintaining application availability, and alleviating the application downtime problem that may occur in the event of a cluster failure in related technologies.
[0084] The present disclosure also provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the steps of any method described in the present disclosure are implemented.
[0085] The present disclosure also provides an electronic device, comprising: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of any method described in the present disclosure.
[0086] The present disclosure also provides a computer program product, comprising a computer program, which implements the steps of any one of the methods of the present disclosure when executed by a processor.
[0087] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 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, laptop 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 5The 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.
[0088] like Figure 5 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.
[0089] 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 5 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.
[0090] 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.
[0091] It should be noted that the computer-readable medium mentioned above in the present disclosure 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 can 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, which carries a computer-readable program code. 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. Computer readable signal media may also be any computer readable medium other than computer readable storage media, 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 appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0092] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may 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.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0094] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: initially deploys an application in a central service cluster, wherein the application is an application packaged by all services on which the application depends; determines the deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the application to run; selects a first target edge service cluster from the multiple edge service clusters that is adapted to the deployment requirements and resource requirements of the application based on the deployment requirements and resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters; and schedules the application deployed by the central service cluster to the first target edge service cluster.
[0095] 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 the case of 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., through the Internet using an Internet service provider).
[0096] 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.
[0097] The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not limit the module itself in some cases. For example, the synchronization module may also be described as "a module for scheduling the application deployed by the central service cluster to the first target edge service cluster".
[0098] 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.
[0099] 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 device, 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.
[0100] According to one or more embodiments of the present disclosure, Example 1 provides an application scheduling method based on edge computing, including: Initially deploying an application in a central service cluster, wherein the application is an application packaged from all services that the application depends on; Determining deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the application to run; According to the deployment requirements and the resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, selecting a first target edge service cluster that is adapted to the deployment requirements and the resource requirements of the application from the multiple edge service clusters; The application deployed by the central service cluster is scheduled to the first target edge service cluster.
[0101] According to one or more embodiments of the present disclosure, Example 2 provides the edge computing-based application scheduling method of Example 1, wherein the initial deployment of the application in the central service cluster includes: The application is initially deployed in the central service cluster in the form of a custom resource definition and the deployment requirements of the application and the resource requirements corresponding to each of the services included in the application are set during the initial deployment, wherein the resource requirements corresponding to each of the services include CPU requirements and memory requirements.
[0102] According to one or more embodiments of the present disclosure, Example 3 provides the edge computing-based application scheduling method of Example 1, wherein the determining the resource requirements of the application includes: determining the resource requirements of the application according to the resource requirements of each of the services on which the application depends; The selecting, according to the deployment requirement and the resource requirement of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that is adapted to the deployment requirement and the resource requirement of the application from the multiple edge service clusters includes: Regularly obtaining the cluster status of the multiple edge service clusters through the cluster controller in the central service cluster; The first target edge service cluster that meets the deployment requirement and the resource requirement of the application is selected from the multiple edge service clusters according to the cluster states of the multiple edge service clusters.
[0103] According to one or more embodiments of the present disclosure, Example 4 provides the edge computing-based application scheduling method of Example 1, wherein the method further includes: The application is decomposed into multiple independent services based on the service dimension through the application controller deployed in the first target edge service cluster.
[0104] According to one or more embodiments of the present disclosure, Example 5 provides the edge computing-based application scheduling method of Example 1, wherein the method further includes: The cluster status of the multiple edge service clusters is periodically obtained through the cluster controller in the central service cluster. When it is found that the first target edge service cluster is in an abnormal state after scheduling the application, rescheduling is performed to reschedule the application to the second target edge service cluster.
[0105] According to one or more embodiments of the present disclosure, Example 6 provides the edge computing-based application scheduling method of Example 5, wherein the method further includes: After the rescheduling is completed, the status of successful application deployment is synchronized to the application status table, and the application is deleted from the first target edge service cluster.
[0106] According to one or more embodiments of the present disclosure, Example 7 provides an edge computing-based application scheduling method according to any one of Examples 1 to 6, wherein the method further includes: The computing nodes in the edge service cluster are controlled by a control node in the edge service cluster.
[0107] According to one or more embodiments of the present disclosure, Example 8 provides an application scheduling device based on edge computing, including: A deployment module, used for initially deploying an application in a central service cluster, wherein the application is an application packaged by all services on which the application depends; A determination module, used to determine the deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the operation of the application; A selection module, configured to select, from the multiple edge service clusters, a first target edge service cluster that meets the deployment requirements and the resource requirements of the application according to the deployment requirements and the resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters; A synchronization module is used to schedule the application deployed by the central service cluster to the first target edge service cluster.
[0108] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-7 when executed by a processing device.
[0109] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-7.
[0110] According to one or more embodiments of the present disclosure, Example 11 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1 to 7 when executed by a processor.
[0111] 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.
[0112] 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.
[0113] 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. An application scheduling method based on edge computing, characterized in that: include: Initially deploying an application in a central service cluster, wherein the application is an application packaged from all services that the application depends on; Determining deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the application to run; According to the deployment requirements and the resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters, selecting a first target edge service cluster that is adapted to the deployment requirements and the resource requirements of the application from the multiple edge service clusters; The application deployed by the central service cluster is scheduled to the first target edge service cluster.
2. The edge computing-based application scheduling method according to claim 1, characterized in that: The initial deployment of the application in the central service cluster includes: The application is initially deployed in the central service cluster in the form of a custom resource definition and the deployment requirements of the application and the resource requirements corresponding to each of the services included in the application are set during the initial deployment, wherein the resource requirements corresponding to each of the services include CPU requirements and memory requirements.
3. The edge computing-based application scheduling method according to claim 1, characterized in that: The determining the resource requirement of the application comprises: determining the resource requirement of the application according to the resource requirements of each of the services on which the application depends; The selecting, according to the deployment requirement and the resource requirement of the application and the cluster status of each edge service cluster in the multiple edge service clusters, a first target edge service cluster that is adapted to the deployment requirement and the resource requirement of the application from the multiple edge service clusters includes: Regularly obtaining the cluster status of the multiple edge service clusters through the cluster controller in the central service cluster; The first target edge service cluster that meets the deployment requirement and the resource requirement of the application is selected from the multiple edge service clusters according to the cluster states of the multiple edge service clusters.
4. The edge computing-based application scheduling method according to claim 1, characterized in that: The method further comprises: The application is decomposed into multiple independent services based on the service dimension through the application controller deployed in the first target edge service cluster.
5. The edge computing-based application scheduling method according to claim 1, characterized in that: The method further comprises: The cluster status of the multiple edge service clusters is periodically obtained through the cluster controller in the central service cluster. When it is found that the first target edge service cluster is in an abnormal state after scheduling the application, rescheduling is performed to reschedule the application to the second target edge service cluster.
6. The edge computing-based application scheduling method according to claim 5, characterized in that: The method further comprises: After the rescheduling is completed, the status of successful application deployment is synchronized to the application status table, and the application is deleted from the first target edge service cluster.
7. The edge computing-based application scheduling method according to any one of claims 1 to 6, characterized in that: The method further comprises: The computing nodes in the edge service cluster are controlled by a control node in the edge service cluster.
8. An application scheduling device based on edge computing, characterized in that: include: A deployment module, used for initially deploying an application in a central service cluster, wherein the application is an application packaged by all services on which the application depends; A determination module, used to determine the deployment requirements and resource requirements of the application, wherein the resource requirements are used to indicate the resource conditions required for the operation of the application; A selection module, configured to select, from the multiple edge service clusters, a first target edge service cluster that meets the deployment requirements and the resource requirements of the application according to the deployment requirements and the resource requirements of the application and the cluster status of each edge service cluster in the multiple edge service clusters; A synchronization module is used to schedule the application deployed by the central service cluster to the first target edge service cluster.
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.
