CN115190125A - Monitoring method and device for cache cluster - Google Patents

Monitoring method and device for cache cluster Download PDF

Info

Publication number
CN115190125A
CN115190125A CN202210735890.5A CN202210735890A CN115190125A CN 115190125 A CN115190125 A CN 115190125A CN 202210735890 A CN202210735890 A CN 202210735890A CN 115190125 A CN115190125 A CN 115190125A
Authority
CN
China
Prior art keywords
data
monitored
monitoring
cache cluster
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210735890.5A
Other languages
Chinese (zh)
Inventor
贺鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202210735890.5A priority Critical patent/CN115190125A/en
Publication of CN115190125A publication Critical patent/CN115190125A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a monitoring method and a monitoring device for a cache cluster, and relates to the technical field of computers. One embodiment of the method comprises: storing data to be monitored in the cache cluster to a database; establishing a monitoring event for data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; and under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, acquiring the data to be monitored from the database, and storing the data to be monitored into the cache cluster. The embodiment can timely recover the lost data of the service system, reduce the time consumed by recovering the service system, reduce the influence on the use of the service system, ensure that the service system can normally process the service request and improve the user experience.

Description

Monitoring method and device for cache cluster
Technical Field
The invention relates to the technical field of computers, in particular to a monitoring method and a monitoring device for a cache cluster.
Background
When the service system is implemented, service cache core configuration data of the service system needs to be stored in the cache cluster. When a large amount of write-in operations occur in the service operations of part of the service systems of the cache cluster and the service operations exceed the upper limit of the memory use of the cache cluster, a memory elimination mechanism is triggered, and part of service cache core configuration data is deleted; when the cache cluster has an error, part of the configuration data of the service cache core may be lost. In the existing processing method for the loss of the service cache core configuration data, research personnel are relied to manually write the service cache core configuration data into the cache cluster again so as to recover the use of a service system.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the existing cache cluster processing mechanism can not timely recover the data lost by the service system, the time consumed for recovering the service system is long, the use of the service system is influenced, the service system can not normally process the service request, and the user experience is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a monitoring method and apparatus for a cache cluster, which can recover data lost by a service system in time, reduce time consumed for recovering the service system, reduce influence on the use of the service system, ensure that the service system can process a service request normally, and improve user experience.
To achieve the foregoing objective and in accordance with one aspect of the embodiments of the present invention, a monitoring method for a cache cluster is provided.
A monitoring method of a cache cluster comprises the following steps: storing data to be monitored in the cache cluster to a database; creating a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; and under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, acquiring the data to be monitored from the database, and storing the data to be monitored into the cache cluster.
Optionally, the storing the data to be monitored in the cache cluster to the database includes: and storing the data to be monitored in the cache cluster to the database in a preset data format according to the data structure type of the data to be monitored.
Optionally, the creating a monitoring event for the data to be monitored in the cache cluster includes: and creating a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required for accessing the cache cluster, the type of the monitoring event and the data identification of the data to be monitored.
Optionally, when the type of the monitoring event is an invalidating event subscription, the monitoring the cache cluster through the monitoring event includes: establishing a failure event monitor for the cache cluster based on the data identifier of the data to be monitored, and monitoring the cache cluster according to the failure event monitor; if the invalidation event listener monitors the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.
Optionally, when the type of the monitoring event is a polling of a timed task, the monitoring event further includes a polling frequency, and the monitoring the cache cluster by the monitoring event includes: inquiring the data to be monitored from the cache cluster through a unified scheduling platform according to the polling frequency according to the data identifier of the data to be monitored so as to monitor the cache cluster; and if the data to be monitored is not inquired, the monitoring result of the monitoring event is that the data to be monitored is invalid.
Optionally, the obtaining the data to be monitored from the database and storing the data to be monitored in the cache cluster includes: and acquiring the data to be monitored from the database by calling a cache application program interface, and storing the data to be monitored into the cache cluster.
Optionally, the monitoring event further includes monitoring personnel, and after the data to be monitored is stored in the cache cluster, the method further includes: and sending the alarm notice of the failure of the data to be monitored to the monitoring personnel so that the monitoring personnel can investigate the failure reason of the data to be monitored.
According to another aspect of the embodiments of the present invention, a monitoring apparatus for a cache cluster is provided.
A monitoring apparatus of a cache cluster, comprising: the to-be-monitored data storage module is used for storing the to-be-monitored data in the cache cluster to a database; the monitoring event creating module is used for creating a monitoring event for the data to be monitored in the cache cluster and monitoring the cache cluster through the monitoring event; and the to-be-monitored data failure processing module is used for acquiring the to-be-monitored data from the database and storing the to-be-monitored data into the cache cluster under the condition that the monitoring result of the monitoring event is that the to-be-monitored data is failed.
Optionally, the to-be-monitored data saving module is further configured to: and storing the data to be monitored in the cache cluster to the database in a preset data format according to the data structure type of the data to be monitored.
Optionally, the monitoring event creating module is further configured to: and creating a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required for accessing the cache cluster, the type of the monitoring event and the data identification of the data to be monitored.
Optionally, in a case that the type of the monitoring event is a failure event subscription, the monitoring event creating module is further configured to: establishing a failure event monitor for the cache cluster based on the data identifier of the data to be monitored, and monitoring the cache cluster according to the failure event monitor; if the invalidation event listener monitors the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.
Optionally, in a case that the type of the monitoring event is timed task polling, the monitoring event further includes a polling frequency, and the monitoring event creating module is further configured to: querying the data to be monitored from the cache cluster through a unified scheduling platform according to the polling frequency according to the data identifier of the data to be monitored so as to monitor the cache cluster; and if the data to be monitored is not inquired, the monitoring result of the monitoring event is that the data to be monitored is invalid.
Optionally, the to-be-monitored data failure processing module is further configured to: and acquiring the data to be monitored from the database by calling a cache application program interface, and storing the data to be monitored into the cache cluster.
Optionally, the system further comprises an alarm module, configured to: and sending the alarm notice of the failure of the data to be monitored to the monitoring personnel so that the monitoring personnel can investigate the failure reason of the data to be monitored.
According to yet another aspect of an embodiment of the present invention, an electronic device is provided.
An electronic device, comprising: one or more processors; the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the monitoring method of the cache cluster provided by the embodiment of the invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the monitoring method for a cache cluster provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: storing data to be monitored in the cache cluster to a database; establishing a monitoring event for data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; according to the technical scheme, under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, the data to be monitored is obtained from the database and stored in the cache cluster, the data lost by the service system can be recovered in time, the time consumed by recovering the service system is reduced, the influence on the service system is reduced, the service system can normally process service requests, and the user experience is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram illustrating main steps of a monitoring method for a cache cluster according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a monitoring method for cache clusters according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the main modules of a monitoring apparatus of a cache cluster according to one embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The existing cache cluster processing mechanism may cause the loss of the service cache core configuration when performing cache cleaning, and the problem of the service cache core configuration loss may be caused by the following situations:
1. the cache cluster is not isolated at the beginning of the design of the service system;
2. reasonable prediction is not made aiming at the growth trend of business data, and as the business is rapidly developed, the resources of a cache cluster are insufficient, and the cache cluster triggers a memory elimination mechanism;
3. the current memory elimination strategies of the cache cluster are all directed at the regular recovery of stored data, and the elimination strategies cannot be specified according to the needs of the business.
However, the existing processing method for the loss of the service cache core configuration relies on research and development to manually refresh the cache, that is, to write the service cache core configuration into the cache cluster again. This may result in that the data lost by the service system cannot be recovered in time, the time consumed for recovering the service system is long, the use of the service system is affected, the service system cannot process the service request normally, and the user experience is affected.
In order to solve the technical problems in the prior art, the present invention provides a monitoring method for a cache cluster, which is used for monitoring the cache cluster by a monitoring system. Specifically, the service system is accessed at the management end of the monitoring system based on the identifier of the service system, and a monitoring person is configured for the service system, and can receive the alarm message and operate the configuration information of the monitoring task, so that the safety standard use of the configuration of the service core configuration monitoring task is ensured. After the service system is accessed, the relevant information of the service system is stored in a database of a management terminal, so that a monitoring task is established for the service cache core configuration data of the accessed service system.
Fig. 1 is a schematic diagram illustrating main steps of a monitoring method for a cache cluster according to an embodiment of the present invention.
As shown in fig. 1, the monitoring method for a cache cluster according to an embodiment of the present invention mainly includes the following steps S101 to S103.
Step S101: and storing the data to be monitored in the cache cluster to a database.
Saving the data to be monitored in the cache cluster to the database may include: and storing the data to be monitored in the cache cluster to a database in a preset data format according to the data structure type of the data to be monitored.
Step S102: and establishing a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event.
Creating a monitoring event for data to be monitored in the cache cluster, which may include: and establishing a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required for accessing the cache cluster, the type of the monitoring event and the data identification of the data to be monitored. The type of the monitoring event can be failure event subscription or timed task polling.
In one embodiment, the data to be monitored in the cache cluster is stored in a database, and the monitoring event is created for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required for accessing the cache cluster, the type of the monitoring event, and the data identifier of the data to be monitored. Specifically, the data to be monitored can be service cache core configuration data of the service system, the service system is accessed in the management end of the embodiment of the invention based on the identifier of the service system, monitoring personnel are configured for the service system, and the monitoring personnel can receive the alarm message and operate the configuration information of the monitoring task, so that the safety standard use of the configuration of the service core configuration monitoring task is ensured. After the business system is accessed, the relevant information of the business system is stored in a MYSQL (relational database management system) database of a management end. The method includes the steps of creating a monitoring task in a management end of the embodiment of the invention, selecting a service system to which data to be monitored belongs, configuring an access address of a cache cluster corresponding to the service system and credential information (such as an account number, a password, a token and the like) required for accessing the cache cluster, writing the data to be monitored in the cache cluster into a database in a JSON (lightweight data exchange format) format according to a data structure type of the data to be monitored, namely filling key (data identification of the data to be monitored) and value (data value of the data to be monitored) of the data to be monitored in the monitoring task, selecting the type of a monitoring event (failure event subscription or timed task polling), filling basic configuration description information of the monitoring event, completing creation of the monitoring task, and storing the monitoring task into the database. The basic configuration description information may include a service line to which the data to be monitored belongs, application and influence of the data to be monitored, a name of the cache cluster, and the like, so that later-stage operation and maintenance are facilitated. The data structure type of the data to be monitored can be String, list, hash, set, etc.
In one embodiment, before creating a monitoring event of an invalidation event subscription type, it needs to be determined that the invalidation event notification related configuration of the cache cluster corresponding to the data to be monitored is a state that allows snooping by a listener.
In one embodiment, in the case that the type of the monitoring event is an invalidating event subscription, monitoring the cache cluster through the monitoring event may include: establishing a failure event monitor for the cache cluster based on the data identification of the data to be monitored, and monitoring the cache cluster according to the failure event monitor; if the failure event monitor monitors the failure message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is failed. Specifically, under the condition that the type of the monitoring event is failure event subscription, the management terminal creates a failure event listener for the cache cluster based on the key of the data to be monitored, and subscribes the expired failure message of the key. And when the failure event monitor monitors the message that the data to be monitored is failed, the monitoring result of the monitoring event is that the data to be monitored is failed.
In one embodiment, in a case that the type of the monitoring event is polling of a timed task, the monitoring event further includes a polling frequency, and monitoring the cache cluster by the monitoring event may include: inquiring the data to be monitored from the cache cluster through the unified scheduling platform according to the polling frequency according to the data identification of the data to be monitored so as to monitor the cache cluster; and if the data to be monitored is not inquired, the monitoring result of the monitoring event is that the data to be monitored is invalid. Specifically, under the condition that the type of the monitoring event is failure event subscription, the management end queries data to be monitored from the cache cluster through the unified scheduling platform according to the polling frequency, and when the key or the value of the data to be monitored is not queried, the monitoring result of the monitoring event is failure of the data to be monitored.
Step S103: and under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, acquiring the data to be monitored from the database, and storing the data to be monitored into the cache cluster.
In one embodiment, acquiring data to be monitored from a database and storing the data to be monitored in a cache cluster may include: and acquiring data to be monitored from the database by calling a cache application program interface, and storing the data to be monitored into the cache cluster. Specifically, when the monitoring result of the monitoring event is that the data to be monitored is invalid, a cache API (i.e., a cache application program interface) is automatically called, and the key and the value of the data to be monitored are obtained from the database and written into the cache cluster.
In one embodiment, the monitoring event further includes monitoring personnel, and after the data to be monitored is stored in the cache cluster, the monitoring event further includes: and sending the alarm notice of the failure of the data to be monitored to a monitoring person so that the monitoring person can investigate the failure reason of the data to be monitored. Specifically, after the invalid data to be monitored is rewritten into the cache cluster, the management end sends an alarm notification indicating that the data to be monitored is invalid to the monitoring personnel of the corresponding service system, and the mode of sending the alarm notification may be a mail notification or a short message notification, so as to prompt the monitoring personnel to check the reason for the invalid data to be monitored in time, and solve the problem as soon as possible, so as to avoid affecting the normal request of the service.
Fig. 2 is a flowchart illustrating a monitoring method for a cache cluster according to an embodiment of the present invention.
As shown in fig. 2, in an embodiment, a management end creates a monitoring event of data to be monitored, backs up the data to be monitored to a database, and creates an event listener or schedules a task to execute the monitoring event, so as to monitor whether the data to be monitored in the cache cluster is invalid. And under the condition that the management end receives the notification that the identifier (key) of the monitoring data is invalid, the management end reads the data to be monitored from the database and writes the data to the cache cluster again.
Fig. 3 is a schematic diagram of main modules of a monitoring apparatus of a cache cluster according to an embodiment of the present invention.
As shown in fig. 3, a monitoring apparatus 300 for a cache cluster according to an embodiment of the present invention mainly includes: a to-be-monitored data storage module 301, a monitoring event creation module 302, and a to-be-monitored data failure processing module 303.
And a to-be-monitored data storage module 301, configured to store the to-be-monitored data in the cache cluster to a database.
The monitoring event creating module 302 is configured to create a monitoring event for the data to be monitored in the cache cluster, and monitor the cache cluster through the monitoring event.
And the to-be-monitored data invalidation processing module 303 is configured to, when the monitoring result of the monitoring event is that the to-be-monitored data is invalid, obtain the to-be-monitored data from the database, and store the to-be-monitored data in the cache cluster.
In one embodiment, the to-be-monitored data saving module 301 is specifically configured to: and storing the data to be monitored in the cache cluster to a database in a preset data format according to the data structure type of the data to be monitored.
In an embodiment, the monitoring event creating module 302 is specifically configured to: and establishing a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required for accessing the cache cluster, the type of the monitoring event and the data identification of the data to be monitored.
In an embodiment, in a case that the type of the monitoring event is a failure event subscription, the monitoring event creating module 302 is specifically configured to: establishing a failure event monitor for the cache cluster based on the data identification of the data to be monitored, and monitoring the cache cluster according to the failure event monitor; if the invalidation event monitor monitors the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.
In an embodiment, when the type of the monitoring event is polling of the timed task, the monitoring event further includes a polling frequency, and the monitoring event creating module 302 is specifically configured to: inquiring the data to be monitored from the cache cluster through the unified scheduling platform according to the polling frequency according to the data identification of the data to be monitored so as to monitor the cache cluster; and if the data to be monitored is not inquired, the monitoring result of the monitoring event is that the data to be monitored is invalid.
In an embodiment, the to-be-monitored data invalidation processing module 303 is specifically configured to: and acquiring data to be monitored from the database by calling a cache application program interface, and storing the data to be monitored into the cache cluster.
In one embodiment, an alarm module (not shown) may be further included for: and sending the alarm notice of the failure of the data to be monitored to a monitoring person so that the monitoring person can investigate the failure reason of the data to be monitored.
In addition, in the embodiment of the present invention, the detailed implementation content of the monitoring apparatus of the cache cluster has been described in detail in the above monitoring method of the cache cluster, so that repeated content is not described herein.
Fig. 4 shows an exemplary system architecture 400 of a monitoring method of a cache cluster or a monitoring apparatus of a cache cluster to which an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The background management server can store the data to be monitored in the cache cluster to a database for the received data such as the monitoring request of the cache cluster; establishing a monitoring event for data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; and under the condition that the monitoring result of the monitoring event is failure of the data to be monitored, acquiring the data to be monitored from the database, storing the data to be monitored into the cache cluster for processing, and feeding back a processing result (for example, the monitoring result of the cache cluster, which is only an example) to the terminal equipment.
It should be noted that the monitoring method for the cache cluster provided in the embodiment of the present invention is generally executed by the server 405, and accordingly, the monitoring apparatus for the cache cluster is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for an implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device or server implementing embodiments of the present invention. The terminal device or the server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the use range of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a to-be-monitored data storage module, a monitoring event creation module and a to-be-monitored data failure processing module. The names of these modules do not form a limitation on the modules themselves in some cases, for example, the module for saving data to be monitored may also be described as a "module for saving data to be monitored in the cache cluster to the database".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: storing data to be monitored in the cache cluster to a database; establishing a monitoring event for data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; and under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, acquiring the data to be monitored from the database, and storing the data to be monitored into the cache cluster.
According to the technical scheme of the embodiment of the invention, the data to be monitored in the cache cluster is stored in a database; establishing a monitoring event for data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; and under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, acquiring the data to be monitored from the database, and storing the data to be monitored into the cache cluster. The lost data of the service system can be recovered in time, the time consumed by recovering the service system is reduced, the influence on the use of the service system is reduced, the service system can be ensured to process service requests normally, and the user experience is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A monitoring method of a cache cluster is characterized by comprising the following steps:
storing data to be monitored in the cache cluster to a database;
creating a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event;
and under the condition that the monitoring result of the monitoring event is that the data to be monitored is invalid, acquiring the data to be monitored from the database, and storing the data to be monitored into the cache cluster.
2. The method of claim 1, wherein the saving the data to be monitored in the cache cluster to the database comprises:
and storing the data to be monitored in the cache cluster to the database in a preset data format according to the data structure type of the data to be monitored.
3. The method of claim 1, wherein the creating a monitoring event for the data to be monitored in the cache cluster comprises:
and establishing a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required for accessing the cache cluster, the type of the monitoring event and the data identifier of the data to be monitored.
4. The method according to claim 3, wherein in a case that the type of the monitoring event is an invalidating event subscription, the monitoring the cache cluster through the monitoring event includes:
establishing a failure event monitor for the cache cluster based on the data identifier of the data to be monitored, and monitoring the cache cluster according to the failure event monitor;
if the invalidation event listener monitors the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.
5. The method according to claim 3, wherein in a case that the type of the monitoring event is a polling of a timed task, the monitoring event further includes a polling frequency, and the monitoring the cache cluster by the monitoring event includes:
querying the data to be monitored from the cache cluster through a unified scheduling platform according to the polling frequency according to the data identifier of the data to be monitored so as to monitor the cache cluster;
and if the data to be monitored is not inquired, the monitoring result of the monitoring event is that the data to be monitored is invalid.
6. The method according to claim 4 or 5, wherein the obtaining the data to be monitored from the database and storing the data to be monitored in the cache cluster comprises:
and acquiring the data to be monitored from the database by calling a cache application program interface, and storing the data to be monitored into the cache cluster.
7. The method of claim 5, wherein the monitoring event further comprises a monitoring person, and after the saving of the data to be monitored in the cache cluster, the method further comprises:
and sending the alarm notice of the failure of the data to be monitored to the monitoring personnel so that the monitoring personnel can investigate the failure reason of the data to be monitored.
8. A monitoring apparatus for a cache cluster, comprising:
the to-be-monitored data storage module is used for storing the to-be-monitored data in the cache cluster to a database;
the monitoring event creating module is used for creating a monitoring event for the data to be monitored in the cache cluster and monitoring the cache cluster through the monitoring event;
and the to-be-monitored data failure processing module is used for acquiring the to-be-monitored data from the database and storing the to-be-monitored data into the cache cluster under the condition that the monitoring result of the monitoring event is that the to-be-monitored data is failed.
9. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202210735890.5A 2022-06-27 2022-06-27 Monitoring method and device for cache cluster Pending CN115190125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210735890.5A CN115190125A (en) 2022-06-27 2022-06-27 Monitoring method and device for cache cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210735890.5A CN115190125A (en) 2022-06-27 2022-06-27 Monitoring method and device for cache cluster

Publications (1)

Publication Number Publication Date
CN115190125A true CN115190125A (en) 2022-10-14

Family

ID=83515044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210735890.5A Pending CN115190125A (en) 2022-06-27 2022-06-27 Monitoring method and device for cache cluster

Country Status (1)

Country Link
CN (1) CN115190125A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080010555A1 (en) * 2006-06-16 2008-01-10 Phillip Emma Method and Apparatus for Measuring the Cost of a Pipeline Event and for Displaying Images Which Permit the Visualization orf Said Cost
KR20100078116A (en) * 2008-12-30 2010-07-08 (주)코어테크놀로지 Data caching method for unity control monitoring service based usn
US20100250860A1 (en) * 2009-03-27 2010-09-30 Sap Ag Method and System for Managing Cache Invalidation
US20110145307A1 (en) * 2009-12-16 2011-06-16 International Business Machines Corporation Directory traversal in a scalable multi-node file system cache for a remote cluster file system
US9262323B1 (en) * 2012-11-26 2016-02-16 Amazon Technologies, Inc. Replication in distributed caching cluster
CN106027661A (en) * 2016-06-24 2016-10-12 四川福豆科技有限公司 Data cluster storage terminal
CN106161644A (en) * 2016-08-12 2016-11-23 珠海格力电器股份有限公司 The distributed system of data process and data processing method thereof
CN110046029A (en) * 2019-03-13 2019-07-23 平安科技(深圳)有限公司 Data processing method and device applied to multi-level buffer in cluster
CN111625427A (en) * 2020-07-03 2020-09-04 上海浦东发展银行股份有限公司 Real-time monitoring system and method for configuring central client connection health status
CN112187896A (en) * 2020-09-18 2021-01-05 成都精灵云科技有限公司 Cache system and method supporting real-time notification of changes and real-time synchronization of data
CN113032432A (en) * 2021-02-22 2021-06-25 北京齐尔布莱特科技有限公司 Data caching processing method, system, computing device and readable storage medium
CN113568932A (en) * 2021-06-11 2021-10-29 济南浪潮数据技术有限公司 Cache data management method, system and storage medium
CN114064713A (en) * 2021-10-20 2022-02-18 郑州云海信息技术有限公司 Method, device and equipment for improving stability of dolphinscheduler platform and readable medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080010555A1 (en) * 2006-06-16 2008-01-10 Phillip Emma Method and Apparatus for Measuring the Cost of a Pipeline Event and for Displaying Images Which Permit the Visualization orf Said Cost
KR20100078116A (en) * 2008-12-30 2010-07-08 (주)코어테크놀로지 Data caching method for unity control monitoring service based usn
US20100250860A1 (en) * 2009-03-27 2010-09-30 Sap Ag Method and System for Managing Cache Invalidation
US20110145307A1 (en) * 2009-12-16 2011-06-16 International Business Machines Corporation Directory traversal in a scalable multi-node file system cache for a remote cluster file system
US9262323B1 (en) * 2012-11-26 2016-02-16 Amazon Technologies, Inc. Replication in distributed caching cluster
CN106027661A (en) * 2016-06-24 2016-10-12 四川福豆科技有限公司 Data cluster storage terminal
CN106161644A (en) * 2016-08-12 2016-11-23 珠海格力电器股份有限公司 The distributed system of data process and data processing method thereof
CN110046029A (en) * 2019-03-13 2019-07-23 平安科技(深圳)有限公司 Data processing method and device applied to multi-level buffer in cluster
CN111625427A (en) * 2020-07-03 2020-09-04 上海浦东发展银行股份有限公司 Real-time monitoring system and method for configuring central client connection health status
CN112187896A (en) * 2020-09-18 2021-01-05 成都精灵云科技有限公司 Cache system and method supporting real-time notification of changes and real-time synchronization of data
CN113032432A (en) * 2021-02-22 2021-06-25 北京齐尔布莱特科技有限公司 Data caching processing method, system, computing device and readable storage medium
CN113568932A (en) * 2021-06-11 2021-10-29 济南浪潮数据技术有限公司 Cache data management method, system and storage medium
CN114064713A (en) * 2021-10-20 2022-02-18 郑州云海信息技术有限公司 Method, device and equipment for improving stability of dolphinscheduler platform and readable medium

Similar Documents

Publication Publication Date Title
CN111030784A (en) Information synchronization method and device
CN111865970B (en) Method and apparatus for implementing interface idempotency
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN109783151B (en) Method and device for rule change
CN111427701A (en) Workflow engine system and business processing method
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN111767127A (en) Service data processing method and device
CN113590437B (en) Alarm information processing method, device, equipment and medium
CN110866001A (en) Method and device for determining order to be processed
CN110534136B (en) Recording method and device
CN107818027B (en) Method and device for switching main name node and standby name node and distributed system
CN116450622B (en) Method, apparatus, device and computer readable medium for data warehouse entry
CN109445966B (en) Event processing method, device, medium and computing equipment
CN113127923A (en) Method and device for managing authority
CN115190125A (en) Monitoring method and device for cache cluster
CN115086347A (en) Data synchronization method and device, electronic equipment and storage medium
CN113220342A (en) Centralized configuration method and device, electronic equipment and storage medium
CN109087097B (en) Method and device for updating same identifier of chain code
CN113742617A (en) Cache updating method and device
CN112699116A (en) Data processing method and system
CN112711572A (en) Online capacity expansion method and device suitable for sub-warehouse and sub-meter
CN113760569B (en) Multi-account management method and system
CN110262756B (en) Method and device for caching data
CN113329010B (en) User access management method and system
CN111008202A (en) Distributed transaction processing method and framework

Legal Events

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