CN116225703A - Cluster processing method, device, equipment and computer readable storage medium - Google Patents

Cluster processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116225703A
CN116225703A CN202310169913.5A CN202310169913A CN116225703A CN 116225703 A CN116225703 A CN 116225703A CN 202310169913 A CN202310169913 A CN 202310169913A CN 116225703 A CN116225703 A CN 116225703A
Authority
CN
China
Prior art keywords
cluster
target
application
resource
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310169913.5A
Other languages
Chinese (zh)
Inventor
陈国�
魏宝辉
周颖
李胜男
白国涛
张春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202310169913.5A priority Critical patent/CN116225703A/en
Publication of CN116225703A publication Critical patent/CN116225703A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/503Resource availability
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a cluster processing method, a cluster processing device, cluster processing equipment and a computer readable storage medium. Wherein the method comprises the following steps: receiving application information of a user for creating a target cluster, wherein the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code; responding to the application information, acquiring a first level corresponding to the first middleware service according to the middleware service information, and acquiring a second level corresponding to the application deployment resource according to the application deployment resource information; matching target middleware services corresponding to the first level in the cluster pool, and deploying resources with target applications corresponding to the second level; and establishing a target cluster for the target code according to the target middleware service and the target application deployment resource. According to the embodiment of the application, the adaptation degree between the target cluster and the target application can be ensured, and further the reasonable utilization of cluster resources can be ensured.

Description

Cluster processing method, device, equipment and computer readable storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, relates to a cluster processing method, apparatus, device, and computer readable storage medium.
Background
Currently, clusters are typically created manually by a user and assigned to successfully deployed applications by a platform or tool after cluster creation is complete. However, creating the cluster in the above manner often results in a low adaptation degree between the cluster and the application, which easily causes deficiency or waste of cluster resources.
Disclosure of Invention
The embodiment of the application provides a cluster processing method, a cluster processing device, cluster processing equipment, a computer readable storage medium and a computer program product, which can ensure the adaptation degree between a target cluster and a target application, and further can ensure the reasonable utilization of cluster resources.
In a first aspect, an embodiment of the present application provides a cluster processing method, where the method includes:
receiving application information of a user for creating a target cluster, wherein the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code;
responding to the application information, acquiring a first level corresponding to a first middleware service according to the middleware service information, and acquiring a second level corresponding to an application deployment resource according to the application deployment resource information;
matching a target middleware service corresponding to the first level in a cluster pool and deploying resources of a target application corresponding to the second level;
and establishing the target cluster for the target code according to the target middleware service and the target application deployment resource.
In one possible implementation, the method further includes:
responding to the application information, and creating a target application corresponding to the target code;
after the creating the target cluster for the target code, the method further includes:
and in the target cluster, associating the target middleware service and deploying the target application according to the configuration information.
In one possible implementation, the method further includes:
and deleting, supplementing and storing the clusters in the cluster pool, wherein the clusters comprise the target clusters.
In one possible implementation manner, the deleting the clusters in the cluster pool includes:
monitoring the state of a first resource in the cluster, wherein the first resource comprises a second middleware service and an application;
and deleting the cluster under the condition that the second middleware service and the application are out of use.
In one possible implementation, supplementing the clusters in the cluster pool includes:
monitoring the state of a second resource in the cluster, wherein the second resource comprises any one of a central processing unit index, a memory index, an input/output index and a node index;
determining a supplementary resource corresponding to the second resource according to the usage rate and the preset threshold under the condition that the usage rate corresponding to the second resource is larger than the preset threshold;
and supplementing the second resource according to the supplementing resource.
In one possible implementation, reserving the clusters in the cluster pool includes:
acquiring historical resource data corresponding to the clusters;
carrying out statistical analysis on the historical resource data, and calculating target resource data, wherein the target resource data is the resource data which is required to be added for creating a cluster after preset time;
and reserving cluster resources according to the target resource data.
In a second aspect, an embodiment of the present application provides a cluster processing apparatus, where the apparatus includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving application information of a user for creating a target cluster, the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code;
the acquisition module is used for responding to the application information, acquiring a first level corresponding to a first middleware service according to the middleware service information, and acquiring a second level corresponding to an application deployment resource according to the application deployment resource information;
the matching module is used for 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 the first creation module is used for creating the target cluster for the target code according to the target middleware service and the target application deployment resource.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the method of any one of the possible implementation methods of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement a method according to any one of the possible implementation methods of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, the instructions in which, when executed by a processor of an electronic device, cause the electronic device to perform a method as in any one of the possible implementation methods of the first aspect described above.
According to the cluster processing method, the cluster processing device, the cluster processing equipment, the computer readable storage medium and the computer program product, under the condition that application information for creating the target cluster by a user is received, according to middleware service information and application deployment resource information corresponding to target codes in the application information, a first level corresponding to the first middleware service and a second level corresponding to application deployment resources are obtained, and therefore resource information required for creating the target cluster can be accurately determined. 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 according to the matched target middleware service and target application deployment resource, the target cluster can be automatically created according to the resource information required by creating the target cluster. Because the target cluster is created for the target code, the resource information required for creating the target cluster, namely the resource information required by the target application corresponding to the target code, can be further distributed to the target application as required. Thus, according to the embodiment of the application, the adaptation degree between the target cluster and the target application can be ensured, and further the reasonable utilization of cluster resources can be ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a schematic diagram of an overall design of a cluster processing provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a cluster processing method according to an embodiment of the present application;
FIG. 3 is a flowchart of another cluster processing method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a cluster processing device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
As described in the background section, in the prior art, a user typically manually creates a cluster and then assigns the cluster to a deployed successful application via a platform or tool. However, creating the cluster in the above manner often results in a low adaptation degree between the cluster and the application, which easily causes deficiency or waste of cluster resources. In order to ensure reasonable utilization of cluster resources, during cluster operation, clusters can be automatically scaled according to the requirements of applications. However, the expansion and contraction capacity can only be carried out on the basis of the original cluster, and the cluster cannot be timely supplemented and recovered. Therefore, in the prior art, a method for creating and managing clusters needs to be perfected.
Thus, to solve the problems in the prior art, embodiments of the present application provide a cluster processing method, apparatus, device, computer readable storage medium, and computer program product.
The following describes the overall design scheme of the cluster processing provided in the embodiment of the present application.
The embodiment of the application provides a cluster automatic processing method based on Serverless. The cluster automatic processing method may include a cluster automatic creation method and a cluster automatic management method. By adopting the Serverless technology, the Serverless cluster application management taking the container as the core can be realized through the Knative framework. Meanwhile, by combining an Eggo tool and a GitOps engine, the problem of automatic deployment of the large-scale production environment K8S cluster can be solved, deployment configuration is tracked in real time, and the deployment of the cluster can be realized in a cloud native mode.
The overall design of the clustering process may be as shown in fig. 1.
Here, the code repository may include a code repository corresponding to the project application code and a code repository corresponding to the personal application code. The user may upload local project application codes or personal application codes to the corresponding code repository. For project application codes, a user can firstly create project application services on a Serverless platform and then associate a project application code warehouse with the created project application services.
In addition, the user can configure the project or the resources required by the personal application deployment through the self-service workbench. The resources may include middleware, configuration information, initialization scripts, and the like, among others. After configuring the resources required by the application, the user can select the corresponding code repository to apply for the cluster environment.
After receiving the application of the user to the cluster environment, the platform may automatically create and allocate rules according to the cluster (the automatic creation and allocation rules of the cluster may be referred to in the related description of the embodiment shown in fig. 2 below, which is not repeated here), and automatically create a project-specific or personal private cluster environment in the server cluster pool. The project-specific clusters can be automatically created into a project-specific cluster pool, and the personal private clusters can be automatically created into a personal private cluster pool. After the project specific or personal application private cluster application is successfully created, the user may perform automated CICD operations to run the application in the cluster environment.
The specific process of performing an automated CICD operation may be as follows:
first, the Serverless service automatically associates an application code to generate a Serverless application. Wherein, for the project application code, since the user has created the project application service on the Serverless platform and associated the project application code repository with the created project application service, the Serverless service can directly associate the application code. For personal application codes, the server can automatically create personal application services according to the corresponding code warehouse and cluster application information.
After the Serverless application is generated, on one hand, the Serverless application triggers a construction operation, performs CI, generates a mirror image, and synchronizes to a mirror image warehouse. The mirror repository is associated with the configuration repository. On the other hand, the Serverless application generates yaml files of application deployment, and calls the GitOps engine after release. The GitOps engine sends instructions to the ArgoCD tool and stores yaml files to the configuration library. And after receiving the instruction sent by the GitOps engine, deploying the Serverless application into the application cluster. Centralized management and control of cluster resources can be performed through a Knative and Eggo tool of Serverless. In addition, the ArgoCD may also monitor the configuration library.
In addition, the platform may automatically monitor and recover the cluster resources released by the application according to the cluster resource automatic recovery and replenishment rules (the cluster resource automatic recovery and replenishment rules may be described in the related description of the embodiment shown in fig. 3 below, which is not repeated here), and automatically replenish the cluster resources according to the history data.
The cluster processing method provided by the embodiment of the application is described below.
Fig. 2 shows a flow chart of a cluster processing method according to an embodiment of the present application. As shown in fig. 2, the cluster processing method provided in the embodiment of the present application includes the following steps: s210 to S240.
S210, receiving application information for creating a target cluster by a user, wherein the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code.
Here, the object code may include project application code and personal application code. After the user uploads the local target code to the code warehouse, the self-service workbench of the Serverless platform can apply for creating the target cluster corresponding to the target code. The application information of the target cluster may include resource information required for deploying the target application. The target application may be an application corresponding to the target code. In addition, the resource information may include configuration information and an initialization script. In the configuration information, the middleware service information may include a first middleware service and a first level corresponding to the first middleware service, and the application deployment resource information may include an application deployment resource and a second level corresponding to the application deployment resource.
Based on the above, before receiving the application information of the user for creating the target cluster, on one hand, middleware services can be designed into different levels according to factors such as data size, concurrent call size, response and performance requirements of middleware required by the application. On the other hand, in the application cluster pool, middleware services required by the application can be configured, identified, deployed and pulled in advance according to different levels of middleware types and designs required by the application.
In addition, before receiving application information of a user for creating a target cluster, on one hand, application deployment resources can be designed into different levels according to factors such as deployment type, deployment file size, concurrent call scale, response and performance requirements of the application. On the other hand, in the application cluster pool, the application deployment resources can be configured and identified in advance according to different levels of the application deployment resource design.
S220, responding to the application information, acquiring a first level corresponding to the first middleware service according to the middleware service information, and acquiring a second level corresponding to the application deployment resource according to the application deployment resource information.
And S230, 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.
Here, according to the configuration requirement submitted by the user for the middleware service, the middleware service of the corresponding level can be automatically matched in the cluster pool. In addition, according to the configuration requirements submitted by the user for the application deployment resources, the application deployment resources of the corresponding level can be automatically matched in the cluster pool.
S240, establishing a target cluster for the target code according to the target middleware service and the target application deployment resource. That is, a target cluster may be automatically created for target code based on the matched middleware services and application deployment resources.
Based on this, to simplify the user operation, the user experience is improved, and in some embodiments, the method may further include:
responding to the application information, and creating a target application corresponding to the target code;
based on this, after creating the target cluster for the target code, it may further include:
and in the target cluster, associating the target middleware service and deploying the target application according to the configuration information.
Here, in the case where the object code is a project application code, since the user has created a project application service on the server platform and associated the project application code repository with the created project application service, the project application service may directly associate the application code to obtain a project application, i.e., a target application, and in the case where the object code is a personal application code, the server may automatically create a personal application service according to the corresponding code repository and application information and automatically create a personal application, i.e., a target application, according to the personal application service and the personal application code.
After the target application is obtained, the middleware service can be automatically associated according to the configuration information in the newly created cluster, namely the target cluster, and the target application can be automatically deployed.
In this way, through automatically associating the target middleware service and deploying the target application in the target cluster, the user operation can be simplified, and the user experience can be improved.
According to the cluster processing method, under the condition that the application information of the user for creating the target cluster is received, the first level corresponding to the first middleware service and the second level corresponding to the application deployment resource are obtained according to the middleware service information and the application deployment resource information corresponding to the target code in the application information, so that the resource information required for creating the target cluster can be accurately determined. 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 according to the matched target middleware service and target application deployment resource, the target cluster can be automatically created according to the resource information required by creating the target cluster. Because the target cluster is created for the target code, the resource information required for creating the target cluster, namely the resource information required by the target application corresponding to the target code, can be further distributed to the target application as required. Thus, according to the embodiment of the application, the adaptation degree between the target cluster and the target application can be ensured, and further the reasonable utilization of cluster resources can be ensured.
In order to keep the dynamic stability of the cluster resources and improve the availability and user experience of the cluster environment, as another implementation manner of the application, the application also provides another implementation manner of the cluster processing method, and particularly, the following embodiments are referred to.
Referring to fig. 3, the cluster processing method provided in the embodiment of the present application may include the following steps:
s310, receiving application information of a user for creating a target cluster, wherein the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code;
s320, responding to the application information, acquiring a first level corresponding to the first middleware service according to the middleware service information, and acquiring a second level corresponding to the application deployment resource according to the application deployment resource information;
s330, matching target middleware services corresponding to the first level and target application deployment resources corresponding to the second level in the cluster pool;
s340, establishing a target cluster for the target code according to the target middleware service and the target application deployment resource;
s350, deleting, supplementing and storing the clusters in the cluster pool, wherein the clusters comprise target clusters.
According to the embodiment of the invention, the clusters in the cluster pool are managed (namely at least one of deletion, supplementation and storage), so that the cluster resources can be recovered in time when a user does not use the cluster environment any more, and the cluster resources are supplemented in time when the cluster resources are insufficient, so that the dynamic stability of the cluster resources can be kept, and the availability and user experience of the cluster environment are improved.
A specific implementation of S350 described above is described below.
In some embodiments, in S350, the cluster pool may be a Serverless cluster pool, which may include a personal private cluster pool and an item specific cluster pool. The embodiment of the application can manage any cluster in the Serverless cluster pool. Wherein managing the clusters may include deleting the clusters, adding the clusters, and supplementing resources in the clusters.
Based on this, in order to ensure full utilization of the cluster resources and avoid wasting the cluster resources, in some embodiments, S350 may specifically include:
monitoring the state of a first resource in the cluster, wherein the first resource comprises a second middleware service and an application;
and deleting the cluster under the condition that the second middleware service and the application are out of use.
Here, the use condition of the first resource in each cluster resource can be monitored in real time by the monitor program. Specifically, the use condition of the middleware service can be monitored in real time through the monitor program, wherein the use condition of the middleware service can comprise whether an application links and calls the middleware service. The active state of the application can be monitored in real time by the monitor program.
For clusters that no longer use middleware services and the deployed applications are no longer invoked, reclamation can occur. The specific process of recycling can include: stopping the linking and calling of the application to the middleware service; stopping the application, and deleting configuration information and data related to the application; and deleting applications and cluster resources (personal or project namespaces, PODs, services, images, and deployment files, etc.)
Therefore, when the user does not use the cluster environment any more, the cluster resources are recovered in time, so that the full utilization of the cluster resources can be ensured, and the waste of the cluster resources is avoided.
In addition, in order to ensure full utilization of cluster resources and avoid waste of cluster resources, the service life of the clusters can be set in the configuration information. The clusters may be automatically deleted in case the lifetime of the clusters is reached.
Based on this, in order to ensure the normal operation of the cluster, in some embodiments, S350 may specifically include:
monitoring the state of a second resource in the cluster, wherein the second resource comprises any one of a central processing unit index, a memory index, an input/output index and a node index;
under the condition that the utilization rate corresponding to the second resource is larger than a preset threshold value, determining a supplementary resource corresponding to the second resource according to the utilization rate and the preset threshold value;
and supplementing the second resource according to the supplementing resource.
Here, for each Node resource in the cluster, three control indexes of a central processing unit (Central Processing Unit, CPU), a memory, and an Input/Output (I/O) may be selected. For each control index, two control parameters of an evaluation weight (W) and a control limit (L) may be selected. Based on this, the preset threshold may include a CPU control limit L corresponding to the CPU index cpu And internal memoryMemory control limit L corresponding to index mem I/O control limit L corresponding to I/O index i/o And Node control limit L corresponding to Node (Node) index node . In addition, the CPU evaluation weight value corresponding to the CPU index may be W cpu The memory evaluation weight corresponding to the memory index may be W mem The I/O evaluation weight corresponding to the I/O index may be W i/o
As an example, the use of the second resource in the cluster resource may be obtained by the listener. Specifically, the CPU usage rate R of each Node can be monitored by a monitor program cpu Memory usage R mem And I/O usage R i/o . By R cpu 、R mem And R is i/o The usage rate of each Node can be calculated: r is R node =W cpu ·R cpu +W mem ·R mem +W i/o ·R i/o
As an example, by counting R cpu >L cpu The resource of the CPU resource demand can be automatically calculated and evaluated; by counting R mem >L mem The resource of the memory resource demand can be automatically calculated and evaluated; by counting R i/o >L i/o Can automatically calculate and evaluate the I/O resource demand; by counting R node >L node Can automatically calculate and evaluate Node resource demand. Therefore, CPU, memory, I/O and Node resources which need to be supplemented can be determined through comprehensive analysis, and timely supplementation can be performed.
Therefore, the use condition of the second resource in the cluster is obtained in real time, and when the second resource is insufficient, the line is supplemented in time, so that the normal operation of the cluster can be ensured.
Based on this, in order to ensure timely and efficient provisioning of clusters when burst needs, in some embodiments, S350 may specifically include:
acquiring historical resource data corresponding to the clusters;
carrying out statistical analysis on the historical resource data, and calculating target resource data, wherein the target resource data is the resource data which is required to be added for creating a cluster after preset time;
and reserving cluster resources according to the target resource data.
Here, the history resource data may include history application data and history usage data.
As an example, after the historical resource data corresponding to the cluster is obtained, on the one hand, the historical application data and the historical usage data may be counted, and the development trend of the cluster application and the usage may be analyzed to obtain a development trend graph. On the other hand, the same ratio analysis and the ring ratio analysis can be carried out on the historical application data and the historical use data to obtain a same ratio analysis chart and a ring ratio analysis chart. Therefore, by combining the development trend graph, the homonymy analysis graph and the ring ratio analysis graph, the cluster resource which needs to be increased in the future can be calculated, the storage is advanced, and the cluster resource is timely supplemented when the cluster resource is suddenly needed.
Thus, by reserving cluster resources in advance according to historical resource data corresponding to clusters, timely and effective supply of clusters can be ensured when burst needs exist.
In addition, the other steps of the method in the embodiment of the present application may be referred to as related description of the embodiment shown in fig. 2, which is not repeated herein.
Based on the cluster processing method provided by the embodiment, correspondingly, the application also provides a specific implementation mode of the cluster processing device. Please refer to the following examples.
As shown in fig. 4, the cluster processing device 400 provided in the embodiment of the present application includes the following modules:
a receiving module 410, configured to receive application information for creating a target cluster by a user, where 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 a target code;
the obtaining module 420 is configured to obtain a first level corresponding to the first middleware service according to the middleware service information and obtain a second level corresponding to the application deployment resource according to the application deployment resource information in response to the application information;
a matching module 430, configured to match, in the cluster pool, the target middleware service corresponding to the first level and the target application deployment resource corresponding to the second level;
the first creating module 440 is configured to create a target cluster for the target code according to the target middleware service and the target application deployment resource.
The cluster processing apparatus 400 is described in detail below, and specifically as follows:
in some of these embodiments, the cluster processing apparatus 400 may further include:
the second creation module is used for responding to the application information and creating a target application corresponding to the target code;
based on this, the cluster processing apparatus 400 may further include:
and the association module is used for associating the target middleware service and deploying the target application according to the configuration information in the target cluster after the target cluster is created for the target code.
In some of these embodiments, the cluster processing apparatus 400 may further include:
and the management module is used for deleting, supplementing and storing the clusters in the cluster pool, wherein the clusters comprise target clusters.
In some of these embodiments, the management module may specifically include:
the first monitoring submodule is used for monitoring the state of a first resource in the cluster, and the first resource comprises a second middleware service and an application;
and the deleting sub-module is used for deleting the cluster under the condition that the second middleware service and the application are stopped from being used.
In some of these embodiments, the management module may specifically include:
the second monitoring submodule is used for monitoring the state of a second resource in the cluster, and the second resource comprises any one of a central processing unit index, a memory index, an input/output index and a node index;
the determining submodule is used for determining the supplementary resource corresponding to the second resource according to the utilization rate and the preset threshold value under the condition that the utilization rate corresponding to the second resource is larger than the preset threshold value;
and the supplementing sub-module is used for supplementing the second resource according to the supplementing resource.
In some of these embodiments, the management module may specifically include:
the acquisition sub-module is used for acquiring historical resource data corresponding to the cluster;
the analysis sub-module is used for carrying out statistical analysis on the historical resource data and calculating target resource data, wherein the target resource data is the resource data which is required to be added for creating the cluster after the preset time;
and the storage sub-module is used for storing the cluster resources according to the target resource data.
According to the cluster processing device, under the condition that the application information of the user for creating the target cluster is received, according to the middleware service information and the application deployment resource information corresponding to the target code in the application information, the first level corresponding to the first middleware service and the second level corresponding to the application deployment resource are obtained, and therefore the resource information required for creating the target cluster can be accurately determined. 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 according to the matched target middleware service and target application deployment resource, the target cluster can be automatically created according to the resource information required by creating the target cluster. Because the target cluster is created for the target code, the resource information required for creating the target cluster, namely the resource information required by the target application corresponding to the target code, can be further distributed to the target application as required. Thus, according to the embodiment of the application, the adaptation degree between the target cluster and the target application can be ensured, and further the reasonable utilization of cluster resources can be ensured.
Based on the cluster processing method provided by the embodiment, the embodiment of the application also provides a specific implementation mode of the electronic device. Fig. 5 shows a schematic diagram of an electronic device 500 according to an embodiment of the present application.
The electronic device 500 may include a processor 510 and a memory 520 storing computer program instructions.
In particular, the processor 510 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 520 may include mass storage for data or instructions. By way of example, and not limitation, memory 520 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. 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, where appropriate. In a particular embodiment, the memory 520 is a non-volatile solid state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory comprises one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising 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 the present application.
Processor 510 reads and executes computer program instructions stored in memory 520 to implement any of the cluster processing methods of the above embodiments.
In one example, electronic device 500 may also include communication interface 530 and bus 540. As shown in fig. 5, the processor 510, the memory 520, and the communication interface 530 are connected to each other by a bus 540 and perform communication with each other.
The communication interface 530 is mainly used to implement communication between each module, apparatus, unit and/or device in the embodiments of the present application.
Bus 540 includes hardware, software, or both that couple components of the electronic device to one another. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel 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 bus, or a combination of two or more of the above. Bus 540 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
By way of example, the electronic device 500 may be a cell phone, tablet computer, notebook computer, palm top computer, vehicle mounted electronic device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (personal digital assistant, PDA), or the like.
The electronic device may perform the cluster processing method in the embodiment of the present application, so as to implement the cluster processing method and apparatus described in connection with fig. 2 to fig. 4.
In addition, in combination with the cluster processing method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the cluster processing methods of the above embodiments.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of 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 may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (10)

1. A cluster processing method, comprising:
receiving application information of a user for creating a target cluster, wherein the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code;
responding to the application information, acquiring a first level corresponding to a first middleware service according to the middleware service information, and acquiring a second level corresponding to an application deployment resource according to the application deployment resource information;
matching a target middleware service corresponding to the first level in a cluster pool and deploying resources of a target application corresponding to the second level;
and establishing the target cluster for the target code according to the target middleware service and the target application deployment resource.
2. The method according to claim 1, wherein the method further comprises:
responding to the application information, and creating a target application corresponding to the target code;
after the creating the target cluster for the target code, the method further includes:
and in the target cluster, associating the target middleware service and deploying the target application according to the configuration information.
3. The method according to claim 1, wherein the method further comprises:
and deleting, supplementing and storing the clusters in the cluster pool, wherein the clusters comprise the target clusters.
4. A method according to claim 3, wherein said deleting clusters in said cluster pool comprises:
monitoring the state of a first resource in the cluster, wherein the first resource comprises a second middleware service and an application;
and deleting the cluster under the condition that the second middleware service and the application are out of use.
5. A method according to claim 3, wherein supplementing clusters in the pool of clusters comprises:
monitoring the state of a second resource in the cluster, wherein the second resource comprises any one of a central processing unit index, a memory index, an input/output index and a node index;
determining a supplementary resource corresponding to the second resource according to the usage rate and the preset threshold under the condition that the usage rate corresponding to the second resource is larger than the preset threshold;
and supplementing the second resource according to the supplementing resource.
6. A method according to claim 3, wherein reserving clusters in the pool of clusters comprises:
acquiring historical resource data corresponding to the clusters;
carrying out statistical analysis on the historical resource data, and calculating target resource data, wherein the target resource data is the resource data which is required to be added for creating a cluster after preset time;
and reserving cluster resources according to the target resource data.
7. A cluster processing apparatus, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving application information of a user for creating a target cluster, the application information comprises configuration information corresponding to the target cluster, and the configuration information comprises middleware service information and application deployment resource information corresponding to a target code;
the acquisition module is used for responding to the application information, acquiring a first level corresponding to a first middleware service according to the middleware service information, and acquiring a second level corresponding to an application deployment resource according to the application deployment resource information;
the matching module is used for 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 the first creation module is used for creating the target cluster for the target code according to the target middleware service and the target application deployment resource.
8. An electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a cluster processing method as claimed in any one of claims 1-6.
9. A computer readable storage medium, wherein computer program instructions are stored on the computer readable storage medium, which when executed by a processor, implement the cluster processing method according to any one of claims 1-6.
10. A computer program product, characterized in that instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the cluster processing method according to any of claims 1-6.
CN202310169913.5A 2023-02-16 2023-02-16 Cluster processing method, device, equipment and computer readable storage medium Pending CN116225703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310169913.5A CN116225703A (en) 2023-02-16 2023-02-16 Cluster processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310169913.5A CN116225703A (en) 2023-02-16 2023-02-16 Cluster processing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116225703A true CN116225703A (en) 2023-06-06

Family

ID=86585382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310169913.5A Pending CN116225703A (en) 2023-02-16 2023-02-16 Cluster processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116225703A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467113A (en) * 2023-06-20 2023-07-21 深圳富联富桂精密工业有限公司 Abnormality processing method, abnormality processing device, electronic device, and computer-readable storage medium
CN116909757A (en) * 2023-09-13 2023-10-20 中移(苏州)软件技术有限公司 Cluster management control system, method, electronic device and storage medium
CN117155992A (en) * 2023-10-31 2023-12-01 天津市天河计算机技术有限公司 Service processing method and processing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467113A (en) * 2023-06-20 2023-07-21 深圳富联富桂精密工业有限公司 Abnormality processing method, abnormality processing device, electronic device, and computer-readable storage medium
CN116467113B (en) * 2023-06-20 2023-12-05 深圳富联富桂精密工业有限公司 Abnormality processing method, abnormality processing device, electronic device, and computer-readable storage medium
CN116909757A (en) * 2023-09-13 2023-10-20 中移(苏州)软件技术有限公司 Cluster management control system, method, electronic device and storage medium
CN116909757B (en) * 2023-09-13 2024-01-26 中移(苏州)软件技术有限公司 Cluster management control system, method, electronic device and storage medium
CN117155992A (en) * 2023-10-31 2023-12-01 天津市天河计算机技术有限公司 Service processing method and processing system
CN117155992B (en) * 2023-10-31 2024-01-09 天津市天河计算机技术有限公司 Service processing method and processing system

Similar Documents

Publication Publication Date Title
CN116225703A (en) Cluster processing method, device, equipment and computer readable storage medium
US11762697B2 (en) Method and apparatus for scheduling resource for deep learning framework
CN108632365B (en) Service resource adjusting method, related device and equipment
CN111666088A (en) Pod replacement method and device, electronic equipment and computer-readable storage medium
CN115328741A (en) Exception handling method, device, equipment and storage medium
CN108667872B (en) Archiving method and device for scheduling server
CN116627432A (en) Front-end application automatic deployment method, device, equipment and medium
CN113014675A (en) Data processing method and device, electronic equipment and storage medium
CN112306371A (en) Method, apparatus and computer program product for storage management
CN117453665B (en) Data processing method, device, equipment and storage medium
CN117135151B (en) Fault detection method of GPU cluster, electronic equipment and storage medium
CN111179097B (en) Method, device, electronic equipment and storage medium for modifying warranty
CN117632443B (en) Method, device, equipment and medium for controlling circulation of business process
CN117009060B (en) Resource scheduling method, device, equipment and storage medium
CN110895464B (en) Application deployment method, device and system
CN118212019A (en) Service processing method, system, device, server and storage medium
CN108965214B (en) Data processing method, device and computer storage medium
CN117632450A (en) Resource management method, device, equipment and computer storage medium
CN110213314B (en) Method, device and server for determining storage node
CN114092221A (en) Data processing method, device, equipment and computer storage medium
CN115756753A (en) Cluster management method, device, equipment, medium and product
CN115271501A (en) Order processing method and device, storage medium and electronic equipment
CN116126246A (en) Storage resource adjustment method and device, electronic equipment and storage medium
CN115994349A (en) Method, device, equipment and storage medium for creating sandbox environment
CN117911102A (en) Transaction processing method and device based on transaction link integrity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination