A cluster management method, device, equipment and storage medium

By introducing a data caching mechanism into the cluster management server, component operating data is written into the sub-cluster cache and into the database when conditions are met, which solves the problems of management server pressure and data stability in large-scale clusters, and achieves more efficient data processing. handling and safety assurance.

CN112632092BActive Publication Date: 2024-10-08BEIJING INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011505788.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-10-08
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

In a large-scale cluster environment, the management server needs to frequently interact with the database, making it difficult to guarantee data security and stability, and putting great pressure on the node where the management server is located.

Method used

The data cache switching mechanism is used to write the component operating data of each node of the cluster into the sub-cluster target cache built on at least two nodes, and then write it to the database when the set conditions are met, reducing the IO interaction between the management server and the database.

Benefits of technology

The caching mechanism reduces the pressure on the management server and improves data security and stability. Especially when the cluster size is large, it effectively alleviates concurrency and memory leak problems and improves system performance and availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112632092B_ABST
    Figure CN112632092B_ABST
Patent Text Reader

Abstract

The present application discloses a cluster management method, which is applied to a management server, and the method includes: obtaining component operation data of each node of the cluster; when the data cache switch is turned on, writing the obtained component operation data into a target cache, the target cache being a subcluster constructed based on at least two nodes of the cluster; when the set database write trigger condition is met, writing the component operation data in the target cache into the database. Applying the technical solution provided by the present application, caching the component operation data through a subcluster constructed by at least two nodes of the cluster, and then writing the component operation data in the target cache into the database when the database write trigger condition is met, can reduce the IO interaction between the management server and the database, reduce the pressure on the node where the management server is located, and ensure the security and stability of the data. The present application also discloses a cluster management device, equipment and storage medium, which have corresponding technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a cluster management method, device, equipment and storage medium. Background Art

[0002] With the rapid development of computer technology, clusters are increasingly being used in a wide range of applications, including storage and business processing. A cluster can consist of multiple nodes, each of which has components of the same or different types, such as storage components and computing components.

[0003] In actual applications, the component operation data of each node in the cluster needs to be stored in the database for persistent recording so that it can be read and called from the database when needed.

[0004] Currently, after the cluster management server obtains the component operation data of each node in the cluster, it will directly store the component operation data in the database. When the cluster scale is large, the amount of component operation data of each node will be very large, which will increase the pressure on the node where the management server is located, and the management server needs to constantly interact with the database and write data to the database, which cannot guarantee the security and stability of the data. Summary of the invention

[0005] The purpose of this application is to provide a cluster management method, device, equipment and storage medium to reduce the pressure on the node where the management server is located and ensure the security and stability of data.

[0006] In order to solve the above technical problems, this application provides the following technical solutions:

[0007] A cluster management method, applied to a management server of a cluster, the method comprising:

[0008] Obtaining component operation data of each node of the cluster;

[0009] When the data cache switch is turned on, writing the obtained component operation data into a target cache, where the target cache is a subcluster constructed based on at least two nodes of the cluster;

[0010] When a set database writing trigger condition is met, the component running data in the target cache is written into the database.

[0011] In a specific implementation of the present application, when the data cache switch is turned on, before writing the obtained component operation data into the target cache, it also includes:

[0012] Determine whether the currently enabled cache is the target cache;

[0013] If yes, the step of writing the obtained component running data into the target cache is performed.

[0014] In a specific implementation of the present application, when it is determined that the currently enabled cache is not the target cache, the method further includes:

[0015] Writing the obtained component operation data into a local cache;

[0016] When a set database writing trigger condition is met, the component running data in the local cache is written into the database.

[0017] In a specific implementation of the present application, when the data cache switch is not turned on, the method further includes:

[0018] The obtained component operation data is written into the database.

[0019] In a specific implementation of the present application, before writing the obtained component operation data into the database, the method further includes:

[0020] Determine whether the set data cache conditions are currently met;

[0021] If yes, output prompt information on whether the data cache switch is turned on;

[0022] If a non-start instruction is received from the user based on the prompt information feedback, the step of writing the obtained component operation data into the database is performed.

[0023] In a specific implementation manner of the present application, after outputting the prompt information on whether the data cache switch is turned on, the method further includes:

[0024] If an opening instruction based on the prompt information feedback from the user is received, turning on the data cache switch;

[0025] The step of writing the obtained component operation data into the target cache is executed.

[0026] In a specific implementation of the present application, whether to turn on the data cache switch is determined by the following steps:

[0027] Obtaining performance data of the cluster, the performance data including at least one of the number of nodes in the cluster and the processing capacity of the node where the management server is located;

[0028] Determine whether to turn on the data cache switch according to the performance data.

[0029] A cluster management device, applied to a management server of a cluster, comprising:

[0030] A component operation data acquisition module, used to obtain component operation data of each node of the cluster;

[0031] A component operation data cache module, used for writing the obtained component operation data into a target cache when a data cache switch is turned on, wherein the target cache is a subcluster constructed based on at least two nodes of the cluster;

[0032] The component operation data writing module is used to write the component operation data in the target cache into the database when a set database writing trigger condition is met.

[0033] A cluster management device, comprising:

[0034] Memory for storing computer programs;

[0035] A processor is used to implement the steps of any one of the above cluster management methods when executing the computer program.

[0036] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the cluster management methods described above are implemented.

[0037] By applying the technical solution provided in the embodiment of the present application, after obtaining the component operation data of each node of the cluster, the management server of the cluster writes the obtained component operation data into the target cache when the data cache switch is turned on. The target cache is a sub-cluster constructed based on at least two nodes of the cluster. When the set database write trigger condition is met, the component operation data in the target cache is written into the database. By caching the component operation data through a sub-cluster constructed by at least two nodes of the cluster, and then writing the component operation data in the target cache into the database when the database write trigger condition is met, the IO interaction between the management server and the database can be reduced, the pressure on the node where the management server is located can be reduced, and the security and stability of the data can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1This is a flow chart of an implementation of a cluster management method in an embodiment of the present application;

[0040] Figure 2 This is a schematic diagram of the structure of a cluster management device in an embodiment of the present application;

[0041] Figure 3 This is a schematic diagram of the structure of a cluster management server in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The core of this application is to provide a cluster management method, which can be applied to the management server of the cluster, such as Ambri server. Ambri is a web-based tool that supports the provisioning, management and monitoring of clusters such as Apache Hadoop. Ambri server is a server program that can interact with the agent client program deployed on each node of the cluster to obtain the component operation data of each node.

[0043] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0044] See also Figure 1 FIG. 1 is a flowchart of a cluster management method provided in an embodiment of the present application. The method may include the following steps:

[0045] S110: Obtain component operation data of each node of the cluster.

[0046] In actual applications, the management server can be deployed on a node of the cluster, and proxy clients can also be deployed on each node of the cluster. The management server can obtain the component operation data of each node of the cluster through the proxy client. After the proxy client collects the component operation data on its node, it can filter and summarize the component operation data before passing it to the management server. The component operation data passed to the management server by each proxy server has the same data format.

[0047] On the one hand, the proxy client in each node can report the component operation data of all components in the node. It can report every 10 seconds through the heartbeat method, or establish a websocket connection through Stomp for timely push. Regardless of the method of reporting data, it must be centrally processed on the management server. Stomp is a simple interoperable protocol that is used for asynchronous messaging between clients through an intermediate server. It defines a text format for messaging between clients and servers.

[0048] On the other hand, when an interface request such as component operation is initiated on a Web page, the management server parses the API (Application Programming Interface) request sent by the page and sends it to each proxy client for operation. After the proxy client performs specific operations, it sends a series of component operation data, such as operation information, necessary logs, operation status, etc., to the management server.

[0049] S120: When the data cache switch is turned on, the obtained component operation data is written into the target cache.

[0050] The target cache is a subcluster built on at least two nodes of the cluster.

[0051] In actual applications, the component operation data of each node obtained by the management server must eventually be written into the database for persistent storage. If the component operation data is written directly into the database, when the cluster scale is large, the amount of component operation data of each node will be very large, which will increase the pressure on the management server, and the management server needs to constantly interact with the database to write data into the database, which cannot guarantee the security and stability of the data.

[0052] Therefore, the embodiment of the present application pre-sets whether the data cache switch is turned on or off. Specifically, the following steps can be used to determine whether to turn on the data cache switch:

[0053] Step 1: Obtain performance data of the cluster, where the performance data includes at least one of the number of nodes in the cluster and the processing capacity of the node where the management server is located;

[0054] Step 2: Determine whether to enable the data cache switch based on performance data.

[0055] For ease of description, the above two steps are combined for illustration.

[0056] When the cluster deployment is completed, the performance data of the cluster can be obtained first. The performance data can include at least one of the number of nodes in the cluster and the processing capacity of the node where the management server is located. Of course, other information can also be included according to the actual situation. It can be understood that the larger the number of nodes in the cluster, the larger the amount of component operation data, the greater the processing capacity of the node where the management server is located, and the faster the component operation data can be processed. The processing capacity can be quantified by the memory size, the number of CPUs, etc.

[0057] Whether to enable the data cache switch can be determined based on the performance data. If the number of nodes in the cluster is greater than the set node number threshold, the data cache switch can be enabled. If the processing capacity of the node where the management server is located is less than the preset capacity threshold, the data cache switch can be enabled. Of course, different factors can be considered comprehensively to determine whether to enable the data cache switch according to the set rules.

[0058] After the management server obtains the component operation data of each node of the cluster, it can determine whether to write the component operation data into the cache by turning on or off the data cache switch.

[0059] When the data cache switch is turned on, the obtained component operation data can be written to the target cache. The target cache is a subcluster built based on at least two nodes of the cluster. A subcluster can be built based on at least two nodes of the cluster, such as the redis (Remote Dictionary Server) subcluster. Redis is an open source log-type, Key-Value database written in ANSI C language, supporting the network, and can be based on memory or persistence.

[0060] The obtained component operation data is written into the target cache, that is, the component operation data is dispersed and stored in multiple nodes, which can better alleviate the pressure on the node where the management server is located.

[0061] S130: When the set database writing trigger condition is met, the component running data in the target cache is written into the database.

[0062] In an embodiment of the present application, a database write trigger condition can be set in advance, such as when a set time interval is reached, the set database write trigger condition is considered to be met, or when the amount of component running data in the target cache reaches a set data amount threshold, the set database write trigger condition is considered to be met.

[0063] After obtaining the component operation data of each node of the cluster, as long as the data cache switch is turned on, the obtained component operation data will be written to the target cache. When the set database write trigger condition is met, the component operation data in the target cache can be written to the database. Writing component operation data to the target cache and writing component operation data in the target cache to the database can be performed at the same time. When the set database write trigger condition is met, the component operation data in the target cache can be written to the database multiple times at a scheduled time, and each time the set amount of component operation data in the target cache can be written to the database.

[0064] The management server can start multiple threads to handle related transactions at the same time. For example, one thread is used to collect component operation data actively reported by each proxy client, one thread is used to process interface requests such as component operations initiated by web pages, one thread is used to write component operation data to the target cache, and one thread is used to write component operation data in the target cache to the database.

[0065] By applying the method provided in the embodiment of the present application, after obtaining the component operation data of each node of the cluster, the management server of the cluster writes the obtained component operation data into the target cache when the data cache switch is turned on. The target cache is a sub-cluster constructed based on at least two nodes of the cluster. When the set database write trigger condition is met, the component operation data in the target cache is written into the database. By caching the component operation data through a sub-cluster constructed by at least two nodes of the cluster, and then writing the component operation data in the target cache into the database when the database write trigger condition is met, the IO interaction between the management server and the database can be reduced, the pressure on the node where the management server is located can be reduced, and the security and stability of the data can be guaranteed.

[0066] The embodiments of the present application are more effective when the cluster scale is large. Because when the cluster scale is large, all nodes report information together, which will lead to an increase in the concurrency of the management server, and may cause memory leaks, operation jams, server crashes and other problems. Using the target cache for caching can effectively alleviate the pressure on the node where the management server is located. Writing component operation data to the target cache can be separated from the management server, reducing server pressure and improving server stability. At the same time, when the target cache is a redis subcluster, the read and write speeds are faster, which improves stability and performance. In addition, the redis subcluster itself is also highly available, which further ensures the security of the data. Even if the management server crashes and restarts, the cached data in the redis subcluster can be well synchronized after the server restarts.

[0067] In one embodiment of the present application, when the data cache switch is turned on, before writing the obtained component operation data into the target cache, the method may further include the following steps:

[0068] Determine whether the currently enabled cache is the target cache; if so, execute the step of writing the obtained component running data into the target cache.

[0069] In the embodiment of the present application, multiple cache modes can be set according to actual conditions. After the management server obtains the component operation data of each node of the cluster, it can further determine whether the currently enabled cache is the target cache when the data cache switch is turned on. If it is the target cache, the obtained component operation data is written to the target cache.

[0070] When it is determined that the currently enabled cache is not the target cache, the obtained component operation data can be written into the local cache, and when the set database write trigger condition is met, the component operation data in the local cache is written into the database.

[0071] The cache mode set in the embodiment of the present application may include target cache and local cache. The target cache is a sub-cluster constructed based on at least two nodes of the cluster, and the local cache is the node where the management server is located. When the cluster scale is not large, the local cache mode can be used, and when the cluster scale is large, the target cache mode can be used. This can effectively avoid the memory leakage problem that is prone to occur when using the local cache mode, so as to better process the cache information.

[0072] When it is determined that the currently enabled cache is not the target cache, it can be determined that the currently enabled cache is the local cache. The obtained component operation data can be written into the local cache. When the set database write trigger condition is met, the component operation data in the local cache is written into the database.

[0073] Determine whether to use target cache or local cache based on actual needs to facilitate the management server to quickly process component operation data.

[0074] In one embodiment of the present application, when the data cache switch is not turned on, the method may further include the following steps:

[0075] The obtained component operation data is written into the database.

[0076] In the embodiment of the present application, after the management server obtains the component operation data of each node of the cluster, when the data cache switch is not turned on, the obtained component operation data can be directly written into the database, so as to perform subsequent information search on the database.

[0077] In a specific embodiment of the present application, before writing the obtained component operation data into the database, it is also possible to first determine whether the set data caching conditions are currently met. If so, a prompt message is output regarding whether the data cache switch is turned on. If a user's instruction not to turn it on based on the prompt message feedback is received, the step of writing the obtained component operation data into the database is executed.

[0078] After the management server obtains the component operation data of each node of the cluster, it can determine whether the set data cache conditions are currently met when the data cache switch is not turned on. Specifically, it can determine whether the set cache conditions are met based on information such as the number of nodes in the current cluster and the load of the node where the management server is located. If the conditions are met, a prompt message is output to indicate whether the data cache switch is turned on, so that the user can determine whether to turn on the data cache switch based on the prompt message.

[0079] If a non-start instruction is received from the user based on the prompt information feedback, the obtained component operation data may be written into the database.

[0080] After outputting the prompt information on whether the data cache switch is turned on, if an on instruction based on the prompt information feedback from the user is received, the data cache switch is turned on, and the step of writing the obtained component running data into the target cache is performed.

[0081] The user can provide feedback on the prompt information according to the actual situation. If an opening instruction based on the user's feedback on the prompt information is received, the data cache switch can be turned on, and then the obtained component operation data is written into the target cache.

[0082] Corresponding to the above method embodiment, the embodiment of the present application further provides a cluster management device, which is applied to a management server of a cluster. The cluster management device described below and the cluster management method described above can be referred to each other.

[0083] See also Figure 2 As shown, the device may include the following modules:

[0084] The component operation data acquisition module 210 is used to obtain the component operation data of each node of the cluster;

[0085] The component operation data cache module 220 is used to write the obtained component operation data into a target cache when the data cache switch is turned on. The target cache is a sub-cluster constructed based on at least two nodes of the cluster;

[0086] The component operation data writing module 230 is used to write the component operation data in the target cache into the database when a set database writing trigger condition is met.

[0087] By using the device provided in the embodiment of the present application, after obtaining the component operation data of each node of the cluster, the management server of the cluster writes the obtained component operation data into the target cache when the data cache switch is turned on. The target cache is a sub-cluster constructed based on at least two nodes of the cluster. When the set database write trigger condition is met, the component operation data in the target cache is written into the database. By caching the component operation data through a sub-cluster constructed by at least two nodes of the cluster, and then writing the component operation data in the target cache into the database when the database write trigger condition is met, the IO interaction between the management server and the database can be reduced, the pressure on the node where the management server is located can be reduced, and the security and stability of the data can be guaranteed.

[0088] In a specific implementation of the present application, a cache determination module is also included for enabling:

[0089] When the data cache switch is turned on, before writing the obtained component operation data into the target cache, determining whether the currently enabled cache is the target cache;

[0090] If yes, the component operation data cache module 220 is triggered to execute the step of writing the obtained component operation data into the target cache.

[0091] In a specific implementation of the present application, the component runs the data cache module 220, and is also used to:

[0092] When it is determined that the currently enabled cache is not the target cache, the obtained component running data is written into the local cache;

[0093] When the set database write trigger condition is met, the component operation data in the local cache is written to the database.

[0094] In a specific implementation of the present application, the component operation data writing module 230 is further used to:

[0095] When the data cache switch is not turned on, the obtained component operation data is written into the database.

[0096] In a specific implementation of the present application, it also includes:

[0097] A cache determination module is used to determine whether the set data cache condition is currently met before writing the obtained component operation data into the database; if yes, the prompt information output module is triggered;

[0098] A prompt information output module is used to output prompt information on whether the data cache switch is turned on;

[0099] The component operation data writing module 230 is further used to execute the step of writing the obtained component operation data into the database when receiving a non-start instruction from the user based on the prompt information feedback.

[0100] In a specific implementation of the present application, the component operation data writing module 230 is further used to:

[0101] After outputting the prompt information on whether the data cache switch is turned on, if an on instruction based on the prompt information feedback from the user is received, the data cache switch is turned on; and the step of writing the obtained component running data into the target cache is performed.

[0102] In a specific implementation of the present application, a data cache switch is also included to determine whether to turn on the data cache switch through the following steps:

[0103] Obtaining performance data of the cluster, the performance data including at least one of the number of nodes in the cluster and the processing capacity of the node where the management server is located;

[0104] Determine whether to enable the data cache switch based on performance data.

[0105] Corresponding to the above method embodiment, the embodiment of the present application further provides a cluster management device, including:

[0106] Memory for storing computer programs;

[0107] The processor is used to implement the steps of the above cluster management method when executing the computer program.

[0108] like Figure 3 , which is a schematic diagram of the structure of a cluster management device, the cluster management device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 communicate with each other through the communication bus 13.

[0109] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0110] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of the cluster management method.

[0111] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0112] Obtain component operation data of each node in the cluster;

[0113] When the data cache switch is turned on, the obtained component operation data is written to the target cache, which is a subcluster built based on at least two nodes of the cluster;

[0114] When the set database write trigger condition is met, the component running data in the target cache is written to the database.

[0115] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required for at least one function (such as information interaction function, data reading and writing function), etc.; the data storage area can store data created during use, such as component operation data, cache data, etc.

[0116] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0117] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0118] Of course, it should be noted that Figure 3 The structure shown does not constitute a limitation on the cluster management device in the embodiment of the present application. In actual applications, the cluster management device may include Figure 3 More or fewer components than shown, or combinations of certain components.

[0119] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above cluster management method are implemented.

[0120] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0121] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0122] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0123] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the technical solution and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A cluster management method, characterized in that: Applied to a management server of a cluster, the method comprises: Obtaining component operation data of each node of the cluster; When the data cache switch is turned on, writing the obtained component operation data into a target cache, where the target cache is a subcluster constructed based on at least two nodes of the cluster; When a set database writing trigger condition is met, writing the component running data in the target cache into the database; When the data cache switch is not turned on, it also includes: Writing the obtained component operation data into the database; Before writing the obtained component operation data into the database, the method further includes: Determine whether the set data cache conditions are currently met; If yes, output prompt information on whether the data cache switch is turned on; If a non-start instruction is received from the user based on the prompt information feedback, the step of writing the obtained component operation data into the database is executed; After outputting the prompt information on whether the data cache switch is turned on, the method further includes: If an opening instruction based on the prompt information feedback from the user is received, turning on the data cache switch; Execute the step of writing the obtained component operation data into the target cache; Determine whether to enable the data cache switch by following the steps below: Obtaining performance data of the cluster, the performance data including at least one of the number of nodes in the cluster and the processing capacity of the node where the management server is located; Determining whether to turn on the data cache switch according to the performance data; In addition, a proxy client is deployed on each node of the cluster, and the management server can obtain the component operation data of each node through the proxy client; wherein, after the proxy client collects the component operation data on the node, it performs information screening and aggregation processing on the component operation data, and sends the processed component operation data to the management server.

2. The method according to claim 1, characterized in that When the data cache switch is turned on, before writing the obtained component operation data into the target cache, the method further includes: Determine whether the currently enabled cache is the target cache; If yes, the step of writing the obtained component running data into the target cache is performed.

3. The method according to claim 2, characterized in that In the case where it is determined that the currently enabled cache is not the target cache, the method further includes: Writing the obtained component operation data into a local cache; When a set database writing trigger condition is met, the component running data in the local cache is written into the database.

4. A cluster management device, characterized in that: Applied to a management server of a cluster, the device comprises: A component operation data acquisition module, used to obtain component operation data of each node of the cluster; A component operation data cache module, used for writing the obtained component operation data into a target cache when a data cache switch is turned on, wherein the target cache is a subcluster constructed based on at least two nodes of the cluster; A component operation data writing module, used for writing the component operation data in the target cache into a database when a set database writing trigger condition is met; The component runs a data writing module and is also used for: When the data cache switch is not turned on, the obtained component operation data is written into the database; The device also includes: A cache determination module is used to determine whether the set data cache condition is currently met before writing the obtained component operation data into the database; if yes, the prompt information output module is triggered; A prompt information output module is used to output prompt information on whether the data cache switch is turned on; The component operation data writing module is further used to execute the step of writing the obtained component operation data into the database when receiving a non-start instruction from the user based on the prompt information feedback; The component runs the data writing module and is also used to: After outputting the prompt information on whether the data cache switch is turned on, if an on instruction based on the prompt information feedback from the user is received, the data cache switch is turned on; and the step of writing the obtained component operation data into the target cache is executed; The device is further used to determine whether to turn on the data cache switch through the following steps: Obtaining performance data of the cluster, the performance data including at least one of the number of nodes in the cluster and the processing capacity of the node where the management server is located; determining whether to turn on the data cache switch according to the performance data; In addition, a proxy client is deployed on each node of the cluster, and the management server can obtain the component operation data of each node through the proxy client; wherein, after the proxy client collects the component operation data on the node, it performs information screening and aggregation processing on the component operation data, and sends the processed component operation data to the management server.

5. A cluster management device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the cluster management method according to any one of claims 1 to 3 when executing the computer program.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cluster management method according to any one of claims 1 to 3 are implemented.