Cache service cluster real-time monitoring method, device, electronic device and medium
Through real-time monitoring and visualization of the status of the cache service cluster, the problems of inefficient monitoring and difficult problem location in the existing technology are solved, and more efficient monitoring and faster troubleshooting are achieved.
Patent Information
- Application Number
- CN202311261749.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The lack of real-time monitoring and visualization support for cache service clusters in the existing technology makes it difficult for developers to accurately troubleshoot problems, are inefficient, and may lead to data loss.
It provides a real-time monitoring method for cache service clusters. By periodically obtaining cache service node data of each node in the cluster, performing aggregation processing, generating a visual status diagram, and updating it in real time, it is used to display the cache service node status and cluster status of the cluster, and performing status verification at the same time.
Real-time visual monitoring of the cache service cluster is realized, monitoring efficiency and quality is improved, developers can quickly locate and solve problems, and avoid the risk of data loss.
Smart Images

Figure CN117251341B_ABST
Abstract
Description
Technical Field
[0001] The present invention discloses a cache service cluster real-time monitoring method, device, electronic device and medium, which are intended to monitor the cache service of the cluster in real-time and visually, and belong to the field of electronic technology. Background Art
[0002] With the widespread application of cache services, more and more business systems are not satisfied with the performance of stand-alone cache services, and require cache cluster services to provide more stable and reliable data support. In the current use of cache services, cache services do not provide corresponding support for cluster status monitoring. The inspection of service status depends largely on the professional judgment of developers. At the same time, there is a lack of visual monitoring tools, which makes it impossible to clearly analyze the status of the existing cluster and solve problems in a targeted manner.
[0003] Currently, relying on developers to provide feedback on service status is inefficient. Once a service problem occurs, it will affect the overall progress of business development and even cause data loss, resulting in irreversible consequences. Moreover, developers are unable to accurately troubleshoot problems. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a method, device, electronic device and medium for real-time monitoring of a cache service cluster to improve the efficiency and quality of monitoring of the cache service cluster.
[0005] According to a first aspect of the present disclosure, a method for real-time monitoring of a cache service cluster is provided, comprising: periodically acquiring cache service node data of each node in the cluster, the cache service node data comprising a parent-child relationship between nodes in the cluster; performing aggregation processing on the cache service node data to obtain cache service cluster data; in response to a data request sent by a user, encapsulating the cache service node data and the cache service cluster data into a target object; rendering the target object to generate a visual status diagram of the cluster, the visual status diagram being updated in real time according to the periodically acquired target object, and being used to display the cache service node status and the cache service cluster status of the cluster in real time; and simultaneously verifying the cache service status in real time through the cache service node data and the cache service cluster data.
[0006] According to an embodiment of the present disclosure, responding to a data request sent by a user includes: verifying the user's permission to obtain data; in response to the user's permission to obtain data being verified, verifying the validity period of the user's permission to obtain data; in response to the user's permission to obtain data being verified, processing the data request sent by the user.
[0007] According to an embodiment of the present disclosure, periodically obtaining cache service node data of a cluster also includes: verifying the cache service node data; wherein the cache service node data reflects the node status; in response to an abnormality in the cache service node data, sending the node alarm information and updating the visual status diagram at the same time.
[0008] According to an embodiment of the present disclosure, cache service node data includes the parent-child relationship between nodes in the cluster, including: obtaining the cache service node data of the master node of the cluster, marked as the parent node; obtaining the slave node cache service node data of the master node of the cluster; traversing each node in the cluster and storing the parent-child relationship of each node in the cluster.
[0009] According to an embodiment of the present disclosure, cache service node data and cache service cluster data are encapsulated into a target object, including: encapsulating cache service node data; wherein the cache service node data at least includes a parent node, a node status, a node IP, a number of connections, a total number of keys, memory usage, a command execution speed, an inflow traffic speed, and an outflow traffic speed; in response to a user clicking on a node in a visualization status diagram, calling the cache service node data of the node according to the node IP of the node, and displaying the cache service node data of the node.
[0010] According to an embodiment of the present disclosure, the method also includes testing the cache service availability of the node by sending a request to the cache service node: in response to the cache service node setting information input by the user, connecting the cache service of the node in the cluster and setting the cache service node; and updating the visual status diagram according to the cache service node setting result.
[0011] The second aspect of the present disclosure provides a real-time monitoring device for a cache service cluster, including: a data acquisition module, used to periodically acquire cache service node data of each node in the cluster, the cache service node data including the parent-child relationship of each node in the cluster; a data processing module, used to aggregate and process the cache service node data to obtain cache service cluster data, and encapsulate the cache service node data and the cache service cluster data into a target object; a data rendering module, used to render the target object to generate a visual status diagram of the cluster, the visual status diagram is updated in real time according to the periodically acquired target object, and is used to display the cache service node status and cache service cluster status of the cluster in real time; at the same time, the cache service status is verified in real time through the cache service node data and the cache service cluster data.
[0012] According to an embodiment of the present disclosure, the device further includes a test alarm module, which is used to send an alarm message of the node in response to abnormal data of the cache service node; and to test the cache service availability by setting the cache service node.
[0013] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned cache service cluster real-time monitoring method.
[0014] A fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned cache service cluster real-time monitoring method. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0016] Figure 1 A flowchart of a method for real-time monitoring of a cache service cluster according to an embodiment of the present disclosure is schematically shown;
[0017] Figure 2A A schematic diagram of a structure of a real-time monitoring device for a cache service cluster according to an embodiment of the present disclosure is shown;
[0018] Figure 2B A flowchart of a real-time monitoring device for a cache service cluster according to an embodiment of the present disclosure is schematically shown;
[0019] Figure 3 A block diagram of an electronic device suitable for implementing a real-time monitoring method for a cache service cluster according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0020] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0021] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0022] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0023] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0024] The embodiment of the present disclosure provides a real-time monitoring method for a cache service cluster. Figure 1 A flowchart of a method for real-time monitoring of a cache service cluster according to an embodiment of the present disclosure is schematically shown, comprising: S110, periodically obtaining cache service node data of each node in the cluster, the cache service node data including the parent-child relationship between nodes in the cluster; S120, performing aggregation processing on the cache service node data to obtain cache service cluster data; S130, encapsulating the cache service node data and the cache service cluster data into a target object in response to a data request sent by a user; S140, rendering the target object to generate a visual status diagram of the cluster, the visual status diagram is updated in real time according to the target object obtained periodically, and is used to display the cache service node status and the cache service cluster status of the cluster in real time; at the same time, the cache service status is verified in real time through the cache service node data and the cache service cluster data.
[0025] In this embodiment, the visual status diagram includes cache service cluster data displayed in the form of a chart or text and cache service node data displayed in the form of a node topology diagram; wherein the node topology diagram intuitively reflects the node availability status, and the cache service node data is queried by clicking on a node in the node topology diagram.
[0026] In this embodiment, when a new node is added to the cluster, there is no need to restart the monitoring service, and the monitoring visualization status diagram can be updated through the parent-child relationship between the nodes to continuously monitor the cluster cache service.
[0027] In this embodiment, when a node in the cluster is unavailable, the visualized status diagram will intuitively display the node abnormality and report the abnormality information.
[0028] Through the embodiments of the present disclosure, cache service cluster data is obtained by aggregating the cache service node data of the cluster, and the cache service cluster data is displayed in real time in the form of a chart or text box, thereby solving the problem of not supporting cache service cluster data monitoring; the node relationship in the cluster is displayed in the form of a node topology diagram by storing the parent-child relationship of the nodes in the cluster, thereby optimizing the monitoring visualization effect.
[0029] On the basis of the above embodiment, responding to a data request sent by a user includes: verifying the user's permission to obtain data; in response to the user's permission to obtain data being verified, verifying the validity period of the user's permission to obtain data; in response to the user's permission to obtain data being verified, processing the data request sent by the user.
[0030] In this embodiment, the data request sent by the user will carry the user token, and the token will be subject to security verification of validity period. If the token is correct and within the validity period, the data request sent by the user will be responded to; otherwise, the login page will be returned.
[0031] Through the embodiments of the present disclosure, the data security of the cluster is guaranteed by verifying the user data authority and validity period.
[0032] Based on the above embodiment, periodically obtaining cache service node data of the cluster also includes: verifying the cache service node data; wherein the cache service node data reflects the node status; in response to an abnormality in the cache service node data, sending the node alarm information and updating the visual status diagram at the same time.
[0033] Through the embodiments of the present disclosure, by verifying the cache service node data obtained periodically, real-time alarms are implemented to improve operation and maintenance efficiency; by updating the visual status diagram, the node operation status is reflected in real time.
[0034] Based on the above embodiment, the cache service node data includes the parent-child relationship between nodes in the cluster, including: obtaining the first cache service node data of the master node, marked as the parent node; obtaining the slave node child cache service node data of the master node; traversing each node in the cluster and storing the parent-child relationship of each node in the cluster.
[0035] Through the embodiments of the present disclosure, by storing the parent-child relationship between nodes, a node topology diagram in a visualization status diagram is generated, the parent-child relationship of each node in the cluster is intuitively and clearly displayed, and the visualization effect of the running status of the cache service cluster is improved.
[0036] On the basis of the above embodiment, cache service node data and cache service cluster data are encapsulated into the target object, including: encapsulating cache service node data; wherein the cache service node data at least includes the parent node, node status, node IP, number of connections, total number of keys, memory usage, command execution speed, inflow traffic speed, and outflow traffic speed; in response to a user clicking on a node in the visual status diagram, calling the cache service node data of the node according to the node IP of the node, and displaying the cache service node data of the node.
[0037] In this embodiment, the node IP is used to query the specified cache service node data and view detailed information; the parent node and connection number information are used to generate a node topology diagram; the node status, total number of keys, memory usage, command execution speed, inbound traffic speed, and outbound traffic speed are used to reflect the cache service node status and generate cache service cluster data; among them, the cache service cluster data includes the number of nodes, number of connections, total number of keys, memory usage, command execution speed, outbound browsing, and inbound traffic.
[0038] According to the embodiments of the present disclosure, by clicking on a node of the visualized status diagram, the cache service node data of the corresponding node is displayed. When a node alarms, precise positioning is achieved through the node topology diagram to repair the cache service of the node.
[0039] Based on the above embodiment, the method also includes testing the cache service availability of the node by sending a request to the cache service node: in response to the cache service node setting information input by the user, connecting the cache service of the node in the cluster and setting the cache service node; and updating the visual status diagram according to the cache service node setting result.
[0040] In this embodiment, in response to a cache service node setup failure, cache service node exception information is updated to the visual status diagram.
[0041] Through the embodiments of the present disclosure, the availability of the cache service node is confirmed by connecting to the cache service node, setting the node cache and obtaining the node cache, so as to conveniently detect the service status of a single machine or a cluster service.
[0042] Figure 2A The structural block diagram of the real-time monitoring device for a cache service cluster according to an embodiment of the present disclosure is schematically shown.
[0043] like Figure 2A As shown, the cache service cluster real-time monitoring device 200 of this embodiment includes a data acquisition module 210, a data processing module 220 and a data processing module 220.
[0044] The data acquisition module 210 is used to periodically acquire cache service node data of each node in the cluster, and the cache service node data includes the parent-child relationship of each node in the cluster. In one embodiment, the data acquisition module 210 can be used to perform the operation S110 described above, which will not be repeated here.
[0045] The data processing module 220 is used to aggregate and process the cache service node data, obtain the cache service cluster data, and encapsulate the cache service node data and the cache service cluster data to the target object. In one embodiment, the data acquisition module 210 can be used to perform the operations S120 to S130 described above, which will not be repeated here.
[0046] The data rendering module 230 is used to render a visualization state diagram of the target object generation cluster. The visualization state diagram is updated in real time according to the target object obtained periodically, and is used to display the cache service node status and cache service cluster status of the cluster in real time; at the same time, the cache service status is verified in real time through the cache service node data and the cache service cluster data. In one embodiment, the data rendering module 230 can be used to perform the operation S140 described above, which will not be repeated here.
[0047] According to an embodiment of the present disclosure, the cache service cluster real-time monitoring device also includes a test alarm module for sending an alarm message of the node in response to abnormal data of the cache service node; and testing cache service availability by setting the cache service node.
[0048] According to an embodiment of the present disclosure, any multiple modules of the data acquisition module 210, the data processing module 220 and the data rendering module 230 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the data acquisition module 210, the data processing module 220 and the data rendering module 230 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the data acquisition module 210, the data processing module 220 and the data rendering module 230 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0049] Figure 2BThe flowchart of the real-time monitoring device for a cache service cluster according to an embodiment of the present disclosure is schematically shown.
[0050] In some embodiments, the data acquisition module 210 includes an authentication module and a system timer; the data processing module 220 includes an underlying data processing module, a key information management control layer, a cluster data interface control layer, a node data interface control layer, and a database (sqlite); the data rendering module 230 includes a front-end UI module; the test alarm module includes an alarm information reporting control layer, an external alarm service, and a service test interface layer.
[0051] The authentication module of the data acquisition module 210 is used to verify the user data authority and validity period; the system timer periodically calls the underlying data processing module to obtain cache service node data from the cache service.
[0052] The underlying data processing module of the data processing module 220 is used to aggregate and process the acquired cache service node data to obtain cache service cluster data; the database is used to store cache service node data and cache service cluster data; the key information management control layer is used to call the corresponding cache service node data according to the total number of keys and display it in the visual status diagram; the cluster data interface control layer and the node data interface control layer are used to call the database to encapsulate data to the target object in real time according to the visual status diagram.
[0053] The front-end UI module of the data rendering module 230 is used to render a visual state diagram of the target object generation cluster.
[0054] The alarm information reporting control layer of the test alarm module is used to determine whether there is an abnormality in the cache service node data and send an alarm message; the external alarm service is used to respond to the alarm message and handle the abnormality; the service test interface layer is used to test the cache service availability by setting the cache service node.
[0055] It should be noted that the cache service cluster real-time monitoring device provided by the embodiment of the present disclosure also has at least one of the following effects and advantages:
[0056] (1) Cache service cluster data monitoring: Aggregate cache service node data, display cache service cluster data on the page in the form of charts or text, and update it in real time.
[0057] (2) Cluster status alarm: Cache service alarm is realized through detection data; a status detection interface is provided to confirm the availability of cache service nodes by connecting to cache service nodes, setting node cache, and obtaining node cache.
[0058] (2) Cluster relationship topology diagram: Intuitively and clearly understand the parent-child relationship of each node in the cluster, improving the visualization effect of cache service cluster monitoring.
[0059] Figure 3 A block diagram of an electronic device suitable for implementing a real-time monitoring method for a cache service cluster according to an embodiment of the present disclosure is schematically shown.
[0060] like Figure 3 As shown, the electronic device 300 according to an embodiment of the present disclosure includes a processor 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage part 308 into a random access memory (RAM) 303. The processor 301 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 301 may also include an onboard memory for caching purposes. The processor 301 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0061] In RAM 303, various programs and data required for the operation of electronic device 300 are stored. Processor 301, ROM 302 and RAM 303 are connected to each other through bus 304. Processor 301 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 302 and / or RAM 303. It should be noted that the program can also be stored in one or more memories other than ROM 302 and RAM 303. Processor 301 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0062] According to an embodiment of the present disclosure, the electronic device 300 may further include an input / output (I / O) interface 305, which is also connected to the bus 304. The electronic device 300 may further include one or more of the following components connected to the I / O interface 305: an input portion 306 including a keyboard, a mouse, etc.; an output portion 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 308 including a hard disk, etc.; and a communication portion 309 including a network interface card such as a LAN card, a modem, etc. The communication portion 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage portion 308 as needed.
[0063] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0064] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM302 and / or RAM303 described above and / or one or more memories other than ROM302 and RAM303.
[0065] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.
[0066] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 301. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0067] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 309, and / or installed from the removable medium 311. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0068] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 309, and / or installed from the removable medium 311. When the computer program is executed by the processor 301, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0069] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0070] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0071] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0072] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A real-time monitoring method for a cache service cluster, characterized in that: include: Periodically obtaining cache service node data of each node in the cluster, wherein the cache service node data includes a parent-child relationship between nodes in the cluster; Aggregate the cache service node data to obtain cache service cluster data; In response to a data request sent by a user, encapsulate the cache service node data and the cache service cluster data into a target object; Rendering the target object to generate a visualization status diagram of the cluster, wherein the visualization status diagram is updated in real time according to the target object obtained periodically, and is used to display the cache service node status and cache service cluster status of the cluster in real time; and verifying the cache service status in real time through the cache service node data and the cache service cluster data; The cache service node data includes the parent-child relationship between nodes in the cluster, including: obtaining the cache service node data of the master node of the cluster, marked as the parent node; obtaining the slave node cache service node data of the master node of the cluster; traversing each node of the cluster, storing the parent-child relationship of each node in the cluster; wherein the parent-child relationship between the nodes is used to update the visual status diagram of the cluster when a new node is added; The encapsulation of cache service node data and cache service cluster data to the target object includes: encapsulating cache service node data; wherein the cache service node data at least includes a parent node, a node status, a node IP, a number of connections, a total number of keys, memory usage, a command execution speed, an inflow flow speed, and an outflow flow speed; in response to a user clicking on a node of a visualization status diagram, calling the cache service node data of the node according to the IP of the node, and displaying the cache service node data of the node; The response to the request data sent by the user includes: verifying the user's permission to obtain data; in response to the user's permission to obtain data being verified, verifying the validity period of the user's permission to obtain data; in response to the user's permission to obtain data being verified, processing the data request sent by the user; wherein the data request sent by the user carries a user token, and the token is subjected to a security verification of the validity period. If the token is correct and within the validity period, the data request sent by the user is responded to, and if the token is incorrect and / or not within the validity period, the user is returned to the login interface; The periodic acquisition of the cache service node data of the cluster further includes: verifying the cache service node data; wherein the cache service node data reflects the node status; in response to an abnormality in the cache service node data, sending the node alarm information and updating the visual status diagram at the same time; and By sending a request to the cache service node, the cache service availability of the node is tested; in response to the cache service node setting information input by the user, the cache service of the node in the cluster is connected and the cache service node is set; according to the cache service node setting result, the visual status diagram is updated.
2. A real-time monitoring device for a cache service cluster, characterized in that: include: A data acquisition module is used to periodically acquire cache service node data of each node in the cluster, wherein the cache service node data includes the parent-child relationship of each node in the cluster; wherein the cache service node data includes the parent-child relationship between nodes in the cluster, including: acquiring the cache service node data of the master node of the cluster, marked as the parent node; acquiring the slave node cache service node data of the master node of the cluster; traversing each node in the cluster, and storing the parent-child relationship of each node in the cluster; a data processing module, for aggregating and processing the cache service node data to obtain cache service cluster data, and in response to a data request sent by a user, encapsulating the cache service node data and the cache service cluster data to a target object; wherein, encapsulating the cache service node data and the cache service cluster data to a target object comprises: encapsulating the cache service node data; wherein, the cache service node data at least comprises a parent node, a node status, a node IP, a number of connections, a total number of keys, memory usage, a command execution speed, an inflow flow speed, and an outflow flow speed; in response to a user clicking on a node of a visualized state diagram, calling the cache service node data of the node according to the IP of the node, and displaying the node; The cache service node data of the point; wherein the parent-child relationship between the nodes is used to update the visual status diagram of the cluster when a new node is added; the response to the request data sent by the user includes: verifying the user's data acquisition authority; in response to the user's data acquisition authority verification being passed, verifying the user's data acquisition authority validity period; in response to the user's data acquisition authority validity period verification being passed, processing the data request sent by the user; wherein the data request sent by the user carries the user token, and the token is subjected to a security verification of the validity period. If the token is correct and within the validity period, the data request sent by the user is responded to, and if the token is incorrect and / or not within the validity period, the login interface is returned; A data rendering module is used to render a visual status diagram of the cluster generated by the target object. The visual status diagram is updated in real time according to the target object obtained periodically, and is used to display the cache service node status and cache service cluster status of the cluster in real time; at the same time, the cache service status is verified in real time through the cache service node data and the cache service cluster data; wherein, the periodic acquisition of the cache service node data of the cluster also includes: verifying the cache service node data; wherein, the cache service node data reflects the node status; in response to an abnormality in the cache service node data, sending an alarm message to the node and updating the visual status diagram at the same time; by sending a request to the cache service node, testing the cache service availability of the node; in response to the cache service node setting information input by the user, connecting the cache service of the node in the cluster and setting the cache service node; and updating the visual status diagram according to the cache service node setting result.
3. The cache service cluster real-time monitoring device according to claim 2, characterized in that: The device also includes a test alarm module, which is used to send the node alarm information in response to abnormal data of the cache service node; and test the cache service availability by setting the cache service node.
4. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to perform the method according to any one of claim 1. 5 . A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to claim 1 .
Citation Information
Patent Citations
Distributed type dynamic cache expanding method and system supporting load balancing
CN102244685A
Distributed caching system and management method of caching clusters
CN106936623A