Cluster management method and device
By identifying cloud clusters and agreeing on authentication parameters, combined with resource allocation adjustments, the security and resource waste issues of deploying Kafka clusters in the cloud were resolved, thereby improving both security and resource utilization efficiency.
Patent Information
- Application Number
- CN202511016924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-11-07
AI Technical Summary
Traditional on-premises deployments of Kafka and Apache Pulsar clusters cannot meet the requirements for elasticity and scalability, while cloud deployments present security and stability issues, are complex, and involve significant resource waste.
The cloud cluster is identified by judging the cluster identifier, the authentication parameters are agreed upon and sent to the client, the client completes the authentication to obtain the access permission, and the cluster performance parameters are adjusted by combining the resource ratio and preset threshold to achieve reasonable resource allocation.
It enhances the security of cloud clusters, reduces the risk of user information and data leakage, simplifies the deployment process, avoids resource waste, and improves the reliability and stability of the cluster.
Smart Images

Figure CN120915501A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology, in particular to a cluster management method and device. BACKGROUND
[0002] With the growth of data volume and user demand, traditional locally deployed Kafka (a high-throughput distributed publish-subscribe message system), Apache Pulsar (a cloud-native distributed message streaming platform) and other clusters may not meet the requirements of flexibility and scalability. With the maturity and popularity of cloud computing technology, deploying clusters in different clouds can more easily dynamically expand the cluster size according to demand to cope with traffic peaks and data growth. However, while enjoying the convenience of deploying clusters in the cloud, with the increasing awareness of data security and user information protection, when deploying clusters in the cloud, how to enhance the security of the cluster and protect the security of user information and data has become a key problem to be solved. SUMMARY
[0003] The purpose of the embodiments of the present application is to provide a cluster management method and device to enhance the security of the cluster and protect the security of user information and data. The specific technical solutions are as follows:
[0004] In a first aspect of the present application, a cluster management method is first provided, applied to a platform, the method comprising:
[0005] In response to a registration instruction sent by a client, determining a cluster indicated by the registration instruction, and determining whether the cluster is a cloud cluster according to a cluster identifier; wherein the registration instruction comprises the cluster identifier;
[0006] If the cluster is a cloud cluster, registering the cluster indicated by the registration instruction in the cloud as a target cluster, and agreeing with the cloud on an authentication parameter for the target cluster; wherein the authentication parameter is used to enable the client to complete identity verification of the cloud through the authentication parameter to obtain the use permission of the target cluster;
[0007] Obtaining the authentication parameter and sending the authentication parameter to the client.
[0008] In a possible implementation, the determination of the cluster indicated by the registration instruction comprises:
[0009] Obtaining a cluster performance parameter contained in the registration instruction;
[0010] In response to a selection instruction for the cluster performance parameter, determining the cluster performance parameter indicated by the selection instruction as a target performance parameter;
[0011] determine the cluster indicated by the target performance parameter as the cluster indicated by the registration instruction.
[0012] In a possible implementation, the target performance parameter is used to characterize the system resource required to be allocated to the cluster, and the method further comprises:
[0013] obtaining the system resource allocated to the target cluster as a target system resource;
[0014] obtaining the system resource currently actually used by the target cluster as a current system resource;
[0015] calculating a ratio of the current system resource to the target system resource as a resource ratio of the target cluster;
[0016] comparing the resource ratio with a preset threshold to obtain a comparison result;
[0017] adjusting the target performance parameter of the target cluster according to the comparison result; wherein the adjusted target performance parameter is used to characterize the current system resource.
[0018] In a second aspect of the embodiment of the present application, a cluster management method applied to a client is further provided, and the method comprises:
[0019] sending a registration instruction to a platform; wherein the registration instruction is used to indicate a cluster required to be registered;
[0020] obtaining an authentication parameter sent by the platform in response to the registration instruction; wherein the authentication parameter is obtained by the platform in response to the registration instruction; and the target cluster is the cluster indicated by the registration instruction;
[0021] completing identity verification of the cloud end by using the authentication parameter, obtaining a use right of the target cluster, and using the target cluster.
[0022] In a possible implementation, the authentication parameter comprises a cluster identifier and a cluster password.
[0023] The completing identity verification of the cloud end by using the authentication parameter, obtaining a use right of the target cluster, and using the target cluster comprises:
[0024] sending the cluster identifier and the cluster password to the cloud end; wherein the cluster password is used to enable the cloud end to verify whether the client has a use right of the cluster identified by the cluster identifier;
[0025] after the verification is passed and the use right of the cluster identified by the cluster identifier is obtained, using the cluster identified by the cluster identifier according to the cluster password.
[0026] In a third aspect of the embodiments of the present application, a cluster management device is provided, which is applied to a platform, and the device comprises:
[0027] A judging module is configured to determine a cluster indicated by a registration instruction sent by a client, and determine whether the cluster is a cloud cluster according to a cluster identifier; wherein the registration instruction comprises the cluster identifier.
[0028] A negotiating module is configured to, if the cluster is a cloud cluster, register the cluster indicated by the registration instruction as a target cluster on a cloud, and negotiate an authentication parameter for the target cluster with the cloud; wherein the authentication parameter is used to enable the client to complete identity verification of the cloud by using the authentication parameter to obtain a use right of the target cluster.
[0029] A sending module is configured to obtain the authentication parameter, and send the authentication parameter to the client.
[0030] In a possible implementation, the judging module comprises:
[0031] A first judging sub-module is configured to obtain a cluster performance parameter contained in the registration instruction.
[0032] A second judging sub-module is configured to, in response to a selection instruction for the cluster performance parameter, determine a cluster performance parameter indicated by the selection instruction as a target performance parameter.
[0033] A third judging sub-module is configured to determine a cluster indicated by the target performance parameter as the cluster indicated by the registration instruction.
[0034] In a possible implementation, the target performance parameter is used to represent a system resource required to be allocated to the cluster, and the device further comprises:
[0035] A first obtaining module is configured to obtain a system resource allocated to the target cluster as a target system resource.
[0036] A second obtaining module is configured to obtain a system resource actually used by the target cluster at present as a current system resource.
[0037] A calculating module is configured to calculate a ratio of the current system resource to the target system resource as a resource proportion of the target cluster.
[0038] A comparing module is configured to compare the resource proportion with a preset threshold to obtain a comparison result.
[0039] an adjusting module, configured to adjust a target performance parameter of the target cluster according to the comparison result; wherein the adjusted target performance parameter is used to represent the current system resource.
[0040] In a fourth aspect of the embodiments of the present application, a cluster management device applied to a client is further provided, and the device comprises:
[0041] a registering module, configured to send a registration instruction to a platform; wherein the registration instruction is used to indicate a cluster required to be registered;
[0042] a third obtaining module, configured to obtain an authentication parameter sent by the platform in response to the registration instruction; wherein the authentication parameter is obtained by the platform after registering a target cluster in the cloud, and the target cluster is indicated by the registration instruction;
[0043] a verifying module, configured to complete identity verification of the cloud by using the authentication parameter, to obtain a use right of the target cluster and to use the target cluster.
[0044] In a possible implementation, the authentication parameter comprises a cluster identifier and a cluster password.
[0045] The verifying module comprises:
[0046] a first verifying submodule, configured to send the cluster identifier and the cluster password to the cloud; wherein the cluster password is used to enable the cloud to verify whether the client has a use right of the cluster indicated by the cluster identifier;
[0047] a second verifying submodule, configured to use the cluster indicated by the cluster identifier according to the cluster password after the verification is passed and the use right of the cluster indicated by the cluster identifier is obtained.
[0048] In another aspect of the embodiments of the present application, a computer readable storage medium is further provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the cluster management method.
[0049] In another aspect of the embodiments of the present application, a computer program product comprising instructions which, when executed on a computer, cause the computer to carry out the cluster management method.
[0050] The embodiment of the present application provides a cluster management method and device, which can accurately identify different types of clusters by responding to a registration instruction sent by a client and judging whether the cluster is a cloud cluster according to a cluster identifier contained in the registration instruction. When the cluster is determined to be a cloud cluster, the cluster is registered as a target cluster on the cloud, and an authentication parameter is agreed with the cloud. The authentication parameter is obtained and sent to the client, so that the client can complete identity verification and obtain the use permission of the target cluster according to the parameter. The setting of the authentication parameter makes the client have to pass the identity verification to obtain the use permission of the target cluster, prevents unauthorized access, enhances the security of the cloud cluster, reduces the risk of user information and data leakage, and protects the security of user data. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced.
[0052] Figure 1 The first schematic diagram of the cluster management method provided in the embodiment of the present application;
[0053] Figure 2 The structural schematic diagram of the platform provided in the embodiment of the present application;
[0054] Figure 3 The second schematic diagram of the cluster management method provided in the embodiment of the present application;
[0055] Figure 4 The third schematic diagram of the cluster management method provided in the embodiment of the present application;
[0056] Figure 5 The fourth schematic diagram of the cluster management method provided in the embodiment of the present application;
[0057] Figure 6 The fifth schematic diagram of the cluster management method provided in the embodiment of the present application;
[0058] Figure 7 The first schematic diagram of the cluster management device provided in the embodiment of the present application;
[0059] Figure 8 The second schematic diagram of the cluster management device provided in the embodiment of the present application;
[0060] Figure 9 The structural schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0062] The cluster management method provided by the application is suitable for managing clusters such as Kafka, Apache Pulsar, etc. which can be deployed locally and in the cloud. In order to make the description more concise and clear, in this specification, the cluster management method proposed by the application is described in detail by taking a Kafka cluster as an example. When the managed cluster is other than a Kafka cluster, the management method used by the application is the same in principle and operation steps. Kafka has been widely used in the fields of log collection, real-time data processing and message transmission. With the continuous expansion of enterprise business and the rapid development of cloud computing technology, traditional locally deployed Kafka has been difficult to meet the current complex and changing business needs. Therefore, different cloud-deployed Kafka clusters have emerged, but there are the following problems in deploying Kafka clusters in different clouds:
[0063] Problem one, when deploying a Kafka cluster in the cloud, the Kafka cluster has two deployment options, which can be deployed in a public cloud or a private cloud. However, regardless of the deployment method chosen, deploying Kafka in the cloud inevitably faces challenges in security and stability. Compared with a private cloud, because a public cloud has the characteristics of openness and multi-tenant environment, the security and stability problems are more prominent when deploying a Kafka cluster on a public cloud, and it is difficult to ensure the security of user information and data.
[0064] Problem two, the deployment and configuration process of a Kafka cluster is relatively complex and requires users to have rich technical background and operation and maintenance experience. This includes selecting appropriate hardware resources, installing and configuring Kafka software, etc. For users who lack relevant experience, this process may consume a lot of time and effort, and may even result in deployment failure or poor performance.
[0065] Problem three, when creating a Kafka cluster, the traffic peak of the cluster needs to be planned. When creating an existing Kafka cluster, the cold and hot holiday peak periods must be considered, but the traffic during normal times can only reach 70% of the planned traffic peak, so there is a waste of resources.
[0066] Based on this, the application provides a cluster management method applied to a platform, as shown in Figure 1 , Figure 1 The first schematic diagram of the cluster management method provided in the embodiments of the application, the method comprises:
[0067] S101, in response to a registration instruction sent by a client, determining the cluster indicated by the registration instruction, and determining whether the cluster is a cloud cluster according to the cluster identifier.
[0068] The registration instruction includes a cluster identifier.
[0069] S102, if the cluster is a cloud cluster, register the cluster indicated by the registration instruction as a target cluster on the cloud, and agree on an authentication parameter with the cloud for the target cluster.
[0070] The authentication parameter is used to enable the client to complete authentication of the cloud through the authentication parameter to obtain the use permission of the target cluster.
[0071] S103, obtain the authentication parameter and send it to the client.
[0072] The above embodiment is applied, and by responding to the registration instruction sent by the client and judging whether the cluster is a cloud cluster according to the cluster identifier contained therein, different types of clusters can be accurately identified. When it is determined that the cluster is a cloud cluster, the cluster is registered as a target cluster on the cloud, and an authentication parameter is agreed with the cloud. The authentication parameter is obtained and sent to the client, so that the client can complete authentication according to the parameter and obtain the use permission of the target cluster. The setting of the authentication parameter makes the client have to pass the authentication to obtain the use permission of the target cluster, prevents unauthorized access, enhances the security of the cloud cluster, reduces the risk of user information and data leakage, protects the security of user data, and solves the problem one.
[0073] The cluster management method provided by the application is applied to a platform. The platform will be described first. The platform is any device capable of managing clusters. For example, refer to Figure 2 , Figure 2 The structure of the platform provided in the embodiment of the application is shown in the figure. The platform is a Stream platform, which includes a cloud platform service layer, a service management layer, and a platform service layer. The platform service layer is used to display the services that the platform can provide to the client, such as queue management, consumption management, monitoring management, and cluster management, so that the user can determine the required service according to the displayed services, and input the related parameters in the SDK (i.e. in the service management layer) to realize inputting the registration instruction to the platform. The cloud platform service layer is used to interact with the cloud, and is used to manage private cloud kafka and public cloud kafka. The service management layer is used to provide a Stream SDK interface (i.e. a unified interface in Figure 2 , so that the client can input the registration instruction to the platform by inputting the parameters in the SDK interface.
[0074] In a possible embodiment, the client can input parameters in the SDK interface in Java, Flink, Spark, or the like to implement inputting a registration instruction to the platform. Java is a programming language, Flink is an open source distributed processing engine, and Spark is an open source big data processing framework. The inputted parameters can include a user token, a project name of a project currently to be executed by the client, whether the project is production or consumption, and a queue name of a queue to be used, and the like. Production is writing data in the cluster, and consumption is reading data from the cluster. The token is a digital identifier used for identity verification, security access control, or data integrity protection.
[0075] The above steps S101-S103 will be described below:
[0076] In step S101, when using the service provided by the platform, the user can need to perform a specific project on a specific cluster, in which case the client needs to input parameters through the SDK interface to implement inputting a registration instruction. For example, the project currently executed by the enterprise user needs to use a certain cluster, at which time the client sends a registration instruction to the platform.
[0077] The platform can receive the registration instruction inputted by the client through the SDK interface through an API (Application Programming Interface). After receiving the registration instruction inputted by the client through the SDK interface, according to the registration instruction, it is judged whether the cluster indicated by the registration instruction is a cloud cluster. For example, the cloud cluster can be a Kafka cluster deployed on a cloud service provider. In this embodiment, the cluster can be a kafka cluster, and in other possible embodiments, it can also be a cluster of other frameworks, which is not specifically limited here.
[0078] In a possible embodiment, after receiving the registration instruction, the cluster indicated by the registration instruction is determined. The registration instruction is parsed to obtain the cluster identifier included in the registration instruction, and it is judged whether the cluster to be registered is a cloud cluster according to the cluster identifier.
[0079] The cluster identifier is a string or code used to uniquely identify a cluster, which can include cluster name, cluster type, belonging area, unique serial number, and the like. After obtaining the cluster identifier, the platform checks a specific part in the cluster identifier, such as checking whether there is a specific character or code combination representing a cloud environment. If it is a public cloud cluster, there can be a special identifier of a cloud service provider in the identifier; if it is a private cloud cluster, the identifier can reflect the characteristics of the enterprise internal network or data center. For example, the cluster with the cluster identifier "cloud-area A-cluster 001" is a cloud cluster.
[0080] In step S102, the cluster includes a cloud cluster and a non-cloud cluster, when the cluster is a cloud cluster, the cluster is registered in the cloud as a target cluster. Since the cloud cluster is deployed on a public cloud, the public cloud has the characteristics of openness and multi-tenant environment, so the cloud cluster needs a strict authentication mechanism to ensure data security. Therefore, after successfully registering the target cluster, the platform and the cloud agree on the authentication parameters for the target cluster. The authentication parameters are important information for verifying whether a user has the right to access and operate the cluster, including authentication mechanisms, authentication protocols, access keys, etc.
[0081] Among them, the authentication mechanism specifies the specific process and method of verifying the identity of the user, such as using a token-based authentication method, a digital certificate-based authentication method, etc., to ensure that only authorized users can initiate access requests. The authentication protocol specifies the communication rules and standards followed by the platform and the cloud when performing identity verification and data transmission, such as various computer network authorization protocols, etc., to ensure the security and reliability of the communication process. The access key, as a unique identifier of the user's identity, is the "key" for the user to access the target cluster, and only users with the correct access key can pass the authentication and obtain the corresponding operation rights.
[0082] In one possible embodiment, the authentication parameters are automatically generated by the platform according to pre-set rules when the user applies to create a cloud cluster. In the subsequent use process, when the user applies to use the cloud cluster, the platform will send the created authentication parameters to the user, and this step is equivalent to authorization, so it ensures that only authorized users can manage, produce and consume it. The pre-set rules can be set by professional technical workers according to their work experience, or can be set according to industry regulations, which are not limited here.
[0083] For example, the pre-set rule can be a hash operation based on user identity information (such as the mobile phone number, email address, etc. provided by the user during registration) combined with the creation timestamp of the cloud cluster, etc. elements, through any encryption algorithm to generate a unique and complex authentication parameter. Alternatively, the pre-set rule can also refer to the commonly used security standards in the industry, which stipulate that the authentication parameter must contain a certain length of numbers, letters and special character combinations.
[0084] In step S103, the platform will send the authentication parameters back to the client. The transmission method can be through network protocols such as HTTP (Hyper Text Transfer Protocol), TCP (Transmission Control Protocol), etc.
[0085] After receiving the authentication parameters, the client needs to complete the identity verification of the cloud end through these authentication parameters to obtain the use permission of the target cluster, so as to realize the access and operation of the corresponding cloud cluster, such as production, consumption and the like.
[0086] After receiving the authentication parameters, the client needs to complete the identity verification of the cloud end through these authentication parameters to obtain the use permission of the target cluster. Specifically, the client sends the authentication parameters to the cloud end. After receiving the authentication parameters, the cloud end parses and verifies the authentication parameters, and compares them with the pre-stored legal authentication parameters. If the authentication parameters match successfully, the verification is passed, and the cloud end returns the access token or related permission information of the target cluster to the client, and the client can realize the access and operation of the corresponding cloud cluster, such as production, consumption and the like, by means of these information. If the authentication parameters do not match, the verification fails, and the client cannot obtain the use permission of the target cluster.
[0087] In a possible embodiment, a default rule or a preset cluster mapping relationship is adopted to determine the cluster indicated by the registration instruction. For example, according to the association configuration of the user identity information and the cluster, when the registration instruction is received, the system automatically finds the cluster corresponding to the user identity from the configuration, and determines it as the cluster indicated by the registration instruction.
[0088] In another possible embodiment, the cluster indicated by the registration instruction can be determined according to the cluster performance parameter contained in the registration instruction. Specifically, refer to Figure 3 , Figure 3 The second schematic diagram of the cluster management method provided in the embodiment of the application, the method comprises:
[0089] S301, obtaining the cluster performance parameter contained in the registration instruction.
[0090] S302, in response to the selection instruction for the cluster performance parameter, determining the cluster performance parameter indicated by the selection instruction as the target performance parameter.
[0091] S303, determining the cluster indicated by the target performance parameter as the cluster indicated by the registration instruction.
[0092] In step S301, the cluster performance parameter includes the number of cluster nodes, node specification, traffic peak, storage configuration (i.e. configuration disk space), cluster specification, storage type and the like.
[0093] Specifically, the client can fill in an application work order in the platform, and the application work order includes the aforementioned cluster performance parameters.
[0094] In step S302 and step S303, taking the client filling in the application work order on the platform as an example, the administrator approves the application work order filled in by the client on the platform, and then modifies or selects the cluster performance parameters according to the management specification or work experience, that is, inputs a selection instruction for each cluster performance parameter, takes the cluster performance parameters approved or modified by the administrator as target performance parameters, and determines the cluster indicated by the target performance parameters as the cluster indicated by the registration instruction. The modification operation refers to the administrator changing the cluster performance parameters filled in by the client in the application work order. For example, the client applies for a cluster with a disk space size of 16 GB, but according to the actual resource allocation of the server and the subsequent business expansion estimation, the administrator modifies it to 32 GB. The selection operation refers to the administrator selecting appropriate cluster performance parameters from the preset configuration options to replace the cluster performance parameters filled in by the client in the application work order. For example, the client fills in the storage type in the application work order as ordinary mechanical hard disk storage, but considering the data read-write speed and stability requirements, the administrator selects solid state disk storage from the preset configuration options.
[0095] By applying the above embodiment, the cluster is determined by obtaining the cluster performance parameters in the registration instruction and determining the target performance parameters based on the selection instruction, which simplifies the complex cluster deployment and configuration process, avoids the user from spending a lot of time and effort to explore hardware resource selection and software configuration due to lack of experience, reduces the threshold of cluster deployment, and the user only needs to send a registration instruction according to the own demand to deploy the corresponding cluster, which shortens the deployment period of the cluster. Reduces the situation of deployment failure or poor performance caused by insufficient user experience, improves the reliability and stability of the cluster deployment, and solves the above problems.
[0096] In order to more clearly illustrate the foregoing cluster management method, the following will combine Figure 4 The complete process of the client registering and using the cluster in the platform (StreamPlatform) will be described, referring to Figure 4 , Figure 4 The third schematic diagram of the cluster management method provided in the embodiment of the application includes:
[0097] S1: The user uses the service management layer according to the configuration information, which is equivalent to inputting the registration instruction into the platform by inputting the parameters in the SDK interface. The service management layer supports inputting data production, data consumption, information registration, and heartbeat management related instructions.
[0098] S2: The service management layer registers information according to the configuration access platform, which is equivalent to the foregoing platform receiving the registration instruction input by the client through the SDK interface through the API. For the platform, it is to obtain the registration information.
[0099] S3: The cloud platform service layer obtains the registration cluster information by accessing the platform database, which is equivalent to the foregoing steps S101 and S301. The cluster information includes the foregoing cluster identifier and cluster performance parameter. The cloud platform service layer is used for interaction with the cloud end to realize the queue management, production management, consumption management and system management and other businesses based on the public cloud or private cloud.
[0100] S4: It is judged whether the cloud cluster is used. If the cloud cluster is used, the authentication mechanism is configured and the encrypted information is returned, which is equivalent to the foregoing step S103. Step S4 can be regarded as the process of authorization filtering, authorization management and information service provision.
[0101] S5: The queue information is returned to the service management layer, which is equivalent to sending the cluster data to the client after authentication.
[0102] When the client accesses and operates the cloud cluster, as described above, when the cluster is created, the created cluster is the cluster indicated by the target performance parameter. The target performance parameter is pre-set and is used to represent the system resources required to be allocated to the cluster, for example, the peak traffic of the cluster and the required used disk space. However, when creating, the peak traffic of the cluster and the disk space may not be suitable in actual application because the future traffic trend cannot be determined.
[0103] Based on this, in a possible embodiment, in order to fully utilize the cluster, the cluster can be adjusted in upscaling, downscaling, expansion and contraction as the traffic changes, that is, the target performance parameter is adjusted to be used to represent the current actual occupied system resources. Referring to Figure 5 , Figure 5 A fourth schematic diagram of the cluster management method provided in the embodiment of the application includes:
[0104] S501, obtaining the system resources allocated to the target cluster as target system resources.
[0105] S502, obtaining the current actual used system resources of the target cluster as current system resources.
[0106] S503, calculating the ratio of the current system resources to the target system resources as the resource proportion of the target cluster.
[0107] S504, comparing the resource proportion with the preset threshold to obtain a comparison result.
[0108] S505, adjusting the target performance parameter of the target cluster according to the comparison result.
[0109] The adjusted target performance parameter is used to represent the current system resource.
[0110] When sending the queue information to the client, the set target performance parameter, such as the peak traffic of the cluster and the disk space, is not sent to the client. When performing cluster governance such as scaling up / down (i.e., adjusting the cluster specification of the cluster to adjust the peak traffic) or capacity expansion adjustment, the peak traffic and disk space corresponding to the cluster that the user wants to perform cluster governance are usually obtained from the platform database after the client uses the cluster for a period of time. The administrator evaluates the actual use of the cluster by the user according to the related indicators. For example, if the user initially applies for a high cluster specification, but the traffic is low during actual use, the administrator can consider optimizing the adjustment and appropriately modifying the cluster specification to better meet the actual demand and improve resource utilization.
[0111] For convenience of description, only the case of adjusting the peak traffic and the required disk space of the cluster to adjust the target performance parameter is described below, and in other embodiments, the target performance parameter can also be adjusted by adjusting the number of cluster nodes, node specifications, etc. Details are not repeated here.
[0112] In step S501, based on the target performance parameter, the peak network bandwidth allocated by the system to achieve the peak traffic indicated by the target performance parameter, and the disk space indicated by the target performance parameter are obtained as the target system resources allocated to the target cluster.
[0113] In step S502, the system resource usage of the target cluster in actual operation is collected in real time. For peak traffic, the network monitoring tool (such as traffic monitoring software, traffic statistics function of network equipment) can be used to obtain the actual network bandwidth occupied by the cluster at the current time. For disk space, the file system monitoring tool or the disk usage command provided by the operating system can be used to obtain the current disk storage capacity used by the cluster.
[0114] In step S503, after obtaining the target system resource (pre-allocated resource amount) and the current system resource (actually used resource amount), the ratio of the current system resource to the target system resource is calculated to quantify the proportional relationship between the current actual resource usage of the target cluster and the pre-allocated resource amount.
[0115] When the proportion is calculated, the proportion of the current actual network bandwidth to the target peak network bandwidth and the proportion of the current disk space to the target disk space can be calculated respectively, and then the arithmetic mean of the network bandwidth proportion and the disk space proportion is calculated as the resource proportion of the target cluster. The resource proportion of the target cluster can also be calculated by weighted average according to the business requirements of network bandwidth and disk space (for example, network bandwidth weight 70%, disk space weight 30%), etc., which is not limited here.
[0116] The preset threshold can be set by professional technicians according to work experience, or can be set according to industry regulations, which is not limited here.
[0117] The specific value of the preset threshold depends on the needs of the client or platform. For example, the client or platform needs to avoid business interruption caused by low cluster specification or insufficient disk space, and the threshold can be set relatively low, such as 0.4. In this way, when the current traffic reaches 40% of the peak traffic, or the current disk space usage reaches 40% of the target disk space, the adjustment mechanism is triggered, and measures are taken in time to ensure normal operation of the business. For some non-core businesses, the threshold can be appropriately increased, such as 0.7, to reduce unnecessary resource waste. In general, in order to prevent resource waste, the threshold can be set to 0.5. If the cost budget of the client or platform is limited, in order to reduce costs, the threshold can be set slightly higher, such as 0.8, etc., which is not enumerated here.
[0118] By applying the above embodiments, the comparison mechanism of the resource proportion and the preset threshold is introduced, and the step of adjusting the target performance parameter according to the comparison result is introduced, so that the system can reasonably allocate system resources according to the actual needs in different time periods and different business scenarios, reduce unnecessary resource waste, and solve the third problem described above.
[0119] Corresponding to the cluster management method applied to the platform described above, the application also provides a cluster management method applied to a client, which is described in detail below with reference to Figure 6 , Figure 6 The fifth schematic diagram of the cluster management method provided in the embodiments of the application is shown in the figure. The method comprises the following steps:
[0120] S601, sending a registration instruction to the platform.
[0121] The registration instruction is used to indicate the cluster to be registered.
[0122] S602, obtaining an authentication parameter sent by the platform in response to the registration instruction.
[0123] The authentication parameter is obtained by the platform after registering the target cluster in the cloud, and the target cluster is indicated by the registration instruction.
[0124] S603, identity authentication of the cloud is completed through the authentication parameter, and the use permission of the target cluster is obtained and the target cluster is used.
[0125] By using the above embodiment, the authentication parameter is agreed after the target cluster is registered in the cloud by the platform, and the identity authentication of the cloud is completed by the client using the authentication parameter, so that the use permission of the target cluster is obtained. This identity authentication process prevents the access of illegal users, ensures that only the authorized client can access and use the target cluster, enhances the security of the cluster, reduces the risk of user information and data leakage, protects the security of user data, and solves the above-mentioned problem one.
[0126] For the description of steps S601-S603, refer to the description of steps S101-S103, which will not be repeated here.
[0127] In one possible embodiment, as described above, the authentication parameter includes an authentication mechanism, an authentication protocol, an access key, etc.
[0128] In another possible embodiment, in order to more accurately and securely realize the access control of the client to the target cluster and ensure that only the legally authorized client can use the specific cluster resource, the authentication parameter includes a cluster identifier and a cluster password. Based on this, the above-mentioned step S603 includes:
[0129] S6031, the cluster identifier and the cluster password are sent to the cloud.
[0130] The cluster password is used to make the cloud verify whether the client has the use permission of the cluster identified by the cluster identifier.
[0131] S6032, after the verification is passed and the use permission of the cluster identified by the cluster identifier is obtained, the cluster identified by the cluster identifier is used according to the cluster password.
[0132] In steps S6031 and S6032, the cluster password is used to make the cloud verify whether the client has the use permission of the cluster identified by the cluster identifier according to the pre-stored corresponding relationship between the cluster identifier and the password. After receiving the cluster identifier and the password sent by the client, the cloud compares them with the corresponding information stored in its own database, and if they are consistent, it is considered that the client passes the verification. After the verification is passed and the use permission of the cluster identified by the cluster identifier is obtained, the client uses the cluster identified by the cluster identifier according to the permission level corresponding to the cluster password within the permission range specified by the cloud.
[0133] Applying the above embodiment, the cluster identifier can uniquely determine the specific cluster that the client wants to access, avoiding operation errors caused by cluster confusion. The cluster password is not only used for identity authentication, but also associated with a specific permission level. When verifying the cluster password, the cloud determines the permission range of the client according to the password, which ensures that the client can only operate the cluster within the authorized range, avoiding risks and errors caused by unauthorized operations.
[0134] Corresponding to the foregoing cluster management method applied to the platform, the application also provides a cluster management device applied to the platform, which is described in detail as follows: Figure 7 , Figure 7 The first schematic diagram of the cluster management device provided in the embodiments of the application includes:
[0135] The judgment module 701 is configured to determine the cluster indicated by the registration instruction sent by the client in response to the registration instruction, and determine whether the cluster is a cloud cluster according to the cluster identifier; wherein the registration instruction includes the cluster identifier;
[0136] The agreement module 702 is configured to register the cluster indicated by the registration instruction as a target cluster in the cloud if the cluster is a cloud cluster, and agree on an authentication parameter with the cloud for the target cluster; wherein the authentication parameter is used to enable the client to complete identity authentication of the cloud through the authentication parameter to obtain the use permission of the target cluster;
[0137] The sending module 703 is configured to obtain the authentication parameter and send the authentication parameter to the client.
[0138] Applying the above embodiment, by responding to the registration instruction sent by the client and determining whether the cluster is a cloud cluster according to the cluster identifier contained therein, different types of clusters can be accurately identified. When it is determined that the cluster is a cloud cluster, the cluster is registered as a target cluster in the cloud, and an authentication parameter is agreed with the cloud. The authentication parameter is obtained and sent to the client, so that the client can complete identity authentication and obtain the use permission of the target cluster according to the parameter. The setting of the authentication parameter makes the client have to pass the identity authentication to obtain the use permission of the target cluster, preventing unauthorized access, enhancing the security of the cloud cluster, reducing the risk of user information and data leakage, protecting the security of user data, and solving the foregoing problem 1.
[0139] In a possible implementation, the judgment module includes:
[0140] The first sub-module is configured to obtain the cluster performance parameter contained in the registration instruction;
[0141] A judgment second submodule is configured to determine a cluster performance parameter indicated by the selection instruction as a target performance parameter in response to a selection instruction for the cluster performance parameter.
[0142] A judgment third submodule is configured to determine the cluster indicated by the target performance parameter as the cluster indicated by the registration instruction.
[0143] In a possible implementation, the target performance parameter is used to represent a system resource required to be allocated to the cluster, and the device further comprises:
[0144] A first acquisition module is configured to acquire a system resource allocated to the target cluster as a target system resource.
[0145] A second acquisition module is configured to acquire a system resource currently actually used by the target cluster as a current system resource.
[0146] A calculation module is configured to calculate a ratio of the current system resource to the target system resource as a resource proportion of the target cluster.
[0147] A comparison module is configured to compare the resource proportion with a preset threshold to obtain a comparison result.
[0148] An adjustment module is configured to adjust the target performance parameter of the target cluster according to the comparison result, wherein the adjusted target performance parameter is used to represent the current system resource.
[0149] Corresponding to the foregoing cluster management method applied to a client, the application further provides a cluster management device applied to a client, which is described below with reference to Figure 8 , Figure 8 A second schematic diagram of the cluster management device provided in the embodiments of the application comprises:
[0150] A registration module 801 is configured to send a registration instruction to a platform, wherein the registration instruction is used to indicate a cluster required to be registered.
[0151] A third acquisition module 802 is configured to acquire an authentication parameter sent by the platform in response to the registration instruction, wherein the authentication parameter is obtained by the platform and a cloud after the platform registers a target cluster in the cloud; and the target cluster is the cluster indicated by the registration instruction.
[0152] A verification module 803 is configured to complete identity verification of the cloud by using the authentication parameter, acquire a use right of the target cluster, and use the target cluster.
[0153] By applying the above embodiments, after the platform registers the target cluster in the cloud and agrees on authentication parameters, the client uses these authentication parameters to complete the identity verification in the cloud, thereby obtaining the right to use the target cluster. This identity verification process prevents unauthorized users from accessing the cluster, ensuring that only authorized clients can access and use the target cluster, enhancing the cluster's security, reducing the risk of user information and data leakage, protecting user data security, and solving the aforementioned problem one.
[0154] In one possible implementation, the authentication parameters include a cluster identifier and a cluster password;
[0155] The verification module includes:
[0156] The first verification submodule is used to send the cluster identifier and the cluster password to the cloud; wherein, the cluster password is used by the cloud to verify whether the client has usage rights to the cluster identified by the cluster identifier;
[0157] The second submodule is used to verify the cluster identifier and, after successful verification and obtaining access to the cluster identified by the cluster identifier, use the cluster identifier identified by the cluster identifier according to the cluster password.
[0158] This invention also provides an electronic device, such as... Figure 9 As shown, it includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0159] Memory 903 is used to store computer programs;
[0160] When processor 901 executes a program stored in memory 903, it performs the following steps:
[0161] In response to a registration instruction sent by the client, the system determines the cluster indicated by the registration instruction and judges whether the cluster is a cloud cluster based on the cluster identifier; wherein, the registration instruction includes the cluster identifier;
[0162] If the cluster is a cloud cluster, then the cluster indicated by the registration instruction is registered in the cloud as the target cluster, and authentication parameters are agreed upon with the cloud for the target cluster; wherein, the authentication parameters are used to enable the client to complete the authentication of the cloud through the authentication parameters to obtain the access rights of the target cluster.
[0163] Obtain the authentication parameters and send the authentication parameters to the client;
[0164] or,
[0165] sending a registration instruction to the platform; wherein the registration instruction is used to indicate a cluster required to be registered;
[0166] obtaining an authentication parameter sent by the platform in response to the registration instruction; wherein the authentication parameter is obtained by the platform after registering a target cluster in the cloud, and the target cluster is indicated by the registration instruction;
[0167] completing the identity verification of the cloud through the authentication parameter, obtaining the use permission of the target cluster and using the target cluster.
[0168] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0169] The communication interface is used for communication between the terminal and other devices.
[0170] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0171] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0172] In yet another embodiment of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program, when executed by a processor, implements the cluster management method according to any one of the above embodiments.
[0173] In yet another embodiment of the present application, a computer program product containing instructions which, when executed on a computer, cause the computer to carry out the cluster management method according to any one of the above embodiments is provided.
[0174] In the above embodiments, the implementation can be wholly or partially in software, hardware, firmware or any combination thereof. When implemented in software, the implementation can be in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer program instructions cause the computer to carry out the processes or functions described in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)) and the like.
[0175] It should be noted that, in this document, the terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0176] The various embodiments in the specification are described in a related manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0177] The above only describes the preferred embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A cluster management method applied to a platform, characterized in that, The method comprises: In response to a registration instruction sent by a client, determining a cluster indicated by the registration instruction, and judging whether the cluster is a cloud cluster according to a cluster identifier; wherein the registration instruction comprises the cluster identifier; If the cluster is a cloud cluster, registering the cluster indicated by the registration instruction as a target cluster on a cloud, and agreeing on an authentication parameter with the cloud for the target cluster; wherein the authentication parameter is used to enable the client to complete identity verification of the cloud by using the authentication parameter to obtain use permission of the target cluster; Obtaining the authentication parameter and sending the authentication parameter to the client.
2. The method of claim 1, wherein, The determination of the cluster indicated by the registration instruction comprises: Obtaining a cluster performance parameter contained in the registration instruction; In response to a selection instruction for the cluster performance parameter, determining a cluster performance parameter indicated by the selection instruction as a target performance parameter; Determining the cluster indicated by the target performance parameter as the cluster indicated by the registration instruction.
3. The method of claim 2, wherein, The target performance parameter is used to represent system resources required to be allocated to the cluster, and the method further comprises: Obtaining system resources allocated to the target cluster as target system resources; Obtaining system resources currently actually used by the target cluster as current system resources; Calculating a ratio of the current system resources to the target system resources as a resource proportion of the target cluster; Comparing the resource proportion with a preset threshold to obtain a comparison result; Adjusting the target performance parameter of the target cluster according to the comparison result; wherein the adjusted target performance parameter is used to represent the current system resources.
4. A cluster management method applied to a client, characterized in that, The method comprises: Sending a registration instruction to a platform; wherein the registration instruction is used to indicate a cluster required to be registered; Obtaining an authentication parameter sent by the platform in response to the registration instruction; wherein the authentication parameter is obtained by the platform after registering a target cluster on a cloud and agreeing on the target cluster with the cloud; the target cluster is indicated by the registration instruction; Completing identity verification of the cloud by using the authentication parameter, obtaining use permission of the target cluster, and using the target cluster.
5. The method of claim 4, wherein, The authentication parameter comprises a cluster identifier and a cluster password; The completion of identity verification of the cloud by using the authentication parameter, the obtaining of use permission of the target cluster, and the use of the target cluster comprise: Sending the cluster identifier and the cluster password to the cloud; wherein the cluster password is used to enable the cloud to verify whether the client has use permission of a cluster identified by the cluster identifier; After the verification is passed and the use permission of the cluster identified by the cluster identifier is obtained, using the cluster identified by the cluster identifier according to the cluster password. 6.A cluster management apparatus applied to a platform, characterized in that, The device comprises: A judgment module configured to, in response to a registration instruction sent by a client, determine a cluster indicated by the registration instruction, and judge whether the cluster is a cloud cluster according to a cluster identifier; wherein the registration instruction comprises the cluster identifier. The arrangement module is configured to, if the cluster is a cloud cluster, register the cluster indicated by the registration instruction as a target cluster on a cloud, and arrange an authentication parameter with the cloud for the target cluster; wherein the authentication parameter is used to enable the client to complete identity verification of the cloud by using the authentication parameter to obtain a use right of the target cluster. The sending module is configured to obtain the authentication parameter, and send the authentication parameter to the client.
7. The apparatus of claim 6, wherein, The judgment module comprises: The first judgment submodule is configured to obtain a cluster performance parameter contained in the registration instruction. The second judgment submodule is configured to determine a cluster performance parameter indicated by a selection instruction as a target performance parameter in response to the selection instruction. The third judgment submodule is configured to determine a cluster indicated by the target performance parameter as the cluster indicated by the registration instruction. The target performance parameter is used to represent a system resource required to be allocated to the cluster, and the device further comprises: The first obtaining module is configured to obtain a system resource allocated to the target cluster as a target system resource. The second obtaining module is configured to obtain a system resource currently actually used by the target cluster as a current system resource. The calculation module is configured to calculate a ratio of the current system resource to the target system resource as a resource proportion of the target cluster. The comparison module is configured to compare the resource proportion with a preset threshold to obtain a comparison result. The adjustment module is configured to adjust the target performance parameter of the target cluster according to the comparison result; wherein the adjusted target performance parameter is used to represent the current system resource.
8. A cluster management apparatus applied to a client, characterized in that, The device comprises: The registration module is configured to send a registration instruction to a platform; wherein the registration instruction is used to indicate a cluster required to be registered. The third obtaining module is configured to obtain an authentication parameter sent by the platform in response to the registration instruction; wherein the authentication parameter is obtained by the platform after registering a target cluster on a cloud, and the target cluster is indicated by the registration instruction. The verification module is configured to complete identity verification of the cloud by using the authentication parameter, obtain a use right of the target cluster, and use the target cluster.
9. The apparatus of claim 8, wherein, The authentication parameter comprises a cluster identifier and a cluster password. The verification module comprises: The first verification submodule is configured to send the cluster identifier and the cluster password to the cloud; wherein the cluster password is used to enable the cloud to verify whether the client has a use right of a cluster identified by the cluster identifier. The second verification submodule is configured to use the cluster identified by the cluster identifier according to the cluster password after verification and obtaining the use right of the cluster identified by the cluster identifier.
10. An electronic device, comprising: The device comprises a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus. The memory is used to store a computer program. The processor is used to execute the program stored on the memory to implement the method steps of any one of claims 1-3 or 4-5.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps in any one of claims 1-3 or 4-5.