CN111092778A - System and method for realizing API real-time early warning based on limited time sequence data queue - Google Patents

System and method for realizing API real-time early warning based on limited time sequence data queue Download PDF

Info

Publication number
CN111092778A
CN111092778A CN201911418320.8A CN201911418320A CN111092778A CN 111092778 A CN111092778 A CN 111092778A CN 201911418320 A CN201911418320 A CN 201911418320A CN 111092778 A CN111092778 A CN 111092778A
Authority
CN
China
Prior art keywords
early warning
api
rule
time
time sequence
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
CN201911418320.8A
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.)
Guyun Technology Guangzhou Co Ltd
Original Assignee
Guyun Technology Guangzhou 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 Guyun Technology Guangzhou Co Ltd filed Critical Guyun Technology Guangzhou Co Ltd
Priority to CN201911418320.8A priority Critical patent/CN111092778A/en
Publication of CN111092778A publication Critical patent/CN111092778A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Landscapes

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

Abstract

The invention relates to the field of micro-service application programs, in particular to a system and a method for realizing API real-time early warning based on a limited time sequence data queue. The system comprises a limited time sequence queue management module, an early warning rule matcher, a response overtime early warning module, an error code early warning module and a request rate early warning module, and the method comprises the following steps: s1, creating early warning rules of various APIs; s2, adding an API URL address which needs early warning and needs early warning elimination under an early warning rule; s3, issuing an early warning rule to a calculation engine; s4, constructing a limited message queue set with a time sequence, storing the request data of all APIs, and recording the API request data in real time; s5, carrying out matching operation on API request data needing early warning and early warning rules in real time; and S6, if the operation result triggers the event defined in the early warning rule, performing corresponding early warning. The invention can provide timely and effective monitoring and early warning means for API service deployed in large scale by real-time API early warning, thereby protecting the healthy operation of the API.

Description

System and method for realizing API real-time early warning based on limited time sequence data queue
Technical Field
The invention relates to the field of micro-service application programs, in particular to a system and a method for realizing API real-time early warning based on a limited time sequence data queue.
Background
The microservice architecture is a new technology for deploying applications and services in the cloud. The microservice may run in its own program and communicate with the HTTP-type API through the lightweight device. The key is that the service can run in its own program. By this we can distinguish service exposure from microservice architecture (distributing an API in existing systems). In service publishing, many services may be restricted by internal independent processes. If any of the services requires some functionality to be added, the process must be narrowed. In the micro-service architecture, only the required functions need to be added in a specific certain service, and the architecture of the whole process is not influenced.
An API (Application Programming Interface) is a predefined function or a convention for linking different components of a software system. The goal is to provide applications and developers the ability to access a set of routines based on certain software or hardware without having to access native code or understand the details of the internal workings.
All API requests under the micro service architecture must be routed and data forwarded through the API gateway, unpredictable conditions such as response timeout, network flash, abnormal service execution, API active offline and the like often exist in an enterprise back-end service system, and risks such as service interruption or unavailability of the API gateway caused by a large number of requests of the same IP and a large flow of requests at the same time exist as a calling party of the API, because the API gateway or operation and maintenance personnel of the enterprise must sense the impending risks in real time and make countermeasures in advance, the API gateway is required to accurately send the risk information to management personnel at the first time in real time.
The existing API gateway is mainly used for forwarding HTTP flow, corresponding technical means and methods are lacked in the aspect of real-time early warning, log data are generated mainly by capturing requests of HTTP API at present, then the log data are transmitted to a database, then the requested log data of the API are subjected to post analysis to obtain corresponding indexes, and then the corresponding indexes are presented as a graphical report or early warning messages are sent.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides the system and the method for realizing the API real-time early warning based on the limited time sequence data queue, and when the system and the method are applied, a timely and effective monitoring and early warning means can be provided for the API service deployed on a large scale by an enterprise through the real-time API early warning, the operation health condition of the API can be protected in real time, and the operation quality of the API service of the enterprise is improved.
The technical scheme adopted by the invention is as follows:
the system for realizing API real-time early warning based on the limited time sequence data queue comprises a limited time sequence queue management module, an early warning rule matcher, a response overtime early warning module, an error code early warning module and a request rate early warning module; the limited time sequence queue management module is used for constructing a limited message queue set with a time sequence in a memory, storing request data of all APIs in real time through the message queue set and clearing expired API request data at regular time; the early warning rule matcher is used for performing matching calculation on received API (application program interface) related request data and preset early warning rule data; the response overtime early warning module is used for collecting the response time of the API in the message queue set in real time, sending the response time of the API to the early warning rule matcher to be matched with the early warning rule, and immediately sending an overtime early warning message to a manager when the fed-back matching result reaches a triggering condition; the error code early warning module is used for collecting the returned error codes of the API in the message queue set in real time, sending the returned error codes of the API to the early warning rule matcher to be matched with the early warning rule, and immediately sending overspeed early warning messages to managers when the fed-back matching result reaches a triggering condition; the request rate early warning module is used for collecting the request times per second of the API in the message queue set in real time, sending the request times per second of the API to the early warning rule matcher to be matched with the early warning rule, and immediately sending the overspeed early warning message to a manager when the fed-back matching result reaches a triggering condition.
Preferably, the limited time sequence queue management module creates a limited linkedlst set object, and limits the maximum data storage capacity of the set object; the early warning rule matcher reads all early warning rules into a memory, and performs cyclic operation according to the HTTP URL of the current request to see whether a certain early warning rule is matched; the processing information of the response overtime early warning module comprises a rule name, overtime time, early warning interval time, an effective server, early warning triggering times, a current state, accumulated overtime times, triggering overtime early warning times, early warning content and an event API; the processing information of the error code early warning module comprises an error code rule name, HTTP error codes, early warning interval time, an effective server, early warning triggering times, a current state, accumulated request times, HTTP error times for triggering early warning, early warning content and an event API; the processing information of the request rate early warning module comprises a rule name, a speed limit type, early warning interval time, an effective server, early warning triggering times, a current state, a rate dimension, total request times, accumulated overspeed times, early warning content and an event API.
The method for realizing API real-time early warning based on the limited time sequence data queue comprises the following steps:
s1, creating early warning rules of various APIs;
s2, adding an API URL address which needs early warning and needs early warning elimination under the created early warning rule;
s3, issuing an early warning rule to a calculation engine;
s4, constructing a limited message queue set with a time sequence, storing the request data of all APIs in real time through the message queue set, and recording the API request data in the queue in real time;
s5, carrying out matching operation on the request data corresponding to the API needing early warning in the message queue set and the early warning rule in real time;
and S6, if the operation result triggers the event defined in the early warning rule, performing corresponding early warning.
Preferably, the step S1 includes the following steps:
s11, creating a corresponding early warning rule;
s12, specifying a rule name and an early warning type containing response overtime, an error code and a request rate in the created early warning rule;
s13, setting the total request times of the accumulated early warning and the interval time of each early warning;
s14, respectively setting response overtime times, error code times and maximum request times per second according to the early warning rule types selected by the user;
and S15, saving the created early warning rule and setting the early warning rule to be in a release state.
Preferably, the step S2 includes the following steps:
s21, adding an API URL address list needing to be early-warned under the created early-warning rule, wherein the API URL address needing to be early-warned adopts a matching mode, namely, the API URL address is considered to match the rule as long as the API URL address meets the initial request;
and S22, adding an API URL address list needing to eliminate the early warning under the created early warning rule, and not participating in the matching calculation of the early warning rule as long as the requested APIURL address is in the list.
Preferably, the step S3 includes the following steps:
s31, selecting one or more early warning rules needing to be issued;
and S32, issuing the early warning rule or stopping issuing according to the user operation.
Preferably, the step S4 includes the following steps:
s41, adding the requested API data into a limited time sequence queue LinkedList;
and S42, judging whether the maximum record value of the limited time sequence queue is exceeded, and deleting the record added at the tail end if the maximum record value of the limited time sequence queue is exceeded.
Preferably, the step S5 includes the following steps:
s51, acquiring all early warning rule lists;
s52, reading the API URL address contained in each early warning rule to perform character string matching operation;
s53, the early warning rules which are successfully matched are put into the limited time sequence queue LinkedList, and the latest data in the limited time sequence queue LinkedList is taken out according to the early warning rules to be compared with the preset numerical values in the rules, so that the comparison result is obtained.
Preferably, the step S6 includes the following steps: in step S53, after the comparison result is obtained, if the pre-warning condition is satisfied, the event API in the pre-warning rule is read and the pre-warning message is sent, and if the pre-warning condition is not satisfied, the matching is unsuccessful, and the triggering of the event is cancelled.
The invention has the beneficial effects that:
the API early warning method comprises the steps of collecting API request data in real time, putting the API request data into a queue of a memory, carrying out real-time operation matching with an early warning rule configured by a URL, immediately sending early warning information to a manager when calculation is established, skipping triggering of an event when the calculation is not established, recording information such as the URL address, a caller, calling time, a request IP address, a response status code and an execution server ID triggered each time by the system after the early warning rule is triggered, providing a good monitoring and early warning means for large-scale API service deployment of enterprises through a real-time API early warning method, protecting the running health condition of the API in real time and improving the running quality of the API service of the enterprises.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of API real-time warning in embodiment 2;
fig. 2 is a schematic diagram of a real-time data storage process in embodiment 2.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto. Specific structural and functional details disclosed herein are merely illustrative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
It should be understood that the terms first, second, etc. are used merely for distinguishing between descriptions and are not intended to indicate or imply relative importance. Although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments of the present invention.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, B exists alone, and A and B exist at the same time, and the term "/and" is used herein to describe another association object relationship, which means that two relationships may exist, for example, A/and B, may mean: a alone, and both a and B alone, and further, the character "/" in this document generally means that the former and latter associated objects are in an "or" relationship.
It is to be understood that in the description of the present invention, the terms "upper", "vertical", "inside", "outside", and the like, refer to an orientation or positional relationship that is conventionally used for placing the product of the present invention, or that is conventionally understood by those skilled in the art, and are used merely for convenience in describing and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and therefore should not be considered as limiting the present invention.
It will be understood that when an element is referred to as being "connected," "connected," or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. In contrast, when an element is referred to as being "directly adjacent" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements should be interpreted in a similar manner (e.g., "between … …" versus "directly between … …", "adjacent" versus "directly adjacent", etc.).
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," and "connected" are to be construed broadly, e.g., as meaning fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," and/or "including," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, numbers, steps, operations, elements, components, and/or groups thereof.
It should also be noted that, in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed substantially concurrently, or the figures may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
In the following description, specific details are provided to facilitate a thorough understanding of example embodiments. However, it will be understood by those of ordinary skill in the art that the example embodiments may be practiced without these specific details. For example, systems may be shown in block diagrams in order not to obscure the examples in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail in order to avoid obscuring example embodiments.
Example 1:
the embodiment provides a system for realizing API real-time early warning based on a limited time sequence data queue, which includes:
response overtime early warning module: the response timeout early warning module is mainly used for setting URL (uniform resource locator) which needs to perform API (application programming interface) response time real-time early warning, creating a response timeout rule, and specifying a rule name, timeout time (millisecond), recent total request times, accumulated timeout times, a reset counter, an early warning interval, early warning message content, trigger event API (application programming interface) setting and the like in the rule. After the rule is set, the configuration data of the early warning rule can be loaded into a memory in real time when the early warning matcher runs, the situation that API performance is influenced by reading the configuration data from the database every time of matching is avoided, and after the early warning is sent once, the configuration data can be sent at intervals to avoid sending a large amount of messages to managers at the same time.
The error code early warning module: the error code early warning module is mainly used for configuring the URL which needs to carry out real-time early warning when the HTTP non-200 status code is forwarded by the API, and setting rule names, error codes (a plurality of commas are used for separating), the number of recent total requests, the number of accumulated errors, a reset counter, early warning intervals, early warning message contents, trigger event API (application program interface) and the like in the rule by establishing an error code rule. After the rule is set, the configuration data of the early warning rule can be loaded into a memory in real time when the early warning matcher runs, the situation that API performance is influenced by reading the configuration data from the database every time of matching is avoided, and after the early warning is sent once, the configuration data can be sent at intervals to avoid sending a large amount of messages to managers at the same time.
A request rate early warning module: the request rate early warning module is mainly used for carrying out early warning configuration on the API needing large concurrent requests in real time, and setting rule names, rate dimensions (same IP, same user, same URL and QPS per second), recent total request times, accumulated time reaching numbers, early warning intervals, early warning message contents, trigger event API and the like in the rules by establishing request rate early warning rules. After the rule is set, the configuration data of the early warning rule can be loaded into a memory in real time when the early warning matcher runs, the situation that API performance is influenced by reading the configuration data from the database every time of matching is avoided, and after the early warning is sent once, the configuration data can be sent at intervals to avoid sending a large amount of messages to managers at the same time.
The limited time sequence queue management module: the limited time sequence queue management module is mainly used for storing real-time request data of all APIs, because the API requests occupy more memories of a server when in large quantity, a maximum threshold value must be set for a data queue in order to control the memory quantity, when the threshold value is exceeded, a system deletes old request data, the data of the total request queue is kept unchanged, and simultaneously, the abnormal problem possibly generated by reading and writing the queue at the same time under the condition of large concurrency needs to be considered, so a synchronous lock or complex queue data must be added between reading and writing for operation, and an example implementation code of the LinkedList limited time sequence queue is given below:
Figure BDA0002351739990000081
Figure BDA0002351739990000091
Figure BDA0002351739990000101
Figure BDA0002351739990000111
early warning rule matcher: the early warning rule matcher has the main functions of loading all early warning rules into a memory, then performing URL matching with the early warning rules one by one according to a Request URL address of a current Request, starting to perform selective comparison analysis of response time, error codes and Request speed when the matching is successful, and immediately triggering an event specified in the early warning rules when comparison data is established, wherein Java implementation codes of the early warning rule matcher are as follows:
Figure BDA0002351739990000112
Figure BDA0002351739990000121
Figure BDA0002351739990000131
the API request data and queue count contrastive analysis code is implemented as follows:
Figure BDA0002351739990000132
Figure BDA0002351739990000141
Figure BDA0002351739990000151
Figure BDA0002351739990000161
according to the invention, all request data are firstly stored in a LinkedList finite set when an API requests, then real-time comparison is carried out on various parameter values preset in the early warning rule and the data in the LinkedList finite set, and when the matching is established, the system immediately triggers the early warning event and sends a message to a manager. The early warning of the API gateway system provided by the invention becomes a real-time early warning mechanism, the efficiency improvement in management and monitoring is brought on the aspect of API monitoring, so that a manager can receive response overtime early warning, error code early warning and request overspeed early warning sent by the API gateway at the first time, and therefore, the system risk processing measures are taken at the first time, and safety guarantee measures are provided for the operation of large-scale API service registration of an enterprise in the gateway.
Example 2:
the embodiment provides a method for realizing API real-time early warning based on a limited time sequence data queue, as shown in fig. 1, including the following steps:
s1, creating early warning rules of various APIs;
s2, adding an API URL address which needs early warning and needs early warning elimination under the created early warning rule;
s3, issuing an early warning rule to a calculation engine;
s4, constructing a limited message queue set with a time sequence, storing the request data of all APIs in real time through the message queue set, and recording the API request data in the queue in real time;
s5, carrying out matching operation on the request data corresponding to the API needing early warning in the message queue set and the early warning rule in real time;
and S6, if the operation result triggers the event defined in the early warning rule, performing corresponding early warning.
The specific steps of step S1 include:
s11, creating a corresponding early warning rule, and creating through a Web interface;
s12, specifying a rule name and an early warning type containing response overtime, an error code and a request rate in the created early warning rule;
s13, setting the total request times of the accumulated early warning and the interval time of each early warning;
s14, respectively setting response overtime times, error code times and maximum request times per second according to the early warning rule types selected by the user;
and S15, saving the created early warning rule and setting the early warning rule to be in a release state.
The specific steps of step S2 include:
s21, adding an API URL address list needing to be early-warned under the created early-warning rule, wherein the API URL address needing to be early-warned adopts a matching mode, namely, the API URL address is considered to match the rule as long as the API URL address meets the initial request;
and S22, adding an API URL address list needing to eliminate the early warning under the created early warning rule, and not participating in the matching calculation of the early warning rule as long as the requested APIURL address is in the list.
The specific steps of step S3 include:
s31, selecting one or more early warning rules needing to be issued;
and S32, issuing the early warning rule or stopping issuing according to the user operation.
As shown in fig. 2, the specific steps of step S4 include:
s41, adding the requested API data into a limited time sequence queue LinkedList;
and S42, judging whether the maximum record value of the limited time sequence queue is exceeded, and deleting the record added at the tail end if the maximum record value of the limited time sequence queue is exceeded.
The specific steps of step S5 include:
s51, acquiring all early warning rule lists;
s52, reading the API URL address contained in each early warning rule to perform character string matching operation;
s53, the early warning rules which are successfully matched are put into the limited time sequence queue LinkedList, and the latest data in the limited time sequence queue LinkedList is taken out according to the early warning rules to be compared with the preset numerical values in the rules, so that the comparison result is obtained.
The specific steps of step S6 include: in step S53, after the comparison result is obtained, if the pre-warning condition is satisfied, the event API in the pre-warning rule is read and the pre-warning message is sent, and if the pre-warning condition is not satisfied, the matching is unsuccessful, and the triggering of the event is cancelled.
The API request data are collected in real time and put into a queue of a memory, real-time operation matching is carried out on the API request data and an early warning rule configured by a URL, when calculation is established, the system immediately sends early warning information to a manager, when the calculation is not established, the system skips triggering of an event, after the early warning rule is triggered, the system records information such as a URL address, a caller, calling time, a request IP address, a response status code, an execution server ID and the like triggered each time, a good monitoring and early warning means is provided for large-scale API service deployment of enterprises through a real-time API early warning method, the running health condition of the API can be protected in real time, and the running quality of the API service of the.
The present invention is not limited to the above-described alternative embodiments, and various other forms of products can be obtained by anyone in light of the present invention. The above detailed description should not be taken as limiting the scope of the invention, which is defined in the claims, and which the description is intended to be interpreted accordingly.

Claims (9)

1. System for realizing API real-time early warning based on limited time sequence data queue is characterized in that: the system comprises a limited time sequence queue management module, an early warning rule matcher, a response overtime early warning module, an error code early warning module and a request rate early warning module; the limited time sequence queue management module is used for constructing a limited message queue set with a time sequence in a memory, storing request data of all APIs in real time through the message queue set and clearing expired API request data at regular time; the early warning rule matcher is used for performing matching calculation on received API (application program interface) related request data and preset early warning rule data; the response overtime early warning module is used for collecting the response time of the API in the message queue set in real time, sending the response time of the API to the early warning rule matcher to be matched with the early warning rule, and immediately sending an overtime early warning message to a manager when the fed-back matching result reaches a triggering condition; the error code early warning module is used for collecting the returned error codes of the API in the message queue set in real time, sending the returned error codes of the API to the early warning rule matcher to be matched with the early warning rule, and immediately sending overspeed early warning messages to managers when the fed-back matching result reaches a triggering condition; the request rate early warning module is used for collecting the request times per second of the API in the message queue set in real time, sending the request times per second of the API to the early warning rule matcher to be matched with the early warning rule, and immediately sending the overspeed early warning message to a manager when the fed-back matching result reaches a triggering condition.
2. The system for implementing API real-time pre-warning based on limited time sequence data queue according to claim 1, wherein: the limited time sequence queue management module creates a limited LinkedList set object, and limits the maximum data storage capacity of the set object; the early warning rule matcher reads all early warning rules into a memory, and performs cyclic operation according to the HTTP URL of the current request to see whether a certain early warning rule is matched; the processing information of the response overtime early warning module comprises a rule name, overtime time, early warning interval time, an effective server, early warning triggering times, a current state, accumulated overtime times, triggering overtime early warning times, early warning content and an event API; the processing information of the error code early warning module comprises an error code rule name, HTTP error codes, early warning interval time, an effective server, early warning triggering times, a current state, accumulated request times, HTTP error times for triggering early warning, early warning content and an event API; the processing information of the request rate early warning module comprises a rule name, a speed limit type, early warning interval time, an effective server, early warning triggering times, a current state, a rate dimension, total request times, accumulated overspeed times, early warning content and an event API.
3. The system for realizing API real-time warning based on the limited time sequence data queue according to claim 1 or 2, which provides a method for realizing API real-time warning based on the limited time sequence data queue, and is characterized by comprising the following steps:
s1, creating early warning rules of various APIs;
s2, adding an API URL address which needs early warning and needs early warning elimination under the created early warning rule;
s3, issuing an early warning rule to a calculation engine;
s4, constructing a limited message queue set with a time sequence, storing the request data of all APIs in real time through the message queue set, and recording the API request data in the queue in real time;
s5, carrying out matching operation on the request data corresponding to the API needing early warning in the message queue set and the early warning rule in real time;
and S6, if the operation result triggers the event defined in the early warning rule, performing corresponding early warning.
4. The method for realizing API real-time warning based on the limited time sequence data queue according to claim 3, characterized in that: the specific steps of step S1 include:
s11, creating a corresponding early warning rule;
s12, specifying a rule name and an early warning type containing response overtime, an error code and a request rate in the created early warning rule;
s13, setting the total request times of the accumulated early warning and the interval time of each early warning;
s14, respectively setting response overtime times, error code times and maximum request times per second according to the early warning rule types selected by the user;
and S15, saving the created early warning rule and setting the early warning rule to be in a release state.
5. The method for realizing API real-time warning based on the limited time sequence data queue according to claim 3, characterized in that: the specific steps of step S2 include:
s21, adding an API URL address list needing to be early-warned under the created early-warning rule, and adopting a matching mode for the APIURL address needing to be early-warned, namely considering that the rule is matched as long as the request at the beginning of the URL is met;
and S22, adding an API URL address list needing to eliminate the early warning under the created early warning rule, and not participating in the matching calculation of the early warning rule as long as the requested API URL address is in the list.
6. The method for realizing API real-time warning based on the limited time sequence data queue according to claim 3, characterized in that: the specific steps of step S3 include:
s31, selecting one or more early warning rules needing to be issued;
and S32, issuing the early warning rule or stopping issuing according to the user operation.
7. The method for realizing API real-time warning based on the limited time sequence data queue according to claim 3, characterized in that: the specific steps of step S4 include:
s41, adding the requested API data into a limited time sequence queue LinkedList;
and S42, judging whether the maximum record value of the limited time sequence queue is exceeded, and deleting the record added at the tail end if the maximum record value of the limited time sequence queue is exceeded.
8. The method for realizing API real-time warning based on the limited time sequence data queue according to claim 3, characterized in that: the specific steps of step S5 include:
s51, acquiring all early warning rule lists;
s52, reading the API URL address contained in each early warning rule to perform character string matching operation;
s53, the early warning rules which are successfully matched are put into the limited time sequence queue LinkedList, and the latest data in the limited time sequence queue LinkedList is taken out according to the early warning rules to be compared with the preset numerical values in the rules, so that the comparison result is obtained.
9. The method for implementing API real-time pre-warning based on limited time sequence data queue as claimed in claim 8, wherein: the specific steps of step S6 include: in step S53, after the comparison result is obtained, if the pre-warning condition is satisfied, the event API in the pre-warning rule is read and the pre-warning message is sent, and if the pre-warning condition is not satisfied, the matching is unsuccessful, and the triggering of the event is cancelled.
CN201911418320.8A 2019-12-31 2019-12-31 System and method for realizing API real-time early warning based on limited time sequence data queue Pending CN111092778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911418320.8A CN111092778A (en) 2019-12-31 2019-12-31 System and method for realizing API real-time early warning based on limited time sequence data queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911418320.8A CN111092778A (en) 2019-12-31 2019-12-31 System and method for realizing API real-time early warning based on limited time sequence data queue

Publications (1)

Publication Number Publication Date
CN111092778A true CN111092778A (en) 2020-05-01

Family

ID=70398039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911418320.8A Pending CN111092778A (en) 2019-12-31 2019-12-31 System and method for realizing API real-time early warning based on limited time sequence data queue

Country Status (1)

Country Link
CN (1) CN111092778A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901416A (en) * 2020-07-28 2020-11-06 中冶南方工程技术有限公司 System and method for solving data impact of big data platform
CN112148508A (en) * 2020-09-30 2020-12-29 深圳市晨北科技有限公司 Information processing method and related device
CN112270572A (en) * 2020-11-03 2021-01-26 恩亿科(北京)数据科技有限公司 Automated marketing method, system, electronic device and computer readable storage medium
CN112822095A (en) * 2021-01-26 2021-05-18 广州欢网科技有限责任公司 Alarm device based on API gateway and API gateway
CN115776435A (en) * 2022-10-24 2023-03-10 华能信息技术有限公司 Early warning method based on API gateway

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306300A (en) * 2015-11-03 2016-02-03 北京京东尚科信息技术有限公司 Real-time network cluster monitoring method and system
CN108845910A (en) * 2018-05-31 2018-11-20 康键信息技术(深圳)有限公司 Monitoring method, device and the storage medium of extensive micro services system
US20180357079A1 (en) * 2017-06-13 2018-12-13 Western Digital Technologies, Inc. Rule-Based Monitoring Engine With Tracing Capabilities for Multi-Threaded Logging
CN109104302A (en) * 2018-07-18 2018-12-28 杭州鑫合汇互联网金融服务有限公司 A kind of full link tracing monitoring method
CN109672612A (en) * 2018-12-13 2019-04-23 中国电子科技集团公司电子科学研究院 API gateway system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306300A (en) * 2015-11-03 2016-02-03 北京京东尚科信息技术有限公司 Real-time network cluster monitoring method and system
US20180357079A1 (en) * 2017-06-13 2018-12-13 Western Digital Technologies, Inc. Rule-Based Monitoring Engine With Tracing Capabilities for Multi-Threaded Logging
CN108845910A (en) * 2018-05-31 2018-11-20 康键信息技术(深圳)有限公司 Monitoring method, device and the storage medium of extensive micro services system
CN109104302A (en) * 2018-07-18 2018-12-28 杭州鑫合汇互联网金融服务有限公司 A kind of full link tracing monitoring method
CN109672612A (en) * 2018-12-13 2019-04-23 中国电子科技集团公司电子科学研究院 API gateway system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901416A (en) * 2020-07-28 2020-11-06 中冶南方工程技术有限公司 System and method for solving data impact of big data platform
CN111901416B (en) * 2020-07-28 2023-06-27 中冶南方工程技术有限公司 System and method for solving data impact of big data platform
CN112148508A (en) * 2020-09-30 2020-12-29 深圳市晨北科技有限公司 Information processing method and related device
CN112270572A (en) * 2020-11-03 2021-01-26 恩亿科(北京)数据科技有限公司 Automated marketing method, system, electronic device and computer readable storage medium
CN112822095A (en) * 2021-01-26 2021-05-18 广州欢网科技有限责任公司 Alarm device based on API gateway and API gateway
CN115776435A (en) * 2022-10-24 2023-03-10 华能信息技术有限公司 Early warning method based on API gateway
CN115776435B (en) * 2022-10-24 2024-03-01 华能信息技术有限公司 Early warning method based on API gateway

Similar Documents

Publication Publication Date Title
CN111092778A (en) System and method for realizing API real-time early warning based on limited time sequence data queue
CN109739727B (en) Service monitoring method and device in micro-service architecture
US8959530B1 (en) Messaging middleware processing thread count based events
US10057285B2 (en) System and method for auditing governance, risk, and compliance using a pluggable correlation architecture
CN108572907B (en) Alarm method, alarm device, electronic equipment and computer readable storage medium
CN102369523B (en) To the monitoring of distributed application program
CN110232010A (en) A kind of alarm method, alarm server and monitoring server
US10652103B2 (en) System and method for handling events involving computing systems and networks using fabric monitoring system
US8832259B1 (en) Virtual service mode methods for network remote monitoring and managing system
US20170085512A1 (en) Generating message envelopes for heterogeneous events
KR101416280B1 (en) Event handling system and method
CN111708679A (en) Log monitoring method, system, device and storage medium
CN112463772B (en) Log processing method and device, log server and storage medium
CN111565135A (en) Method for monitoring operation of server, monitoring server and storage medium
CN113452607A (en) Distributed link acquisition method and device, computing equipment and storage medium
CN107635003A (en) The management method of system journal, apparatus and system
CN101605075B (en) IP telephone fault alarming method and apparatus based on SIP
CN111625841A (en) Virus processing method, device and equipment
CN111782431A (en) Exception processing method, exception processing device, terminal and storage medium
EP1785866A1 (en) Alarm consolidaton in IT infrastructures
CN115220995A (en) Agent probe-based micro-service full-link analysis method
JP2000250833A (en) Operation information acquiring method for operation management of plural servers, and recording medium recorded with program therefor
JP2006331026A (en) Message analysis system and message analysis program
CN114978885A (en) Log management method and device, computer equipment and system
US8468121B1 (en) Resolving resource time intervals in a distributed system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200501

RJ01 Rejection of invention patent application after publication