Cluster processing methods, apparatus, equipment and computer-readable storage media
By combining Serverless technology and the Knative framework with the Eggo tool and GitOps engine, the automatic creation and management of clusters is achieved, solving the problem of insufficient or wasted cluster resources, improving the rational utilization and dynamic stability of resources, and enhancing the user experience.
Patent Information
- Application Number
- CN202310169913.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-16
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-02-16
AI Technical Summary
In existing technologies, the compatibility between clusters and applications is low, leading to insufficient or wasted cluster resources. Existing scaling methods cannot replenish and reclaim cluster resources in a timely manner.
By employing Serverless technology and the Knative framework, combined with the Eggo tool and GitOps engine, the system enables automatic cluster creation, management, and resource reclamation and replenishment. Through the matching of middleware services and application deployment resources at different levels, the system automatically creates target clusters and performs real-time monitoring and replenishment based on resource usage.
It improves the rational utilization and adaptability of cluster resources, ensures the dynamic stability and availability of cluster resources, avoids resource waste, and enhances the user experience.
Smart Images

Figure CN116225703B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and in particular relates to a cluster processing method, apparatus, device and computer-readable storage medium. Background Technology
[0002] Currently, users typically create clusters manually and then assign them to successfully deployed applications via a platform or tool. However, creating clusters in this way often results in low compatibility between the cluster and the application, easily leading to insufficient or wasted cluster resources. Summary of the Invention
[0003] This application provides a cluster processing method, apparatus, device, computer-readable storage medium, and computer program product that can ensure the compatibility between the target cluster and the target application, thereby ensuring the rational utilization of cluster resources.
[0004] In a first aspect, embodiments of this application provide a cluster processing method, the method comprising:
[0005] Receive user application information for creating a target cluster. The application information includes configuration information corresponding to the target cluster. The configuration information includes middleware service information and application deployment resource information corresponding to the target code.
[0006] In response to the application information, a first level corresponding to the first middleware service is obtained based on the middleware service information, and a second level corresponding to the application deployment resource is obtained based on the application deployment resource information;
[0007] Match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool;
[0008] Based on the target middleware service and the target application deployment resources, create the target cluster for the target code.
[0009] In one possible implementation, the method further includes:
[0010] In response to the application information, a target application corresponding to the target code is created;
[0011] After creating the target cluster for the target code, the method further includes:
[0012] In the target cluster, the target middleware service is associated and the target application is deployed according to the configuration information.
[0013] In one possible implementation, the method further includes:
[0014] The cluster in the cluster pool is deleted, supplemented, or reserved at least one of the following: the cluster is deleted, supplemented, or reserved, and the cluster includes the target cluster.
[0015] In one possible implementation, deleting a cluster from the cluster pool includes:
[0016] Monitor the status of a first resource in the cluster, the first resource including a second middleware service and an application;
[0017] If both the second middleware service and the application cease to be used, the cluster is deleted.
[0018] In one possible implementation, supplementing the clusters in the cluster pool includes:
[0019] Monitor the status of a second resource in the cluster, the second resource including any one of central processing unit metrics, memory metrics, input / output metrics, and node metrics;
[0020] If the utilization rate of the second resource is greater than a preset threshold, a supplementary resource corresponding to the second resource is determined based on the utilization rate and the preset threshold.
[0021] The second resource is supplemented according to the supplementary resource.
[0022] In one possible implementation, storing the clusters in the cluster pool includes:
[0023] Obtain historical resource data corresponding to the cluster;
[0024] Statistical analysis is performed on the historical resource data to calculate the target resource data, which is the resource data that needs to be added to create a cluster after a preset time.
[0025] Cluster resources are stored based on the target resource data.
[0026] Secondly, embodiments of this application provide a cluster processing apparatus, the apparatus comprising:
[0027] The receiving module is used to receive application information from a user for creating a target cluster. The application information includes configuration information corresponding to the target cluster, and the configuration information includes middleware service information and application deployment resource information corresponding to the target code.
[0028] The acquisition module is used to respond to the application information, acquire the first level corresponding to the first middleware service based on the middleware service information, and acquire the second level corresponding to the application deployment resource based on the application deployment resource information;
[0029] The matching module is used to match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool;
[0030] The first creation module is used to create the target cluster for the target code based on the target middleware service and the target application deployment resources.
[0031] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;
[0032] When the processor executes the computer program instructions, it implements any of the possible implementations of the first aspect described above.
[0033] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the method in any of the possible implementations of the first aspect described above.
[0034] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a method as described in any of the possible implementations of the first aspect above.
[0035] The cluster processing method, apparatus, device, computer-readable storage medium, and computer program product of this application embodiment, upon receiving application information from a user for creating a target cluster, obtains a first level corresponding to a first middleware service and a second level corresponding to an application deployment resource based on middleware service information and application deployment resource information corresponding to the target code in the application information, thereby accurately determining the resource information required to create the target cluster. By matching the target middleware service corresponding to the first level and the target application deployment resource corresponding to the second level in the cluster pool, and creating the target cluster based on the matched target middleware service and target application deployment resource, the target cluster can be automatically created based on the resource information required to create the target cluster. Since the target cluster is created for target code, the resource information required to create the target cluster is the same as the resource information required by the target application corresponding to the target code, thus enabling the target cluster to be allocated to the target application on demand. Therefore, according to the embodiments of this application, the compatibility between the target cluster and the target application can be guaranteed, thereby ensuring the rational utilization of cluster resources. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a schematic diagram of an overall design scheme for cluster processing provided in an embodiment of this application;
[0038] Figure 2 This is a flowchart illustrating a cluster processing method provided in an embodiment of this application;
[0039] Figure 3 This is a flowchart illustrating another cluster processing method provided in an embodiment of this application;
[0040] Figure 4 This is a schematic diagram of the structure of a cluster processing device provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0042] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0043] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0044] As described in the background section, in existing technologies, users typically create clusters manually and then allocate them to successfully deployed applications via a platform or tool. However, creating clusters in this way often results in low compatibility between the cluster and the application, easily leading to insufficient or wasted cluster resources. To ensure the rational utilization of cluster resources, the cluster can typically automatically scale up or down according to application needs during operation. However, scaling up and down can only be done on the basis of the existing cluster and cannot provide timely replenishment or reclamation of the cluster. Therefore, the existing methods for creating and managing clusters need improvement.
[0045] Therefore, in order to solve the problems of the prior art, embodiments of this application provide a cluster processing method, apparatus, device, computer-readable storage medium, and computer program product.
[0046] The overall design scheme of cluster processing provided in the embodiments of this application is described below.
[0047] This application provides a serverless-based automated cluster processing method. This method includes an automated cluster creation method and an automated cluster management method. Employing serverless technology and the Knative framework, it enables container-centric serverless cluster application management. Furthermore, combining the Eggo tool and GitOps engine, it facilitates automated deployment of large-scale production-level Kubernetes clusters, real-time tracking of deployment configurations, and cloud-native deployment.
[0048] The overall design scheme for cluster processing can be as follows: Figure 1 As shown.
[0049] Here, the code repository can include the code repository corresponding to project application code and the code repository corresponding to personal application code. Users can upload local project application code or personal application code to the corresponding code repository. For project application code, users can first create a project application service on the Serverless platform, and then associate the project application code repository with the created project application service.
[0050] In addition, users can configure the resources required for project or personal application deployment through the self-service workbench. These resources can include middleware, configuration information, initialization scripts, etc. After configuring the necessary resources, users can select the corresponding code repository and request a cluster environment.
[0051] After receiving a user's request for a cluster environment, the platform can automatically create and allocate clusters according to the rules (see below for the rules). Figure 2The relevant descriptions of the illustrated embodiments (which will not be repeated here) automatically create project-specific or personal private cluster environments within the Serverless cluster pool. Project-specific clusters can be automatically created within the project-specific cluster pool, and personal private clusters can be automatically created within the personal private cluster pool. After the project-specific or personal application private cluster application is successfully created, the user can perform automated CI / CD operations to run applications within the cluster environment.
[0052] The specific process of performing automated CICD operations can be summarized as follows:
[0053] First, the Serverless service automatically associates application code to generate a Serverless application. For project application code, since the user has already created a project application service on the Serverless platform and associated the project application code repository with the created service, the Serverless service can directly associate the application code. For personal application code, Serverless can automatically create a personal application service based on the corresponding code repository and cluster application information.
[0054] After the serverless application is generated, it triggers a build operation, performs CI, generates an image, and synchronizes it to the image repository. The image repository is then associated with the configuration repository. Simultaneously, the serverless application generates the application deployment YAML file, and after deployment, invokes the GitOps engine. The GitOps engine sends instructions to the ArgoCD tool and stores the YAML file in the configuration repository. ArgoCD, which manages project or personal application clusters, receives instructions from the GitOps engine and deploys the serverless application to the application cluster. Centralized management of cluster resources can be achieved through the serverless Knative and Eggo tools. Additionally, ArgoCD can monitor the configuration repository.
[0055] In addition, the platform can automatically reclaim and replenish cluster resources according to the rules (see below for the rules on automatic reclamation and replenishment of cluster resources). Figure 3 The relevant descriptions of the embodiments shown are not repeated here. The system automatically monitors and reclaims cluster resources released by the application, and automatically replenishes cluster resources based on historical data.
[0056] The cluster processing method provided in the embodiments of this application is described below.
[0057] Figure 2 A flowchart illustrating a cluster processing method provided in an embodiment of this application is shown. Figure 2As shown, the cluster processing method provided in this application embodiment includes the following steps: S210 to S240.
[0058] S210. Receive the user's application information for creating the target cluster. The application information includes configuration information corresponding to the target cluster. The configuration information includes middleware service information and application deployment resource information corresponding to the target code.
[0059] Here, the target code can include project application code and personal application code. After a user uploads their local target code to the code repository, they can apply to create a target cluster corresponding to the target code through the Serverless platform's self-service workbench. The application information for the target cluster can include resource information required to deploy the target application. The target application can be the application corresponding to the target code. Additionally, the resource information can include configuration information and initialization scripts. In the configuration information, middleware service information can include the first middleware service and its corresponding first level, and application deployment resource information can include application deployment resources and their corresponding second level.
[0060] Based on this, before receiving the user's application information for creating the target cluster, on the one hand, the middleware services can be designed into different levels according to factors such as the data scale, concurrent call scale, response and performance requirements of the middleware needed by the application. On the other hand, in the application cluster pool, the middleware services required by the application can be pre-configured, identified, deployed and started according to the middleware type and different design levels required by the application.
[0061] Furthermore, before receiving the user's application information for creating the target cluster, on the one hand, application deployment resources can be designed into different levels based on factors such as application deployment type, deployment file size, concurrent call scale, response and performance requirements. On the other hand, within the application cluster pool, application deployment resources can be pre-configured and identified according to the different levels designed for application deployment resources.
[0062] S220. In response to the application information, obtain the first level corresponding to the first middleware service based on the middleware service information, and obtain the second level corresponding to the application deployment resources based on the application deployment resource information.
[0063] S230. Match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool.
[0064] Here, based on the user's configuration requirements for middleware services, the corresponding level of middleware service can be automatically matched within the cluster pool. Additionally, based on the user's configuration requirements for application deployment resources, the corresponding level of application deployment resources can be automatically matched within the cluster pool.
[0065] S240. Create a target cluster for the target code based on the target middleware service and target application deployment resources. That is, a target cluster can be automatically created for the target code based on the matched middleware service and application deployment resources.
[0066] Based on this, in order to simplify user operations and improve user experience, some embodiments may further include:
[0067] In response to the application information, create a target application corresponding to the target code;
[0068] Based on this, after creating the target cluster for the target code, it may also include:
[0069] In the target cluster, the target middleware service is associated and the target application is deployed based on the configuration information.
[0070] Here, when the target code is project application code, since the user has already created a project application service on the Serverless platform and associated the project application code repository with the created project application service, the project application service can be directly associated with the application code to obtain the project application, i.e., the target application. When the target code is personal application code, Serverless can automatically create a personal application service based on the corresponding code repository and application information, and automatically create a personal application, i.e., the target application, based on the personal application service and the personal application code.
[0071] Once the target application is obtained, the middleware service can be automatically associated and the target application can be automatically deployed in the newly created cluster, i.e. the target cluster, based on the configuration information.
[0072] In this way, by automatically associating the target middleware service and deploying the target application in the target cluster, user operations can be simplified and the user experience improved.
[0073] The cluster processing method of this application embodiment, upon receiving a user's application information for creating a target cluster, obtains a first level corresponding to the first middleware service and a second level corresponding to the application deployment resources based on the middleware service information and application deployment resource information corresponding to the target code in the application information, thereby accurately determining the resource information required to create the target cluster. By matching the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool, and creating the target cluster based on the matched target middleware service and target application deployment resources, the target cluster can be automatically created according to the resource information required to create the target cluster. Since the target cluster is created for the target code, the resource information required to create the target cluster is the same as the resource information required by the target application corresponding to the target code, thus enabling the target cluster to be allocated to the target application on demand. In this way, according to the embodiments of this application, the compatibility between the target cluster and the target application can be guaranteed, thereby ensuring the rational utilization of cluster resources.
[0074] To maintain the dynamic stability of cluster resources and improve the availability of the cluster environment and user experience, as another implementation of this application, this application also provides another implementation of the cluster processing method, as detailed in the following embodiments.
[0075] Please see Figure 3 The cluster processing method provided in this application embodiment may include the following steps:
[0076] S310. Receive the user's application information for creating the target cluster. The application information includes configuration information corresponding to the target cluster. The configuration information includes middleware service information and application deployment resource information corresponding to the target code.
[0077] S320. In response to the application information, obtain the first level corresponding to the first middleware service based on the middleware service information, and obtain the second level corresponding to the application deployment resources based on the application deployment resource information;
[0078] S330. Match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool;
[0079] S340. Create a target cluster for the target code based on the target middleware service and the target application deployment resources;
[0080] S350. Delete, supplement, or reserve at least one cluster in the cluster pool, where the cluster includes the target cluster.
[0081] This application embodiment manages the clusters in the cluster pool (i.e., delete, supplement, or reserve at least one of them), which enables timely recycling of cluster resources when users no longer use the cluster environment and timely replenishment of cluster resources when they are insufficient, thereby maintaining the dynamic stability of cluster resources and improving the availability of the cluster environment and user experience.
[0082] The specific implementation of the S350 described above is described below.
[0083] In some embodiments, in S350, the cluster pool can be a serverless cluster pool, which may include personal private cluster pools and project-specific cluster pools. This application embodiment can manage any cluster within the serverless cluster pool. Cluster management may include deleting clusters, adding clusters, and replenishing resources within the clusters.
[0084] Therefore, in order to ensure the full utilization of cluster resources and avoid waste of cluster resources, in some embodiments, the above-mentioned S350 may specifically include:
[0085] Monitor the status of the first resource in the cluster, which includes the second middleware service and application;
[0086] Delete the cluster if both the second middleware service and the application are no longer in use.
[0087] Here, a listener can monitor the usage of the primary resource in each cluster in real time. Specifically, the listener can monitor the usage of middleware services in real time, including whether applications connect to and invoke the middleware service. The listener can also monitor the application's activity status in real time.
[0088] Clusters that no longer use middleware services and whose deployed applications are no longer invoked can be recycled. The recycling process may include: stopping the application's connection to and calls to the middleware service; stopping the application and deleting its related configuration information and data; and deleting the application and cluster resources (personal or project namespaces, PODs, Services, images, and deployment files, etc.).
[0089] In this way, by promptly reclaiming cluster resources when users no longer use the cluster environment, we can ensure the full utilization of cluster resources and avoid wasting them.
[0090] In addition, to ensure full utilization of cluster resources and avoid waste, a usage period for the cluster can be set in the configuration information. Once the usage period is reached, the cluster can be automatically deleted.
[0091] Therefore, in order to ensure the normal operation of the cluster, in some embodiments, the above-mentioned S350 may specifically include:
[0092] Monitor the status of the second resource in the cluster. The second resource includes any one of the following: CPU metrics, memory metrics, input / output metrics, and node metrics.
[0093] If the utilization rate of the second resource is greater than a preset threshold, a supplementary resource corresponding to the second resource is determined based on the utilization rate and the preset threshold.
[0094] The second resource is supplemented based on the supplementary resources.
[0095] Here, for each node resource in the cluster, three control metrics can be selected: Central Processing Unit (CPU), memory, and Input / Output (I / O). For each control metric, two control parameters can be selected: evaluation weight (W) and control limit (L). Based on this, the preset threshold can include the CPU control limit L corresponding to the CPU metric. cpu Memory control limit L corresponding to memory metrics mem I / O control limits L corresponding to I / O indicators i / o And the Node control limit L corresponding to the Node indicator. node Additionally, the CPU evaluation weight value corresponding to the CPU metric can be W. cpu The memory evaluation weight value corresponding to the memory metric can be W. mem The I / O evaluation weight value corresponding to the I / O index can be W. i / o .
[0096] As an example, a listener can be used to obtain the usage status of the second resource in a cluster. Specifically, the listener can monitor the CPU utilization R of each node. cpu Memory utilization rate R mem and I / O utilization R i / o Through R cpu R mem and R i / o The utilization rate of each Node can be calculated: R node =W cpu ·R cpu +W mem ·R mem +W i / o ·R i / o .
[0097] As an example, through statistical R... cpu >L cpuThe system can automatically calculate and assess CPU resource requirements; by statistically analyzing R... mem >L mem The system can automatically calculate and assess memory resource requirements; through statistical analysis of R... i / o >L i / o The system can automatically calculate and assess I / O resource requirements; through statistical analysis of R... node >L node The system can automatically calculate and assess the resource requirements of each node. Through comprehensive analysis, it can determine the necessary CPU, memory, I / O, and node resources to be replenished and provided in a timely manner.
[0098] In this way, by obtaining the usage status of the secondary resources in the cluster in real time, and replenishing them in a timely manner when the secondary resources are insufficient, the normal operation of the cluster can be guaranteed.
[0099] Therefore, in order to ensure timely and effective supply of clusters in the event of sudden needs, in some embodiments, the above-mentioned S350 may specifically include:
[0100] Retrieve historical resource data corresponding to the cluster;
[0101] Perform statistical analysis on historical resource data to calculate target resource data, which is the amount of resources needed to create a cluster after a preset time.
[0102] Cluster resources are reserved based on the target resource data.
[0103] Here, historical resource data can include historical application data and historical usage data.
[0104] As an example, after obtaining historical resource data corresponding to the cluster, on the one hand, historical application and usage data can be statistically analyzed to determine the development trend of cluster applications and usage, resulting in a trend chart. On the other hand, year-on-year and month-on-month analyses can be performed on historical application and usage data to obtain year-on-year and month-on-month analysis charts. Thus, by combining the trend chart, year-on-year analysis chart, and month-on-month analysis chart, it is possible to calculate the future need for additional cluster resources, make advance preparations, and replenish resources promptly in case of unforeseen needs.
[0105] In this way, by reserving cluster resources in advance based on the historical resource data corresponding to the cluster, it is possible to ensure timely and effective supply of cluster resources when there is an emergency.
[0106] In addition to the above, other steps of the method in the embodiments of this application can be found in the above text. Figure 2 The relevant descriptions of the embodiments shown will not be repeated here.
[0107] Based on the cluster processing method provided in the above embodiments, this application also provides specific implementations of a cluster processing device. Please refer to the following embodiments.
[0108] like Figure 4 As shown, the cluster processing device 400 provided in this embodiment includes the following modules:
[0109] The receiving module 410 is used to receive the application information from the user for creating the target cluster. The application information includes the configuration information corresponding to the target cluster. The configuration information includes the middleware service information and application deployment resource information corresponding to the target code.
[0110] The acquisition module 420 is used to respond to the application information, acquire the first level corresponding to the first middleware service based on the middleware service information, and acquire the second level corresponding to the application deployment resources based on the application deployment resource information;
[0111] Matching module 430 is used to match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool;
[0112] The first creation module 440 is used to create a target cluster for the target code based on the target middleware service and the target application deployment resources.
[0113] The cluster processing device 400 described above will be described in detail below:
[0114] In some embodiments, the cluster processing device 400 may further include:
[0115] The second creation module is used to create a target application corresponding to the target code in response to the application information.
[0116] Based on this, the cluster processing device 400 may further include:
[0117] The association module is used to associate target middleware services and deploy target applications within the target cluster based on configuration information after creating the target cluster for the target code.
[0118] In some embodiments, the cluster processing device 400 may further include:
[0119] The management module is used to delete, add, or reserve at least one cluster in the cluster pool, including the target cluster.
[0120] In some embodiments, the management module may specifically include:
[0121] The first listening submodule is used to monitor the status of the first resource in the cluster. The first resource includes the second middleware service and application.
[0122] The delete submodule is used to delete the cluster when both the second middleware service and the application are no longer in use.
[0123] In some embodiments, the management module may specifically include:
[0124] The second monitoring submodule is used to monitor the status of the second resource in the cluster. The second resource includes any one of the following: CPU metrics, memory metrics, input / output metrics, and node metrics.
[0125] The determination submodule is used to determine the supplementary resource corresponding to the second resource based on the utilization rate and the preset threshold when the utilization rate of the second resource is greater than the preset threshold.
[0126] The supplementary submodule is used to supplement the second resource based on the supplementary resources.
[0127] In some embodiments, the management module may specifically include:
[0128] The acquisition submodule is used to acquire historical resource data corresponding to the cluster;
[0129] The analysis submodule is used to perform statistical analysis on historical resource data and calculate target resource data, which is the resource data that needs to be added to create a cluster after a preset time.
[0130] The reserve submodule is used to reserve cluster resources based on target resource data.
[0131] The cluster processing apparatus of this application embodiment, upon receiving a user's application information for creating a target cluster, obtains a first level corresponding to the first middleware service and a second level corresponding to the application deployment resources based on the middleware service information and application deployment resource information corresponding to the target code in the application information, thereby accurately determining the resource information required to create the target cluster. By matching the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool, and creating the target cluster based on the matched target middleware service and target application deployment resources, the target cluster can be automatically created according to the resource information required to create the target cluster. Since the target cluster is created for the target code, the resource information required to create the target cluster is the same as the resource information required by the target application corresponding to the target code, thus enabling the target cluster to be allocated to the target application on demand. In this way, according to the embodiment of this application, the compatibility between the target cluster and the target application can be guaranteed, thereby ensuring the rational utilization of cluster resources.
[0132] Based on the cluster processing method provided in the above embodiments, this application also provides specific implementation methods for electronic devices. Figure 5A schematic diagram of an electronic device 500 provided in an embodiment of this application is shown.
[0133] Electronic device 500 may include processor 510 and memory 520 storing computer program instructions.
[0134] Specifically, the processor 510 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0135] Memory 520 may include mass storage for data or instructions. For example, and not limitingly, memory 520 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 520 may include removable or non-removable (or fixed) media. Where appropriate, memory 520 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 520 is non-volatile solid-state memory.
[0136] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this application.
[0137] The processor 510 implements any of the cluster processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 520.
[0138] In one example, electronic device 500 may also include communication interface 530 and bus 540. Wherein, as... Figure 5 As shown, the processor 510, memory 520, and communication interface 530 are connected through bus 540 and complete communication with each other.
[0139] The communication interface 530 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0140] Bus 540 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 540 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0141] For example, the electronic device 500 can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc.
[0142] The electronic device can execute the cluster processing method in the embodiments of this application, thereby achieving the combination Figures 2 to 4 The described cluster processing method and apparatus.
[0143] Furthermore, in conjunction with the cluster processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the cluster processing methods in the above embodiments.
[0144] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0145] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0146] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0147] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0148] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A cluster processing method, characterized in that, include: Based on the attributes of the middleware service, the middleware service is designed into multiple different middleware service levels; Based on the attributes of application deployment resources, application deployment resources are designed into multiple different application deployment resource levels; among them, the attributes of middleware services include data scale, concurrent call scale, and response and performance requirements; the attributes of application deployment resources include deployment type, deployment file size, concurrent call scale, and response and performance requirements. Receive user application information for creating a target cluster. The application information includes configuration information corresponding to the target cluster. The configuration information includes middleware service information and application deployment resource information corresponding to the target code. In response to the application information, a first level corresponding to the first middleware service is obtained from the middleware service level according to the middleware service information, and a second level corresponding to the application deployment resource is obtained from the application deployment resource level according to the application deployment resource information; Match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool; Based on the target middleware service and the target application deployment resources, create the target cluster for the target code.
2. The method according to claim 1, characterized in that, The method further includes: In response to the application information, a target application corresponding to the target code is created; After creating the target cluster for the target code, the method further includes: In the target cluster, the target middleware service is associated and the target application is deployed according to the configuration information.
3. The method according to claim 1, characterized in that, The method further includes: The cluster in the cluster pool is deleted, supplemented, or reserved at least one of the following: the cluster is deleted, supplemented, or reserved, and the cluster includes the target cluster.
4. The method according to claim 3, characterized in that, Deleting a cluster from the cluster pool includes: Monitor the status of a first resource in the cluster, the first resource including a second middleware service and an application; If both the second middleware service and the application cease to be used, the cluster is deleted.
5. The method according to claim 3, characterized in that, Supplementing the clusters in the cluster pool includes: Monitor the status of a second resource in the cluster, the second resource including any one of central processing unit metrics, memory metrics, input / output metrics, and node metrics; If the utilization rate of the second resource is greater than a preset threshold, a supplementary resource corresponding to the second resource is determined based on the utilization rate and the preset threshold. The second resource is supplemented according to the supplementary resource.
6. The method according to claim 3, characterized in that, The process of reserving clusters in the cluster pool includes: Obtain historical resource data corresponding to the cluster; Statistical analysis is performed on the historical resource data to calculate the target resource data, which is the resource data that needs to be added to create a cluster after a preset time. Cluster resources are stored based on the target resource data.
7. A cluster processing device, characterized in that, The device includes: The design module is used to design middleware services into multiple different middleware service levels based on their attributes; and to design application deployment resources into multiple different application deployment resource levels based on their attributes. The attributes of middleware services include data scale, concurrent call scale, and response and performance requirements; the attributes of application deployment resources include deployment type, deployment file size, concurrent call scale, and response and performance requirements. The receiving module is used to receive application information from a user for creating a target cluster. The application information includes configuration information corresponding to the target cluster, and the configuration information includes middleware service information and application deployment resource information corresponding to the target code. The acquisition module is configured to, in response to the application information, acquire a first level corresponding to the first middleware service from the middleware service levels according to the middleware service information, and acquire a second level corresponding to the application deployment resource from the application deployment resource levels according to the application deployment resource information; The matching module is used to match the target middleware service corresponding to the first level and the target application deployment resources corresponding to the second level in the cluster pool; The first creation module is used to create the target cluster for the target code based on the target middleware service and the target application deployment resources.
8. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the cluster processing method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the cluster processing method as described in any one of claims 1-6.
10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the cluster processing method as described in any one of claims 1-6.
Citation Information
Patent Citations
Cluster deployment method and device, computer equipment and storage medium
CN112527507A
Storage resource management method, device and system of container cluster
CN115562796A