WO2015196821A1 - WebSocket服务器监控方法及装置 - Google Patents

WebSocket服务器监控方法及装置 Download PDF

Info

Publication number
WO2015196821A1
WO2015196821A1 PCT/CN2015/072941 CN2015072941W WO2015196821A1 WO 2015196821 A1 WO2015196821 A1 WO 2015196821A1 CN 2015072941 W CN2015072941 W CN 2015072941W WO 2015196821 A1 WO2015196821 A1 WO 2015196821A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
data
request
monitoring application
link
Prior art date
Application number
PCT/CN2015/072941
Other languages
English (en)
French (fr)
Inventor
王苑
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015196821A1 publication Critical patent/WO2015196821A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • WebSocket is a two-way communication protocol. It is built on top of TCP and transmits data through TCP like HTTP, but it has two different points from HTTP: 1.
  • WebSocket is a two-way communication protocol. After establishing a link, WebSocket server and browser/UA can actively send or receive data to each other, just like Socket. The difference is that WebSocket is built on the Web.
  • a typical processing method in the related art is to join the HTTP service monitor.
  • the HTTP service monitor works by adding a predetermined dynamic page, setting a threshold for the HTTP request service to be continually abnormal, and the HTTP service monitor cyclically requests the HTTP service of the dynamic page to compare the expected response with the actual response. HTTP Whether the request service is normal. When the number of consecutive HTTP service abnormalities exceeds the set threshold, the HTTP service container is restarted.
  • the above processing can very well monitor the HTTP protocol service.
  • the WebSocket service feature has the characteristics of actively pushing data. A simple request/response mechanism cannot accurately determine the availability and stability of the WebSocket service. The accuracy of the sex and push data features.
  • the embodiment of the present invention provides a WebSocket server monitoring method and apparatus that overcome the above problems or at least partially solve the above problems.
  • Step 1 The request monitor module requests to establish a link with the monitoring application module in the WebSocket server.
  • Step 2 After the link is established, the request monitor module receives the data pushed by the monitoring application module and returns a response message to the monitoring application module, and determines whether the WebSocket server is running normally according to the data, wherein the data includes: sequential identification data;
  • Step 3 The request monitor module repeats step 2 in the case of determining that the operation is normal, until the link is disconnected according to the request of the monitoring application module, and the current link request is set to normal; the request monitor module determines that the operation is abnormal. In case, an abnormal response is sent to the monitoring application module, the link is disconnected according to the request of the monitoring application module, and the current link request is set to be abnormal;
  • Step 4 When the number of abnormalities of the link request reaches a preset threshold, the request monitor module sends an alarm signal to the signal receiving processor module, and the alarm is received by the signal receiving processor module. The signal is processed.
  • receiving the data pushed by the monitoring application module and returning the response message to the monitoring application module includes:
  • the receiving monitor module After receiving the link, if the receiving monitor module receives the nth data pushed by the monitoring application module, the nth sequential identification data carried in the nth data and the nth returned by the request monitor module to the monitoring application module are obtained. -1 response message, and after confirming the nth sequential identification data and the n-1th response message, returning an nth response message to the monitoring application module, where 2 ⁇ n ⁇ N, N is request monitoring The number of preset data pushes during the time period during which the module is connected to the monitoring application module.
  • determining whether the WebSocket server is running normally according to the data includes:
  • the data further includes: collected system data, where the system data includes: central processor data, and memory data.
  • determining whether the WebSocket server is running normally according to the data includes:
  • the request monitor module When the request monitor module successfully establishes the link, after receiving the first data pushed by the monitoring application module, acquiring the sequence identification data in the data, determining whether the received data is ordered data according to the sequence identification data, and And determining whether the system data in the data is less than a preset threshold. If the result of the two determinations is yes, determining that the WebSocket server is operating normally, and if at least one of the results of the two determinations is not, determining that the WebSocket server is running. abnormal.
  • the method further includes: after the monitoring application module pushes the data to the request monitor module, and does not receive the response message sent by the request monitor module, the request monitor module receives the abnormal response sent by the monitoring application module, Disconnect the link according to the request of the monitoring application module and This link request is set to abnormal.
  • step 3 includes:
  • the request monitor module loops through the fixed cycle to perform step 2 until the link is broken according to the request of the monitoring application module, and sets the current link request to be normal, wherein the monitoring application module receives the request. After the monitor module sends a response message for the last data it pushes, it sends a disconnect request to the request monitor module.
  • step 4 includes:
  • the request monitor module sends a first alarm signal to the signal receiving processor module, and the alarm is sent to the alarm platform by the signal receiving processor module to invoke the corresponding command;
  • the request monitor module sends a first restart server signal to the signal receiving processor module, and the web socket server is restarted by the signal receiving processor module invoking the corresponding command, wherein
  • the first restart server threshold is greater than the first alarm threshold
  • the request monitor module sends a dual-machine switching signal to the signal receiving processor module, and the dual-machine switching of the WebSocket server is performed by the signal receiving processor module invoking the corresponding command.
  • step 4 further includes: when the central processor data, and/or the memory data reaches a preset threshold, the request monitor module sends an alarm signal to the signal receiving processor module, and receives the processor module through the signal. The alarm signal is processed.
  • the foregoing method further includes:
  • the request monitor module sends the first heartbeat information to the signal receiving processor module, and the receiving signal receives the first heartbeat response message returned by the processor module.
  • the received first heartbeat response message has a cumulative number of abnormal times greater than the restart threshold, the signal is received.
  • the processor module sends a restart command to restart the signal receiving processor module;
  • the request monitor module receives the second heartbeat information sent by the signal receiving processor module, and returns a second heartbeat response message to the signal receiving processor module, where the signal receiving processor module determines that the received second heartbeat response message has a cumulative number of abnormal times greater than the restart.
  • Receive signal receiving processor mode The restart command sent by the block is restarted according to the restart command.
  • the embodiment of the invention further provides a WebSocket server monitoring device, comprising:
  • the request module is configured to request to establish a link with the monitoring application module in the WebSocket server;
  • the determining module is configured to: after the link is established, receive the data pushed by the monitoring application module, and return a response message to the monitoring application module, and determine, according to the data, whether the WebSocket server is running normally, wherein the data includes: sequential identification data;
  • the setting module is set to repeatedly call the judging module when the judging module judges that the operation is normal, until the link is disconnected according to the request of the monitoring application module, and the current link request is set to be normal; in the case that the judging module judges that the operation is abnormal Sending an exception response to the monitoring application module, disconnecting the link according to the request of the monitoring application module, and setting the current link request to be abnormal;
  • the sending module is configured to: when the number of abnormalities of the link request reaches a preset threshold, the request monitor module sends an alarm signal to the signal receiving processor module, and processes the alarm signal through the signal receiving processor module.
  • the judging module is set to:
  • the link After the link is established, if the nth data pushed by the monitoring application module is received, the nth sequential identification data carried in the nth data and the n-1th response message returned by the determining module to the monitoring application module are obtained. And after confirming the nth sequential identification data and the n-1th response message, returning an nth response message to the monitoring application module, where 2 ⁇ n ⁇ N, N is a WebSocket server monitoring device and a monitoring application module. The number of preset data pushes during the time period in which the link is established.
  • the judging module is set to:
  • the sequence identification data in the data is acquired, and according to the sequence identification data, it is determined whether the received data is the correct order data, and if it is determined to be , to determine that the WebSocket server is running normally, if it is not, then determine that the WebSocket server is running abnormally.
  • the data further includes: collected system data, and the system data includes: a number of central processors According to, as well as memory data.
  • the judging module is set to:
  • setup module is set to:
  • the monitoring application module pushes the data to the WebSocket server monitoring device, if the response message sent by the WebSocket server monitoring device is not received, the abnormal response sent by the monitoring application module is received, and the link is disconnected according to the request of the monitoring application module, and the The secondary link request is set to an exception.
  • setup module is set to:
  • the determination module is cyclically called until the link is disconnected according to the request of the monitoring application module, and the current link request is set to normal, wherein the monitoring application module receives the WebSocket server monitoring device to send After returning the response message for the last data it pushes, it sends a disconnect request to the setup module.
  • the sending module is set to:
  • the first alarm signal is sent to the signal receiving processor module, and the alarm is triggered by the signal receiving processor module invoking the corresponding command;
  • the first restart server signal is sent to the signal receiving processor module, and the WebSocket server is restarted by the signal receiving processor module invoking the corresponding command, wherein the first restart The server threshold is greater than the first alarm threshold;
  • the dual-machine switching signal is sent to the signal receiving processor module, and the dual-machine switching of the WebSocket server is performed by the signal receiving processor module invoking the corresponding command.
  • the sending module is further configured to: when the central processor data and/or the memory data reach a preset threshold, send an alarm signal to the signal receiving processor module, and process the alarm signal by the signal receiving processor module. .
  • the foregoing apparatus may further include:
  • the signal receiving processor monitoring module is configured to send the first heartbeat information to the signal receiving processor module, and the receiving signal receives the first heartbeat response message returned by the processor module, when the received first heartbeat response message has a cumulative number of abnormal times greater than a restart threshold Sending a restart command to the signal receiving processor module to restart the signal receiving processor module;
  • the receiving module is configured to receive the second heartbeat information sent by the signal receiving processor module, and return a second heartbeat response message to the signal receiving processor module, where the signal receiving processor module determines that the received second heartbeat response message has a cumulative number of abnormalities greater than
  • the receiving signal receives a restart command sent by the processor module and restarts according to the restart command.
  • the embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
  • the method and device for monitoring the WebSocket server solve the problem that the automatic monitoring mode for the HTTP service in the related art cannot be applied to the WebSocket service, can intelligently maintain the stable operation of the commercial environment, and can reduce the operation and maintenance personnel. The manual intervention of the workload, as well as reducing the cost of operation and maintenance.
  • FIG. 1 is a flowchart of a method for monitoring a WebSocket server according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a system architecture of a WebSocket server monitoring method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of establishing a WebSocket and performing three data pushes according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of the activity of a WebSocket request monitor module according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of activities of a signal receiving processor module according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a WebSocket server monitoring apparatus according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method and a device for monitoring a WebSocket server.
  • a reliable method is provided to automatically monitor the running status of the WebSocket server, and the monitoring data may be performed according to the monitoring data.
  • Smart restart or other WebSocket server that handles exceptions.
  • the WebSocket server can be automatically monitored and restored through a secondary monitoring mechanism, which mainly includes three aspects: one is the monitoring problem of the WebSocket server; the other is the abnormal WebSocket server recovery problem; the last one is to monitor the long-term stable operation of the machine.
  • FIG. 1 is a flowchart of a WebSocket server monitoring method according to an embodiment of the present invention.
  • a WebSocket server monitoring method according to an embodiment of the present invention includes the following steps. deal with:
  • Step 101 The request monitor module requests to establish a link with the monitoring application module in the WebSocket server.
  • Step 102 After the link is established, the request monitor module receives the data pushed by the monitoring application module and returns a response message to the monitoring application module, and determines that the WebSocket server is based on the data. No operation is normal, wherein the data includes: sequential identification data;
  • step 102 after the requesting monitor module establishes the link, receiving the data pushed by the monitoring application module and returning the response message to the monitoring application module specifically includes:
  • Step 1 After the first module obtains the first data pushed by the monitoring application module, the request monitor module acquires the first sequence identification data carried in the first data, and confirms the first sequence identification data. Afterwards, returning a first response message to the monitoring application module;
  • Step 2 After receiving the link, if the monitoring module receives the nth data pushed by the monitoring application module, the nth sequential identification data carried in the nth data and the request monitor module are returned to the monitoring application module.
  • the n-1th response message and after confirming the nth sequential identification data and the n-1th response message, returning an nth response message to the monitoring application module, where 2 ⁇ n ⁇ N,N The number of data pushes preset for the time period during which the request monitor module and the monitoring application module are linked.
  • step 102 determining whether the WebSocket server is running normally according to the data specifically includes:
  • the request identifier module acquires the sequence identification data in the data, and determines whether the received data is the correct order data according to the sequence identification data. If the determination is yes, it is determined that the WebSocket server is running normally. If the determination is not, it determines that the WebSocket server is running abnormally.
  • the data also includes the collected system data, wherein the system data includes: central processor data, and memory data, determining whether the WebSocket server is operating normally according to the data specifically includes:
  • the request monitor module When the request monitor module successfully establishes the link, after receiving the first data pushed by the monitoring application module, acquiring the sequence identification data in the data, determining whether the received data is ordered data according to the sequence identification data, and And determining whether the system data in the data is less than a preset threshold. If the result of the two determinations is yes, determining that the WebSocket server is operating normally, and if at least the result of the two determinations is not, determining that the WebSocket server is abnormally running .
  • Step 103 The request monitor module repeatedly performs step 102 in the case that the operation is normal, until the link is disconnected according to the request of the monitoring application module, and the current link request is set to be normal; the request monitor module determines that the operation is abnormal. In case, send an exception response to the monitoring application module, root Disconnect the link according to the request of the monitoring application module, and set the current link request to be abnormal;
  • the request monitor module receives the abnormal response sent by the monitoring application module.
  • the link is broken according to the request of the monitoring application module, and the current link request is set to be abnormal.
  • step 103 the request monitor module loops through the fixed cycle to perform step 2 in the case of determining that the operation is normal, until the link is disconnected according to the request of the monitoring application module, and the current link request is set to normal, wherein, in the monitoring After receiving the last data sent by the request monitor module and returning the response message, the application module sends a disconnect request to the request monitor module.
  • Step 104 When the number of abnormalities of the link request reaches a preset threshold, the request monitor module sends an alarm signal to the signal receiving processor module, and processes the alarm signal through the signal receiving processor module.
  • Step 104 specifically includes the following processing:
  • the request monitor module sends a first alarm signal to the signal receiving processor module, and the alarm is sent to the alarm platform by the signal receiving processor module to invoke the corresponding command;
  • the request monitor module sends a first restart server signal to the signal receiving processor module, and the web socket server is restarted by the signal receiving processor module invoking the corresponding command.
  • the first restart server threshold is greater than the first alarm threshold;
  • the request monitor module sends a dual-machine switching signal to the signal receiving processor module, and the dual-machine switching of the WebSocket server is performed by the signal receiving processor module invoking the corresponding command.
  • the request monitor module may also send an alarm signal to the signal receiving processor module and receive the processor module through the signal. The alarm signal is processed.
  • a secondary level is also provided.
  • the monitoring mode that is, the request monitor module sends the first heartbeat information to the signal receiving processor module, and the receiving signal receives the first heartbeat response message returned by the processor module, when the received first heartbeat response message has a cumulative number of abnormal times greater than the restart threshold. And sending a restart command to the signal receiving processor module to restart the signal receiving processor module; the requesting monitor module receives the second heartbeat information sent by the signal receiving processor module, and returns a second heartbeat response message to the signal receiving processor module.
  • the signal receiving processor module determines that the received second heartbeat response message has a cumulative number of abnormal times greater than the restart threshold
  • the receiving signal receives a restart command sent by the processor module, and restarts according to the restart command.
  • FIG. 2 is a schematic diagram of a system architecture of a WebSocket server monitoring method according to an embodiment of the present invention.
  • the embodiment of the present invention mainly includes three parts: processing of a WebSocket monitoring application module (ie, the above monitoring application module), and a WebSocket request.
  • the processing of the monitor module and the processing of the signal receiving processor module are specifically:
  • the WebSocket monitoring application module mainly implements the monitoring application of the WebSocket service, and adds the application to the container supporting the WebSocket protocol.
  • the interval average time is successively three times (the number corresponding to N in step 2 of step 102 above) pushes the data having the order relationship within the predetermined set link hold time threshold period. Give the request monitor and then actively release the service link.
  • the following specifically includes the following processing:
  • Step a when the WebSocket request monitor module establishes a link with the WebSocket monitoring application module (ie, the WebSocket server), the WebSocket monitoring application module pushes the first identification data to the WebSocket request monitor module, and the WebSocket request monitor module receives the pushed data. The first response is sent to the WebSocket monitoring application module.
  • the WebSocket monitoring application module ie, the WebSocket server
  • Step b After receiving the first response, the WebSocket monitoring application module pushes the second data in the following format: "Identification data + the first response received", and the WebSocket request monitor module parses the received second data.
  • the main reason is that the verification data is the second transmitted data and the first response data has been received by the WebSocket monitoring application module, and the second response data is sent to the WebSocket monitoring application module after error;
  • Step c After the WebSocket monitoring application module receives the second response, the subsequent operation is similar to step b, except that the WebSocket monitoring application module receives the third response and directly performs the service.
  • the link is actively released.
  • the WebSocket monitoring application module In order to prevent the WebSocket request monitor module from affecting the WebSocket monitoring application module to transmit data three times, the WebSocket monitoring application module must have timeout control for each data transfer. When the data is sent out, no response is received or the WebSocket request monitor module is received. Abnormal response, the WebSocket monitoring application module directly pushes the abnormal signal data to the WebSocket request monitor module, and actively disconnects the link.
  • the data pushed by the WebSocket monitoring application module may include the collected operating system or the data of the container, for example, the operating system CPU and the memory, and the full-duplex duplex of the WebSocket. Continuously push data function for monitoring.
  • the main user of the WebSocket request monitor module implements the request monitoring of the WebSocket, and the WebSocket request monitor module periodically requests the service of the WebSocket monitoring application module to periodically parse the data pushed by the WebSocket, if and only if The data received within the timeout period meets the expected settings (ie, the link is successfully established, the received data is ordered according to the receiving time, and the received data content is expected to be consistent), then the WebSocket service is judged to be operating normally, if not It is judged as abnormal, and if abnormal, an exception response is sent to the WebSocket monitoring application module. When the number of consecutive abnormal requests reaches the set service abnormal alarm threshold, an alarm signal is sent.
  • the restart WebServer signal is issued; when the cumulative cumulative restart of the WebServer reaches the set switching dual threshold. , the two-machine switching signal is issued; through the above three levels of processing, more precise intelligent control can be realized.
  • the data may be processed by using the received data, for example, when the received three CPU values exceed a certain threshold, and the consecutive times are greater than a certain set of CPU alarm or restart threshold, respectively, the CPU is issued.
  • the alarm signal or the container restart signal can be similarly processed in the same way.
  • the signal receiving processor module mainly implements signal receiving and sorting processing, and the signal receiving processor module receives the signal sent by the WebSocket request monitor module, and performs sorting processing according to the signal category, for example, when receiving When the received signal is an alarm signal, the corresponding command is invoked to alert the alarm platform. When receiving the restart of the container signal, the corresponding command is called to restart the container. When the two-machine switching signal is received, the switch is sent to the dual-machine software. Commands, etc.
  • the embodiment of the invention further provides a WebSocket request monitor module and signal receiving processing
  • Two-way monitoring of the two-way mechanism between the modules two-way heartbeat detection between the signal receiving processor module and the WebSocket request monitor module.
  • the heartbeat information is sent between the two and the two-way response is performed.
  • the other party command is restarted, so that other accidents of the long-term running process are avoided to cause the above monitor or processor. An abnormal situation has occurred.
  • Step 1 deploy the WebSocket monitoring application module on the WebSocket server, and the WebSocket monitoring application module is mainly used to accept the Socket link response/disconnection and the three data push response;
  • Step 2 starting a WebSocket request monitor module and a signal receiving processor module
  • Step 3 the WebSocket request monitor module requests the WebSocket server to establish a WebSocket link, and three times of data push is started after the link is successfully established (the three data pushes here are the default settings, and the actual application is not limited to This number), if no abnormality occurs during this process, the WebSocket request monitor module records that the monitoring is normal, and if an abnormality occurs, it is recorded as an exception.
  • the detailed process of requesting chain construction and three data pushes is shown in Figure 5.
  • Step 4 as shown in FIG. 4, the WebSocket request monitor module cyclically detects the number of consecutive monitoring abnormalities, and if the abnormal number reaches the set threshold, sends a processing signal corresponding to the threshold to the signal receiving processor module (mainly set in the embodiment of the invention)
  • the alarm threshold restart the WebSocket server threshold, and the dual-machine switching threshold, and clear the monitoring abnormal number counter.
  • Step 5 the signal receiving processor module receives the signal sent by the WebSocket request monitor module, parses the signal, and then performs corresponding processing according to the parsing category. If it is an alarm signal, it sends an alarm message to the alarm platform; if it is a restart signal, it initiates a restart of the WebSocket server command; if it is a dual-machine switching signal, it sends a switching information to the dual-machine software.
  • Step 6 as shown in FIG. 4 and FIG. 5, the WebSocket server requester module and the signal receiving processor module cyclically transmit heartbeats to each other, and detect the heartbeat timing of the received counterpart, and when the detected heartbeat of the other party is abnormal, initiate a restart of the other party. The command.
  • the WebSocket service monitoring method in the embodiment of the present invention is an important supplement to the related HTTP service monitoring method.
  • the method has the following advantages: 1. It can monitor whether the WebSocket protocol server can provide the WebSocket service normally; In the embodiment of the invention It uses three times to push the ordered data and actively disconnect the link mechanism. On the one hand, it can monitor whether the WebSocket service push data function is normal (that is, whether the pushed data is correct and the push mechanism is stable). On the other hand, the WebServer actively initiates the broken link. The WebSocket link can be actively reclaimed to avoid the loss of the link. 3.
  • the secondary monitoring heartbeat mechanism of the embodiment of the present invention enables the monitoring module to self-recover when an unavoidable abnormality occurs during long-term operation.
  • FIG. 6 is a schematic structural diagram of a WebSocket server monitoring apparatus according to an embodiment of the present invention.
  • the WebSocket server monitoring apparatus according to the embodiment of the present invention includes: The request module 60, the determination module 62, the setting module 64, and the transmission module 66 are described in detail below for each module of the embodiment of the present invention.
  • the requesting module 60 is configured to request to establish a link with the monitoring application module in the WebSocket server;
  • the determining module 62 is configured to: after establishing the link, receive the data pushed by the monitoring application module, and return a response message to the monitoring application module, and determine, according to the data, whether the WebSocket server is running normally, wherein the data includes: sequential identification data;
  • the judging module 62 is configured to: after receiving the first data pushed by the monitoring application module after establishing the link, acquire the first sequence identification data carried in the first data, and confirm the first sequence identification data And returning the first response message to the monitoring application module; after receiving the link, if receiving the nth data pushed by the monitoring application module, acquiring the nth sequential identification data carried in the nth data and determining module 62 Monitoring the n-1th response message returned by the application module, and after confirming the nth sequential identification data and the n-1th response message, returning an nth response message to the monitoring application module, where 2 ⁇ n ⁇ N, N is the number of preset data pushes during the time period when the WebSocket server monitoring device establishes a link with the monitoring application module.
  • the judging module 62 is configured to: after receiving the first data pushed by the monitoring application module, obtain the sequence identification data in the data, and determine whether the received data is in the correct order according to the sequence identification data. If the judgment is yes, it is determined that the WebSocket server is running normally. If the judgment is not, it determines that the WebSocket server is running abnormally.
  • the foregoing data may further include: collected system data, where the system data includes: central processor data, and memory data.
  • the determining module 62 is configured to: after receiving the first data pushed by the monitoring application module, successfully obtain the sequence identification data in the data, and determine the received data according to the sequence identification data. Whether the data is ordered data, and whether the system data in the data is less than a preset threshold. If the results of both determinations are yes, it is determined that the WebSocket server is operating normally, if at least one of the results of the two determinations If not, it is determined that the WebSocket server is running abnormally.
  • the setting module 64 is configured to repeatedly call the determining module 62 when the determining module 62 determines that the operation is normal, until the link is disconnected according to the request of the monitoring application module, and the current link request is set to be normal; the determining module 62 determines to operate. In case of abnormality, an abnormal response is sent to the monitoring application module, the link is disconnected according to the request of the monitoring application module, and the current link request is set to be abnormal;
  • the setting module 64 is configured to: after the monitoring application module pushes the data to the WebSocket server monitoring device, does not receive the response message sent by the WebSocket server monitoring device, and receives the abnormal response sent by the monitoring application module, according to the request of the monitoring application module. Disconnect the link and set this link request to be an exception.
  • the setting module 64 is configured to: when it is determined that the operation is normal, the interval fixed cycle is cyclically called to determine the module 62 until the link is disconnected according to the request of the monitoring application module, and the current link request is set to normal, wherein the monitoring application is After receiving the last data sent by the WebSocket server monitoring device and returning the response message, the module sends a disconnection request to the setting module 64.
  • the sending module 66 is configured to: when the number of abnormalities of the link request reaches a preset threshold, the request monitor module sends an alarm signal to the signal receiving processor module, and processes the alarm signal through the signal receiving processor module.
  • the sending module 66 is configured to: when the number of abnormalities of the link request reaches a preset first alarm threshold, send a first alarm signal to the signal receiving processor module, and call the corresponding command to send an alarm to the alarm platform; When the number of abnormalities of the link request reaches the preset first restart server threshold, the first restart server signal is sent to the signal receiving processor module, and the WebSocket server is restarted by the signal receiving processor module invoking the corresponding command, where The first restart server threshold is greater than the first alarm threshold; when the cumulative restart of the WebSocket server reaches the switching dual-machine threshold, the dual-machine switching signal is sent to the signal receiving processor module, and the corresponding command is invoked by the signal receiving processor module to perform the WebSocket server. Dual machine switching.
  • the sending module 66 is further configured to: when the central processor data, and/or the memory data reaches a corresponding threshold set in advance, send an alarm signal to the signal receiving processor module, and process the alarm signal through the signal receiving processor module.
  • the foregoing apparatus may further include:
  • the signal receiving processor monitoring module is configured to send the first heartbeat information to the signal receiving processor module, and the receiving signal receives the first heartbeat response message returned by the processor module, when the received first heartbeat response message has a cumulative number of abnormal times greater than a restart threshold Sending a restart command to the signal receiving processor module to restart the signal receiving processor module;
  • the receiving module is configured to receive the second heartbeat information sent by the signal receiving processor module, and return a second heartbeat response message to the signal receiving processor module, where the signal receiving processor module determines that the received second heartbeat response message has a cumulative number of abnormalities greater than
  • the receiving signal receives a restart command sent by the processor module and restarts according to the restart command.
  • the embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
  • all or part of the steps of the above embodiments may also be implemented using an integrated circuit.
  • the steps may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps may be fabricated into a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the method and device for monitoring the WebSocket server in the embodiment of the present invention solve the problem that the automatic monitoring mode for the HTTP service in the related art cannot be applied to the WebSocket service, can intelligently maintain the stable operation of the commercial environment, and can reduce the manual operation of the operation and maintenance personnel. The workload of the intervention and the cost of operating the operation.

Landscapes

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

Abstract

一种WebSocket服务器监控方法及装置。该方法包括:步骤1,请求与监控应用模块建立链接;步骤2,接收监控应用模块推送的数据并向其返回响应消息,根据数据判断WebSocket服务器是否运行正常,其中,数据包括:顺序标识数据;步骤3,在判断运行正常的情况下,重复执行步骤2,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常;在判断运行异常的情况下,向监控应用模块发送异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常;步骤4,当链接请求的异常次数达到预先设置的阔值时,向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警信号进行处理。

Description

WebSocket服务器监控方法及装置 技术领域
本发明涉及互联网技术领域,特别是涉及一种WebSocket服务器监控方法及装置。
背景技术
WebSocket是第五版超文本标记语言(Hyper Text Mart-up Language 5,简称为HTML5)新增加的一种通信协议,目前流行的浏览器(例如,chrome浏览器/ie浏览器/firefox浏览器)都支持这个协议。随着支持浏览器的增多,越来越多的jsp/servelet容器也开始支持该协议,例如,tomcat容器和jetty容器。相比传统的超文本传输协议(Hypertext transfer protocol,简称为HTTP)协议,它们的共同点都是基于传输控制协议(Transmission Control Protocol,简称为TCP)的,所以他们都是可靠的协议,而且他们都是应用层的协议。它们的区别在于HTTP协议是一种单向的网络协议,在建立链接后,它只允许浏览器/用户代理(User Agent,简称为UA)向WebServer发出请求资源后,WebServer才能返回相应的数据。而WebServer不能主动的推送数据给浏览器/UA;而WebSocket协议是一种双向通信协议,它建立在TCP之上,同HTTP一样通过TCP来传输数据,但是它和HTTP最大的不同有两点:1、WebSocket是一种双向通信协议,在建立链接后,WebSocket服务器和浏览器/UA都能主动的向对方发送或接收数据,就像Socket一样,不同的是WebSocket是一种建立在Web基础上的一种简单模拟Socket的协议;2、WebSocket需要通过握手链接,类似于TCP,WebSocket也需要客户端和服务器端进行握手链接,链接成功后才能相互通信。
在商用的环境下,为能自动监控HTTP服务的运行情况,为能在无人值守时刻自动恢复发生异常的HTTP服务容器,相关技术中典型处理方式是加入HTTP服务监控器。这种HTTP服务监控器的工作原理是:加入预定的动态页面,设置HTTP请求服务连续异常的阈值,HTTP服务监控器循环请求该动态页面的HTTP服务,通过对比预期响应和实际响应的一致性判断HTTP 请求服务是否正常,当HTTP服务连续异常次数超过设置的阈值,则重启HTTP服务容器。上述处理能够非常好的监控HTTP协议服务。但是对于新兴的WebSocket协议服务,上述监控方式的不适用性是很明显的,主要表现在WebSocket服务特性具有主动推送数据的特性,一次简单的请求/响应机制并不能准确判断WebSocket服务提供可用性、稳定性和推送数据功能的准确性。
在长期无间隙运行的WebServer商用环境下,确保WebServer的运行正常是个极其重要和繁琐的工作,这是因为一旦WebServer发生异常,那么部署在该容器上的所有业务会全部不可用。环境若没有实现自动监控和恢复WebServer功能,那么必须要求运维人员实现24小时的值守,这样的人工处理对运维成本的要求比较高。另外由于异常发生的监控和恢复都是由人工来处理,则会产生方法笨搓、效率比较低下和恢复延迟的问题。
发明内容
鉴于相关技术中针对HTTP服务的自动监控方式不能够适用于WebSocket服务的问题,本发明实施例提供一种克服上述问题或者至少部分地解决上述问题的WebSocket服务器监控方法及装置。
本发明实施例提供一种WebSocket服务器监控方法,包括:
步骤1,请求监控器模块请求与WebSocket服务器中的监控应用模块建立链接;
步骤2,请求监控器模块在建立链接后,接收监控应用模块推送的数据并向所述监控应用模块返回响应消息,根据数据判断WebSocket服务器是否运行正常,其中,数据包括:顺序标识数据;
步骤3,请求监控器模块在判断运行正常的情况下,重复执行步骤2,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常;请求监控器模块在判断运行异常的情况下,向监控应用模块发送异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常;
步骤4,当链接请求的异常次数达到预先设置的阈值时,请求监控器模块向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警 信号进行处理。
可选地,请求监控器模块在建立链接后,接收监控应用模块推送的数据并向所述监控应用模块返回响应消息包括:
请求监控器模块在建立链接后,如果接收到监控应用模块推送的第一个数据,则获取第一个数据中携带的第一顺序标识数据,并在对第一顺序标识数据进行确认后,向监控应用模块返回第一响应消息;
请求监控器模块在建立链接后,如果接收到监控应用模块推送的第n个数据,则获取第n个数据中携带的第n个顺序标识数据和请求监控器模块向监控应用模块返回的第n-1个响应消息,并在对第n个顺序标识数据和第n-1个响应消息进行确认后,向监控应用模块返回第n个响应消息,其中,2≤n≤N,N为请求监控器模块与监控应用模块建立链接的时间段内预设的数据推送个数。
可选地,根据数据判断WebSocket服务器是否运行正常包括:
请求监控器模块在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为顺序正确的数据,如果判断为是,则确定WebSocket服务器运行正常,如果判断为不是,确定WebSocket服务器运行异常。
可选地,数据还包括:采集的系统数据,系统数据包括:中央处理器数据、以及内存数据。
可选地,根据数据判断WebSocket服务器是否运行正常包括:
请求监控器模块在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为有序数据,并且,判断数据中的系统数据是否小于预设阈值,如果这个两个判断的结果均为是,则确定WebSocket服务器运行正常,如果这两个判断的结果中的至少一个为不是,则确定WebSocket服务器运行异常。
可选地,上述方法还包括:在监控应用模块向请求监控器模块推送数据后,未接收到请求监控器模块发送的响应消息的情况下,请求监控器模块接收监控应用模块发送的异常响应,根据监控应用模块的请求断开链接,并将 本次链接请求设置为异常。
可选地,步骤3包括:
请求监控器模块在判断运行正常的情况下,间隔固定周期循环执行步骤2,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常,其中,在监控应用模块接收到请求监控器模块发送的针对其推送的最后一个数据而返回响应消息后,向请求监控器模块发送断开链接请求。
可选地,步骤4包括:
当链接请求的异常次数达到预先设置的第一告警阈值时,请求监控器模块向信号接收处理器模块发送第一告警信号,通过信号接收处理器模块调用相应命令向告警平台进行告警;
当链接请求的异常次数达到预先设置的第一重启服务器阈值时,请求监控器模块向信号接收处理器模块发送第一重启服务器信号,通过信号接收处理器模块调用相应命令对WebSocket服务器进行重启,其中,第一重启服务器阈值大于第一告警阈值;
当累积重启WebSocket服务器的次数达到切换双机阈值时,请求监控器模块向信号接收处理器模块发送双机倒换信号,通过信号接收处理器模块调用相应命令对进行WebSocket服务器的双机倒换。
可选地,步骤4还包括:当中央处理器数据、和/或内存数据达到预先设置的相应阈值时,请求监控器模块向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警信号进行处理。
可选地,上述方法还包括:
请求监控器模块向信号接收处理器模块发送第一心跳信息,接收信号接收处理器模块返回的第一心跳响应消息,当接收到的第一心跳响应消息异常次数累计大于重启阈值时,向信号接收处理器模块发送重启命令,对信号接收处理器模块进行重启;
请求监控器模块接收信号接收处理器模块发送的第二心跳信息,向信号接收处理器模块返回第二心跳响应消息,在信号接收处理器模块确定接收到的第二心跳响应消息异常次数累计大于重启阈值时,接收信号接收处理器模 块发送的重启命令,并根据重启命令进行重启。
本发明实施例还提供了一种WebSocket服务器监控装置,包括:
请求模块,设置为请求与WebSocket服务器中的监控应用模块建立链接;
判断模块,设置为在建立链接后,接收监控应用模块推送的数据并向所述监控应用模块返回响应消息,根据数据判断WebSocket服务器是否运行正常,其中,数据包括:顺序标识数据;
设置模块,设置为在判断模块判断运行正常的情况下,重复调用判断模块,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常;在判断模块判断运行异常的情况下,向监控应用模块发送异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常;以及
发送模块,设置为当链接请求的异常次数达到预先设置的阈值时,请求监控器模块向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警信号进行处理。
可选地,判断模块是设置为:
在建立链接后,如果接收到监控应用模块推送的第一个数据,则获取第一个数据中携带的第一顺序标识数据,并在对第一顺序标识数据进行确认后,向监控应用模块返回第一响应消息;
在建立链接后,如果接收到监控应用模块推送的第n个数据,则获取第n个数据中携带的第n个顺序标识数据和判断模块向监控应用模块返回的第n-1个响应消息,并在对第n个顺序标识数据和第n-1个响应消息进行确认后,向监控应用模块返回第n个响应消息,其中,2≤n≤N,N为WebSocket服务器监控装置与监控应用模块建立链接的时间段内预设的数据推送个数。
可选地,判断模块是设置为:
在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为顺序正确的数据,如果判断为是,则确定WebSocket服务器运行正常,如果判断为不是,则确定WebSocket服务器运行异常。
可选地,数据还包括:采集的系统数据,系统数据包括:中央处理器数 据、以及内存数据。
可选地,判断模块是设置为:
在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为有序数据,并且,判断数据中的系统数据是否小于预设阈值,如果这两个判断的结果均为是,则确定WebSocket服务器运行正常,如果这两个判断的结果中的至少一个为不是,则确定WebSocket服务器运行异常。
可选地,设置模块设置为:
在监控应用模块向WebSocket服务器监控装置推送数据后,未接收到WebSocket服务器监控装置发送的响应消息的情况下,接收监控应用模块发送的异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常。
可选地,设置模块是设置为:
在判断运行正常的情况下,间隔固定周期循环调用判断模块,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常,其中,在监控应用模块接收到WebSocket服务器监控装置发送的针对其推送的最后一个数据而返回响应消息后,向设置模块发送断开链接请求。
可选地,发送模块是设置为:
当链接请求的异常次数达到预先设置的第一告警阈值时,向信号接收处理器模块发送第一告警信号,通过信号接收处理器模块调用相应命令向告警平台进行告警;
当链接请求的异常次数达到预先设置的第一重启服务器阈值时,向信号接收处理器模块发送第一重启服务器信号,通过信号接收处理器模块调用相应命令对WebSocket服务器进行重启,其中,第一重启服务器阈值大于第一告警阈值;
当累积重启WebSocket服务器的次数达到切换双机阈值时,向信号接收处理器模块发送双机倒换信号,通过信号接收处理器模块调用相应命令对进行WebSocket服务器的双机倒换。
可选地,发送模块还设置为:当中央处理器数据、和/或内存数据达到预先设置的相应阈值时,向信号接收处理器模块发送报警信号,通过信号接收处理器模块对报警信号进行处理。
可选地,上述装置还可包括:
信号接收处理器监控模块,设置为向信号接收处理器模块发送第一心跳信息,接收信号接收处理器模块返回的第一心跳响应消息,当接收到的第一心跳响应消息异常次数累计大于重启阈值时,向信号接收处理器模块发送重启命令,对信号接收处理器模块进行重启;
接收模块,设置为接收信号接收处理器模块发送的第二心跳信息,向信号接收处理器模块返回第二心跳响应消息,在信号接收处理器模块确定接收到的第二心跳响应消息异常次数累计大于重启阈值时,接收信号接收处理器模块发送的重启命令,并根据重启命令进行重启。
本发明实施例还提供一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现上面的方法。
本发明实施例的有益效果如下:
借助于本发明实施例的WebSocket服务器监控方法及装置,解决了相关技术中针对HTTP服务的自动监控方式不能够适用于WebSocket服务的问题,能够智能维护商用环境的稳定运行,并能减少运维人员的手工干预的工作量、以及减少运维的成本。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图概述
通过阅读下文实施方式的详细描述,各种优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1是本发明实施例的WebSocket服务器监控方法的流程图;
图2是本发明实施例的WebSocket服务器监控方法的系统架构示意图;
图3是本发明实施例的建立WebSocket和执行三次数据推送的示意图;
图4是本发明实施例的WebSocket请求监控器模块活动的示意图;
图5是本发明实施例的信号接收处理器模块的活动示意图;
图6是本发明实施例的WebSocket服务器监控装置的结构示意图。
本发明的较佳实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
为了解决相关技术中的上述问题,本发明实施例提供了一种WebSocket服务器监控方法及装置,在本发明实施例中,提供一个可靠的方法自动监控WebSocket服务器的运行状况,并可根据监控数据进行智能重启或者其他处理异常的WebSocket服务器。通过一种二级监控机制能自动监控和恢复WebSocket服务器,主要包含三个方面:一个是WebSocket服务器的监控问题;另外一个是异常WebSocket服务器恢复问题;最后一个是监控机器的长期稳定运行问题。以下结合附图以及实施例,对本发明的方案进行详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。
方法实施例
根据本发明的实施例,提供了一种WebSocket服务器监控方法,图1是本发明实施例的WebSocket服务器监控方法的流程图,如图1所示,根据本发明实施例的WebSocket服务器监控方法包括如下处理:
步骤101,请求监控器模块请求与WebSocket服务器中的监控应用模块建立链接;
步骤102,请求监控器模块在建立链接后,接收监控应用模块推送的数据并向所述监控应用模块返回响应消息,根据数据判断WebSocket服务器是 否运行正常,其中,数据包括:顺序标识数据;
在步骤102中,请求监控器模块在建立链接后,接收监控应用模块推送的数据并向所述监控应用模块返回响应消息具体包括:
步骤1,请求监控器模块在建立链接后,如果接收到监控应用模块推送的第一个数据,则获取第一个数据中携带的第一顺序标识数据,并在对第一顺序标识数据进行确认后,向监控应用模块返回第一响应消息;
步骤2,请求监控器模块在建立链接后,如果接收到监控应用模块推送的第n个数据,则获取第n个数据中携带的第n个顺序标识数据和请求监控器模块向监控应用模块返回的第n-1个响应消息,并在对第n个顺序标识数据和第n-1个响应消息进行确认后,向监控应用模块返回第n个响应消息,其中,2≤n≤N,N为请求监控器模块与监控应用模块建立链接的时间段内预设的数据推送个数。
在步骤102中,根据数据判断WebSocket服务器是否运行正常具体包括:
请求监控器模块在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为顺序正确的数据,如果判断为是,则确定WebSocket服务器运行正常,如果判断为不是,则确定WebSocket服务器运行异常。
如果数据中还包括采集的系统数据,其中,系统数据包括:中央处理器数据、以及内存数据,则根据数据判断WebSocket服务器是否运行正常具体包括:
请求监控器模块在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为有序数据,并且,判断数据中的系统数据是否小于预设阈值,如果这两个判断的结果均为是,则确定WebSocket服务器运行正常,如果这两个判断的结果中的至少为不是,则确定WebSocket服务器运行异常。
步骤103,请求监控器模块在判断运行正常的情况下,重复执行步骤102,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常;请求监控器模块在判断运行异常的情况下,向监控应用模块发送异常响应,根 据监控应用模块的请求断开链接,并将本次链接请求设置为异常;
在本发明实施例中,如果在监控应用模块向请求监控器模块推送数据后,未接收到请求监控器模块发送的响应消息的情况下,则请求监控器模块接收监控应用模块发送的异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常。
在步骤103中,请求监控器模块在判断运行正常的情况下,间隔固定周期循环执行步骤2,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常,其中,在监控应用模块接收到请求监控器模块发送的针对其推送的最后一个数据而返回响应消息后,向请求监控器模块发送断开链接请求。
步骤104,当链接请求的异常次数达到预先设置的阈值时,请求监控器模块向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警信号进行处理。
步骤104具体包括如下处理:
1、当链接请求的异常次数达到预先设置的第一告警阈值时,请求监控器模块向信号接收处理器模块发送第一告警信号,通过信号接收处理器模块调用相应命令向告警平台进行告警;
2、当链接请求的异常次数达到预先设置的第一重启服务器阈值时,请求监控器模块向信号接收处理器模块发送第一重启服务器信号,通过信号接收处理器模块调用相应命令对WebSocket服务器进行重启,其中,第一重启服务器阈值大于第一告警阈值;
3、当累积重启WebSocket服务器的次数达到切换双机阈值时,请求监控器模块向信号接收处理器模块发送双机倒换信号,通过信号接收处理器模块调用相应命令对进行WebSocket服务器的双机倒换。
此外,在步骤104中,当中央处理器数据、和/或内存数据达到预先设置的相应阈值时,请求监控器模块也可以向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警信号进行处理。
在本发明实施例中,为了对监控器自身的运行进行监控,还提供了二级 监控模式,即,请求监控器模块向信号接收处理器模块发送第一心跳信息,接收信号接收处理器模块返回的第一心跳响应消息,当接收到的第一心跳响应消息异常次数累计大于重启阈值时,向信号接收处理器模块发送重启命令,对信号接收处理器模块进行重启;请求监控器模块接收信号接收处理器模块发送的第二心跳信息,向信号接收处理器模块返回第二心跳响应消息,在信号接收处理器模块确定接收到的第二心跳响应消息异常次数累计大于重启阈值时,接收信号接收处理器模块发送的重启命令,并根据重启命令进行重启。
以下结合实例以及附图,对本发明实施例的上述技术方案进行详细说明。
图2是本发明实施例的WebSocket服务器监控方法的系统架构示意图,如图2所示,本发明实施例主要包括三部分内容:WebSocket监控应用模块(即,上述监控应用模块)的处理、WebSocket请求监控器模块的处理、以及信号接收处理器模块的处理。具体地:
WebSocket监控应用模块主要实现WebSocket服务的监控应用,并把该应用加入到支持WebSocket协议的容器中。WebSocket请求监控器模块与该应用实现建立链接后,在预定设置的链接保持时间阈值周期内,间隔平均时间连续三次(该次数对应于上述步骤102的步骤2中的N)推送有顺序关系的数据给请求监控器,然后进行服务链接主动释放。如图3所示,具体包括如下处理:
步骤a,当WebSocket请求监控器模块与WebSocket监控应用模块(即WebSocket服务器)建立链接后,WebSocket监控应用模块推送第一个标识数据给WebSocket请求监控器模块,WebSocket请求监控器模块接收到推送的数据时,会向WebSocket监控应用模块发送第一个响应;
步骤b:WebSocket监控应用模块接收到第一个响应后,推送第二个如下格式的数据:“标识数据+接收到的第一个响应”,WebSocket请求监控器模块解析收到的第二个数据,主要是核对数据是第二个传送过来的数据和第一个响应数据已经被WebSocket监控应用模块接收到,无误后发送第二个响应数据给WebSocket监控应用模块;
步骤c:WebSocket监控应用模块收到第二个响应后,后续操作类似步骤b,不同在于,WebSocket监控应用模块在接收到第三个响应,直接进行服务 链接主动释放。为避免WebSocket请求监控器模块异常影响到WebSocket监控应用模块三次传送数据,WebSocket监控应用模块对每次数据传递都要有超时控制,当发送数据超时没有收到响应或者收到WebSocket请求监控器模块的异常响应,WebSocket监控应用模块直接推送异常信号数据给WebSocket请求监控器模块,并主动断开链接。可选地,WebSocket监控应用模块推送的数据除了能标识顺序关系外,还可包括采集到的操作系统或者容器的数据,例如,操作系统的CPU和内存等,通过该机制可对WebSocket全双工持续主动推送数据功能进行监控。
如图4所示,WebSocket请求监控器模块主要用户实现WebSocket的请求监控,该WebSocket请求监控器模块间隔固定周期循环请求WebSocket监控应用模块的服务,对其推送过来的数据进行解析,当且仅当在超时时间内收到的数据满足预期设置(即链接成功建立,收到数据根据接收时间排序是有序的,接收的数据内容和预期是一致的),则判断WebSocket服务运行正常,如果不是则判断为异常,如果异常则发送异常响应给WebSocket监控应用模块。当连续请求异常次数达到设置的服务异常告警阈值时,发出告警信号,当连续异常次数达到设置的重启容器阈值时,发出重启WebServer信号;当连续累积重启WebServer的次数达到设置的切换双机阈值时,发出双机倒换信号;通过上述三个分级别的处理方式,能实现更精确的智能控制。可选地,还可选择对接收的数据进行数据处理,例如,当收到的三次CPU值均超过某个设置阈值,且连续次数大于某个设定的CPU告警或者重启阈值,则分别发出CPU告警信号或者容器重启信号,类似的可选择同样的方式对内存进行类似处理。
如图5所示,信号接收处理器模块主要实现信号接收和分门别类处理,该信号接收处理器模块对WebSocket请求监控器模块发出的信号进行接收,并根据信号类别进行分门别类的处理,例如,当接收到的信号为告警信号时,则调用相应命令向告警平台进行告警,当接收到是重启容器信号时,则调用相应命令重启容器,当接收的是双机切换信号,则向双机软件发出切换命令等。
本发明实施例还提供了一种WebSocket请求监控器模块和信号接收处理 器模块的之间的二级监控双向机制:实现信号接收处理器模块与WebSocket请求监控器模块之间双向心跳检测。两者之间互发心跳信息并进行双向响应,当任一方,接收到心跳响应累计异常次数达到设置阈值时,发起重启另一方命令,这样避免长期运行过程的其它意外导致上述监控器或者处理器发生异常的情况。
以下结合附图对本发明实施例的技术方案进行举例说明。
步骤1,在WebSocket服务器部署WebSocket监控应用模块,WebSocket监控应用模块主要用于接受Socket建链响应/断开和三次数据推送响应;
步骤2,启动WebSocket请求监控器模块和信号接收处理器模块;
步骤3,如图4所示,WebSocket请求监控器模块向WebSocket服务器请求建立WebSocket链接,成功建链后即开始执行三次数据推送(这里的三次数据推送是默认设置的情况,实际应用并不局限于这个数字),在这过程中若无异常发生,则WebSocket请求监控器模块记这次监控为正常,若有异常发生,则记为异常。请求建链和三次数据推送的详细过程见图5。
步骤4,如图4所示,WebSocket请求监控器模块循环检测连续监控异常的次数,若异常次数达到设置的阈值,则向信号接收处理器模块发出相应阈值的处理信号(发明实施例中主要设置了告警阈值、重启WebSocket服务器阈值和双机切换阈值),并清零监控异常次数计数器。
步骤5,如图5,信号接收处理器模块接收到WebSocket请求监控器模块发过来的信号,对信号进行解析,然后按照解析类别进行相应的处理。如果是告警信号,则向告警平台发送告警信息;如果是重启信号,则发起重启WebSocket服务器命令;如果是双机切换信号,则向双机软件发送切换信息。
步骤6,如图4和5所示,WebSocket服务器请求器模块和信号接收处理器模块循环互相发送心跳,并且对接受到的对方的心跳定时进行检测,当检测的对方心跳有异常时,发起重启对方的命令。
综上所述,本发明实施例的WebSocket服务监控方法是对相关的HTTP服务监控方法的重要补充,该方法具有如下有点:1、能够监控到支持WebSocket协议服务器能否正常提供WebSocket服务;2、本发明实施例中使 用的三次推送有序性数据并主动断开链接机制,一方面能监控到WebSocket服务推送数据功能是否正常(即推送的数据是否正确和推送机制是否稳定),另一方面由WebServer主动发起断链,能主动回收WebSocket链接避免链接的损失;3、本发明实施例的二级监控心跳机制能使得监控模块在长期运行过程中发生难以避免的异常时能进行自我恢复。
装置实施例
根据本发明的实施例,提供了一种WebSocket服务器监控装置,图6是本发明实施例的WebSocket服务器监控装置的结构示意图,如图6所示,根据本发明实施例的WebSocket服务器监控装置包括:请求模块60、判断模块62、设置模块64、以及发送模块66,以下对本发明实施例的各个模块进行详细的说明。
请求模块60,设置为请求与WebSocket服务器中的监控应用模块建立链接;
判断模块62,设置为在建立链接后,接收监控应用模块推送的数据并向所述监控应用模块返回响应消息,根据数据判断WebSocket服务器是否运行正常,其中,数据包括:顺序标识数据;
判断模块62是设置为:在建立链接后,如果接收到监控应用模块推送的第一个数据,则获取第一个数据中携带的第一顺序标识数据,并在对第一顺序标识数据进行确认后,向监控应用模块返回第一响应消息;在建立链接后,如果接收到监控应用模块推送的第n个数据,则获取第n个数据中携带的第n个顺序标识数据和判断模块62向监控应用模块返回的第n-1个响应消息,并在对第n个顺序标识数据和第n-1个响应消息进行确认后,向监控应用模块返回第n个响应消息,其中,2≤n≤N,N为WebSocket服务器监控装置与监控应用模块建立链接的时间段内预设的数据推送个数。
判断模块62是设置为:在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为顺序正确的数据,如果判断为是,则确定WebSocket服务器运行正常,如果判断为不是,则确定WebSocket服务器运行异常。
在本发明实施例中,上述数据还可以包括:采集的系统数据,系统数据包括:中央处理器数据、以及内存数据。
在上述情况下,判断模块62是设置为:在成功建立链接的情况下,在接收到监控应用模块推送的第一个数据后,获取数据中的顺序标识数据,根据顺序标识数据判断接收到的数据是否为有序数据,并且,判断数据中的系统数据是否小于预设阈值,如果这个两个判断的结果均为是,则确定WebSocket服务器运行正常,如果这个两个判断的结果中的至少一个为不是,则确定WebSocket服务器运行异常。
设置模块64,设置为在判断模块62判断运行正常的情况下,重复调用判断模块62,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常;在判断模块62判断运行异常的情况下,向监控应用模块发送异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常;
设置模块64是设置为:在监控应用模块向WebSocket服务器监控装置推送数据后,未接收到WebSocket服务器监控装置发送的响应消息的情况下,接收监控应用模块发送的异常响应,根据监控应用模块的请求断开链接,并将本次链接请求设置为异常。
设置模块64是设置为:在判断运行正常的情况下,间隔固定周期循环调用判断模块62,直到根据监控应用模块的请求断开链接,并将本次链接请求设置为正常,其中,在监控应用模块接收到WebSocket服务器监控装置发送的针对其推送的最后一个数据而返回响应消息后,向设置模块64发送断开链接请求。
发送模块66,设置为:当链接请求的异常次数达到预先设置的阈值时,请求监控器模块向信号接收处理器模块发送报警信号,并通过信号接收处理器模块对报警信号进行处理。
发送模块66是设置为:当链接请求的异常次数达到预先设置的第一告警阈值时,向信号接收处理器模块发送第一告警信号,通过信号接收处理器模块调用相应命令向告警平台进行告警;当链接请求的异常次数达到预先设置的第一重启服务器阈值时,向信号接收处理器模块发送第一重启服务器信号,通过信号接收处理器模块调用相应命令对WebSocket服务器进行重启,其中, 第一重启服务器阈值大于第一告警阈值;当累积重启WebSocket服务器的次数达到切换双机阈值时,向信号接收处理器模块发送双机倒换信号,通过信号接收处理器模块调用相应命令对进行WebSocket服务器的双机倒换。
发送模块66还设置为:当中央处理器数据、和/或内存数据达到预先设置的相应阈值时,向信号接收处理器模块发送报警信号,通过信号接收处理器模块对报警信号进行处理。
可选地,在本发明实施例中,上述装置还可包括:
信号接收处理器监控模块,设置为向信号接收处理器模块发送第一心跳信息,接收信号接收处理器模块返回的第一心跳响应消息,当接收到的第一心跳响应消息异常次数累计大于重启阈值时,向信号接收处理器模块发送重启命令,对信号接收处理器模块进行重启;
接收模块,设置为接收信号接收处理器模块发送的第二心跳信息,向信号接收处理器模块返回第二心跳响应消息,在信号接收处理器模块确定接收到的第二心跳响应消息异常次数累计大于重启阈值时,接收信号接收处理器模块发送的重启命令,并根据重启命令进行重启。
上述各个模块的详细处理已经在方法实施例中进行了详细的说明,可以参照方法实施例的相应内容进行理解,在此不再赘述。
本发明实施例还提供一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现上面的方法。
以上所述的是本发明的实施方式,并不用于限定本发明的保护范围。显然,本领域的技术人员可以对本发明实施方式进行各种改动和变型。倘若本发明实施方式的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这 些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例的WebSocket服务器监控方法及装置,解决了相关技术中针对HTTP服务的自动监控方式不能够适用于WebSocket服务的问题,能够智能维护商用环境的稳定运行,并能减少运维人员的手工干预的工作量、以及减少运维的成本。

Claims (21)

  1. 一种WebSocket服务器监控方法,包括:
    步骤1,请求监控器模块请求与WebSocket服务器中的监控应用模块建立链接;
    步骤2,所述请求监控器模块在建立链接后,接收所述监控应用模块推送的数据并向所述监控应用模块返回响应消息,根据所述数据判断所述WebSocket服务器是否运行正常,其中,所述数据包括:顺序标识数据;
    步骤3,所述请求监控器模块在判断运行正常的情况下,重复执行步骤2,直到根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为正常;请求监控器模块在判断运行异常的情况下,向所述监控应用模块发送异常响应,根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为异常;
    步骤4,当链接请求的异常次数达到预先设置的阈值时,所述请求监控器模块向信号接收处理器模块发送报警信号,并通过所述信号接收处理器模块对所述报警信号进行处理。
  2. 如权利要求1所述的方法,其中,所述请求监控器模块在建立链接后,接收所述监控应用模块推送的数据并向所述监控应用模块返回响应消息包括:
    所述请求监控器模块在建立链接后,如果接收到所述监控应用模块推送的第一个数据,则获取所述第一个数据中携带的第一顺序标识数据,并在对所述第一顺序标识数据进行确认后,向所述监控应用模块返回第一响应消息;
    所述请求监控器模块在建立链接后,如果接收到所述监控应用模块推送的第n个数据,则获取所述第n个数据中携带的第n个顺序标识数据和所述请求监控器模块向所述监控应用模块返回的第n-1个响应消息,并在对所述第n个顺序标识数据和所述第n-1个响应消息进行确认后,向所述监控应用模块返回第n个响应消息,其中,2≤n≤N,N为所述请求监控器模块与所述监控应用模块建立链接的时间段内预设的数据推送个数。
  3. 如权利要求1所述的方法,其中,根据所述数据判断所述WebSocket 服务器是否运行正常包括:
    所述请求监控器模块在成功建立链接的情况下,在接收到所述监控应用模块推送的第一个数据后,获取所述数据中的顺序标识数据,根据所述顺序标识数据判断接收到的数据是否为顺序正确的数据,如果判断为是,则确定所述WebSocket服务器运行正常,如果判断为不是,则确定所述WebSocket服务器运行异常。
  4. 如权利要求1所述的方法,其中,所述数据还包括:采集的系统数据,所述系统数据包括:中央处理器数据、以及内存数据。
  5. 如权利要求4所述的方法,其中,根据所述数据判断所述WebSocket服务器是否运行正常包括:
    所述请求监控器模块在成功建立链接的情况下,在接收到所述监控应用模块推送的第一个数据后,获取所述数据中的顺序标识数据,根据所述顺序标识数据判断接收到的数据是否为有序数据,并且,判断所述数据中的系统数据是否小于预设阈值,如果这两个判断的结果均为是,则确定所述WebSocket服务器运行正常,如果这两个判断的结果中的至少一个为不是,则确定所述WebSocket服务器运行异常。
  6. 如权利要求1所述的方法,还包括:在所述监控应用模块向所述请求监控器模块推送数据后,未接收到所述请求监控器模块发送的响应消息的情况下,所述请求监控器模块接收所述监控应用模块发送的异常响应,根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为异常。
  7. 如权利要求1所述的方法,其中,所述步骤3包括:
    所述请求监控器模块在判断运行正常的情况下,间隔固定周期循环执行步骤2,直到根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为正常,其中,在所述监控应用模块接收到所述请求监控器模块发送的针对其推送的最后一个数据而返回响应消息后,向所述请求监控器模块发送断开链接请求。
  8. 如权利要求1所述的方法,其中,所述步骤4包括:
    当链接请求的异常次数达到预先设置的第一告警阈值时,所述请求监控 器模块向信号接收处理器模块发送第一告警信号,通过所述信号接收处理器模块调用相应命令向告警平台进行告警;
    当链接请求的异常次数达到预先设置的第一重启服务器阈值时,所述请求监控器模块向信号接收处理器模块发送第一重启服务器信号,通过所述信号接收处理器模块调用相应命令对所述WebSocket服务器进行重启,其中,所述第一重启服务器阈值大于所述第一告警阈值;
    当累积重启WebSocket服务器的次数达到切换双机阈值时,所述请求监控器模块向信号接收处理器模块发送双机倒换信号,通过所述信号接收处理器模块调用相应命令对进行WebSocket服务器的双机倒换。
  9. 如权利要求4所述的方法,其中,所述步骤4还包括:当所述中央处理器数据、和/或所述内存数据达到预先设置的相应阈值时,所述请求监控器模块向信号接收处理器模块发送报警信号,并通过所述信号接收处理器模块对所述报警信号进行处理。
  10. 如权利要求1所述的方法,所述方法还包括:
    所述请求监控器模块向所述信号接收处理器模块发送第一心跳信息,接收所述信号接收处理器模块返回的第一心跳响应消息,当接收到的第一心跳响应消息异常次数累计大于重启阈值时,向所述信号接收处理器模块发送重启命令,对所述信号接收处理器模块进行重启;
    所述请求监控器模块接收所述信号接收处理器模块发送的第二心跳信息,向所述信号接收处理器模块返回第二心跳响应消息,在所述信号接收处理器模块确定接收到的所述第二心跳响应消息异常次数累计大于所述重启阈值时,接收所述信号接收处理器模块发送的重启命令,并根据所述重启命令进行重启。
  11. 一种WebSocket服务器监控装置,包括:
    请求模块,设置为请求与WebSocket服务器中的监控应用模块建立链接;
    判断模块,设置为在建立链接后,接收所述监控应用模块推送的数据并向所述监控应用模块返回响应消息,根据所述数据判断所述WebSocket服务器是否运行正常,其中,所述数据包括:顺序标识数据;
    设置模块,设置为在所述判断模块判断运行正常的情况下,重复调用所述判断模块,直到根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为正常;在所述判断模块判断运行异常的情况下,向所述监控应用模块发送异常响应,根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为异常;以及
    发送模块,设置为当链接请求的异常次数达到预先设置的阈值时,所述请求监控器模块向信号接收处理器模块发送报警信号,并通过所述信号接收处理器模块对所述报警信号进行处理。
  12. 如权利要求11所述的装置,其中,所述判断模块是设置为:
    在建立链接后,如果接收到所述监控应用模块推送的第一个数据,则获取所述第一个数据中携带的第一顺序标识数据,并在对所述第一顺序标识数据进行确认后,向所述监控应用模块返回第一响应消息;
    在建立链接后,如果接收到所述监控应用模块推送的第n个数据,则获取所述第n个数据中携带的第n个顺序标识数据和所述判断模块向所述监控应用模块返回的第n-1个响应消息,并在对所述第n个顺序标识数据和所述第n-1个响应消息进行确认后,向所述监控应用模块返回第n个响应消息,其中,2≤n≤N,N为所述WebSocket服务器监控装置与所述监控应用模块建立链接的时间段内预设的数据推送个数。
  13. 如权利要求11所述的装置,其中,所述判断模块是设置为:
    在成功建立链接的情况下,在接收到所述监控应用模块推送的第一个数据后,获取所述数据中的顺序标识数据,根据所述顺序标识数据判断接收到的数据是否为顺序正确的数据,如果判断为是,则确定所述WebSocket服务器运行正常,如果判断为不是,则确定所述WebSocket服务器运行异常。
  14. 如权利要求11所述的装置,其中,所述数据还包括:采集的系统数据,所述系统数据包括:中央处理器数据、以及内存数据。
  15. 如权利要求14所述的装置,其中,所述判断模块是设置为:
    在成功建立链接的情况下,在接收到所述监控应用模块推送的第一个数据后,获取所述数据中的顺序标识数据,根据所述顺序标识数据判断接收到 的数据是否为有序数据,并且,判断所述数据中的系统数据是否小于预设阈值,如果这两个判断的结果均为是,则确定所述WebSocket服务器运行正常,如果这两个判断的结果中的至少一个为不是,则确定所述WebSocket服务器运行异常。
  16. 如权利要求11所述的装置,其中,所述设置模块是设置为:
    在所述监控应用模块向所述WebSocket服务器监控装置推送数据后,未接收到所述WebSocket服务器监控装置发送的响应消息的情况下,接收所述监控应用模块发送的异常响应,根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为异常。
  17. 如权利要求11所述的装置,其中,所述设置模块是设置为:
    在判断运行正常的情况下,间隔固定周期循环调用所述判断模块,直到根据所述监控应用模块的请求断开所述链接,并将本次链接请求设置为正常,其中,在所述监控应用模块接收到所述WebSocket服务器监控装置发送的针对其推送的最后一个数据而返回响应消息后,向所述设置模块发送断开链接请求。
  18. 如权利要求11所述的装置,其中,所述发送模块是设置为:
    当链接请求的异常次数达到预先设置的第一告警阈值时,向信号接收处理器模块发送第一告警信号,通过所述信号接收处理器模块调用相应命令向告警平台进行告警;
    当链接请求的异常次数达到预先设置的第一重启服务器阈值时,向信号接收处理器模块发送第一重启服务器信号,通过所述信号接收处理器模块调用相应命令对所述WebSocket服务器进行重启,其中,所述第一重启服务器阈值大于所述第一告警阈值;
    当累积重启WebSocket服务器的次数达到切换双机阈值时,向信号接收处理器模块发送双机倒换信号,通过所述信号接收处理器模块调用相应命令对进行WebSocket服务器的双机倒换。
  19. 如权利要求14所述的装置,其中,所述发送模块还设置为:当所述中央处理器数据、和/或所述内存数据达到预先设置的相应阈值时,向信号接 收处理器模块发送报警信号,通过所述信号接收处理器模块对所述报警信号进行处理。
  20. 如权利要求11所述的装置,所述装置还包括:
    信号接收处理器监控模块,设置为向所述信号接收处理器模块发送第一心跳信息,接收所述信号接收处理器模块返回的第一心跳响应消息,当接收到的第一心跳响应消息异常次数累计大于重启阈值时,向所述信号接收处理器模块发送重启命令,对所述信号接收处理器模块进行重启;
    接收模块,设置为接收所述信号接收处理器模块发送的第二心跳信息,向所述信号接收处理器模块返回第二心跳响应消息,在所述信号接收处理器模块确定接收到的所述第二心跳响应消息异常次数累计大于所述重启阈值时,接收所述信号接收处理器模块发送的重启命令,并根据所述重启命令进行重启。
  21. 一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现权利要求1至10中任一项所述的方法。
PCT/CN2015/072941 2014-06-27 2015-02-12 WebSocket服务器监控方法及装置 WO2015196821A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410301593.5 2014-06-27
CN201410301593.5A CN105306288A (zh) 2014-06-27 2014-06-27 WebSocket服务器监控方法及装置

Publications (1)

Publication Number Publication Date
WO2015196821A1 true WO2015196821A1 (zh) 2015-12-30

Family

ID=54936709

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072941 WO2015196821A1 (zh) 2014-06-27 2015-02-12 WebSocket服务器监控方法及装置

Country Status (2)

Country Link
CN (1) CN105306288A (zh)
WO (1) WO2015196821A1 (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262939A (zh) * 2019-05-14 2019-09-20 苏宁金融服务(上海)有限公司 算法模型运行监控方法、装置、计算机设备和存储介质
CN111124819A (zh) * 2019-12-10 2020-05-08 中国建设银行股份有限公司 全链路监控的方法和装置
CN111953791A (zh) * 2020-08-17 2020-11-17 浪潮云信息技术股份公司 一种基于webSocket高并发的消息动态同步处理方案
CN112140936A (zh) * 2020-09-29 2020-12-29 中国铁塔股份有限公司 充电监控方法、系统和存储介质
CN112527544A (zh) * 2020-11-23 2021-03-19 聚好看科技股份有限公司 一种服务器、触发熔断的方法及装置
CN113076234A (zh) * 2021-04-02 2021-07-06 多点(深圳)数字科技有限公司 一种html5页面实时监测的方法
CN113220720A (zh) * 2021-06-08 2021-08-06 上海天旦网络科技发展有限公司 一种实时秒级数据处理和查询方法及系统
CN113746910A (zh) * 2021-08-25 2021-12-03 湖北美和易思教育科技有限公司 H5页面重连服务器的方法、终端及可读存储介质
CN114363204A (zh) * 2021-12-09 2022-04-15 网宿科技股份有限公司 请求监控方法、网络设备及存储介质
CN114726561A (zh) * 2020-12-22 2022-07-08 京东科技信息技术有限公司 一种数据处理方法、装置和系统

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106921539A (zh) * 2017-02-06 2017-07-04 上海斐讯数据通信技术有限公司 一种基于云ac的关键业务模块监听方法及系统
CN108093416B (zh) * 2017-11-30 2021-09-21 厦门市美亚柏科信息股份有限公司 一种移动app推送数据的采集方法及终端
CN109302489A (zh) * 2018-11-07 2019-02-01 深圳市安泰数据监测科技有限公司 房屋安全实时监测设备端无线传输中断自动重启方法
CN110300071A (zh) * 2019-06-03 2019-10-01 广东美的厨房电器制造有限公司 物联网设备的服务器资源获取方法及相关设备
CN112835781B (zh) * 2019-11-25 2024-09-13 上海哔哩哔哩科技有限公司 一种操作功能的异常检测方法及装置
CN111031059A (zh) * 2019-12-23 2020-04-17 河南派亚尼尔自动化设备有限公司 一种基于WebSocket的物联网大屏监控系统及方法
CN111726420A (zh) * 2020-06-30 2020-09-29 北京来也网络科技有限公司 基于rpa的通信方法、装置、设备及存储介质
CN111884861B (zh) * 2020-08-03 2022-07-29 南京信息职业技术学院 一种基于Netty的物联网设备实时告警方法
CN111901176B (zh) * 2020-08-03 2023-08-01 京信网络系统股份有限公司 故障确定方法、装置、设备及存储介质
CN114070712B (zh) * 2021-07-14 2024-05-24 北京天元创新科技有限公司 消息不落地的网管告警处理方法及装置
CN115065715A (zh) * 2022-05-11 2022-09-16 厦门立林科技有限公司 服务监控和自动重启方法、介质、设备及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102437935A (zh) * 2011-12-16 2012-05-02 江西省电力公司信息通信中心 Web应用监控方法及设备
CN103259684A (zh) * 2013-05-23 2013-08-21 世纪龙信息网络有限责任公司 互联网业务监控方法和系统
CN103532795A (zh) * 2013-10-30 2014-01-22 蓝盾信息安全技术股份有限公司 一种检测web业务系统可用性的监控系统及方法
KR20140054480A (ko) * 2012-10-26 2014-05-09 이성진 웹사이트 이용 현황 실시간 모니터링 시스템 및 방법

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10409982B2 (en) * 2012-07-18 2019-09-10 Zixcorp Systems, Inc. Secure data access for multi-purpose mobile devices
CN103067230A (zh) * 2013-01-23 2013-04-24 江苏天智互联科技有限公司 一种通过植入监控代码实现对http服务监控的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102437935A (zh) * 2011-12-16 2012-05-02 江西省电力公司信息通信中心 Web应用监控方法及设备
KR20140054480A (ko) * 2012-10-26 2014-05-09 이성진 웹사이트 이용 현황 실시간 모니터링 시스템 및 방법
CN103259684A (zh) * 2013-05-23 2013-08-21 世纪龙信息网络有限责任公司 互联网业务监控方法和系统
CN103532795A (zh) * 2013-10-30 2014-01-22 蓝盾信息安全技术股份有限公司 一种检测web业务系统可用性的监控系统及方法

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262939A (zh) * 2019-05-14 2019-09-20 苏宁金融服务(上海)有限公司 算法模型运行监控方法、装置、计算机设备和存储介质
CN110262939B (zh) * 2019-05-14 2023-07-21 苏宁金融服务(上海)有限公司 算法模型运行监控方法、装置、计算机设备和存储介质
CN111124819A (zh) * 2019-12-10 2020-05-08 中国建设银行股份有限公司 全链路监控的方法和装置
CN111124819B (zh) * 2019-12-10 2023-09-22 中国建设银行股份有限公司 全链路监控的方法和装置
CN111953791A (zh) * 2020-08-17 2020-11-17 浪潮云信息技术股份公司 一种基于webSocket高并发的消息动态同步处理方案
CN112140936A (zh) * 2020-09-29 2020-12-29 中国铁塔股份有限公司 充电监控方法、系统和存储介质
CN112527544B (zh) * 2020-11-23 2022-04-29 聚好看科技股份有限公司 一种服务器、触发熔断的方法及装置
CN112527544A (zh) * 2020-11-23 2021-03-19 聚好看科技股份有限公司 一种服务器、触发熔断的方法及装置
CN114726561A (zh) * 2020-12-22 2022-07-08 京东科技信息技术有限公司 一种数据处理方法、装置和系统
CN114726561B (zh) * 2020-12-22 2024-04-05 京东科技信息技术有限公司 一种数据处理方法、装置和系统
CN113076234B (zh) * 2021-04-02 2022-07-12 多点(深圳)数字科技有限公司 一种html5页面实时监测的方法
CN113076234A (zh) * 2021-04-02 2021-07-06 多点(深圳)数字科技有限公司 一种html5页面实时监测的方法
CN113220720A (zh) * 2021-06-08 2021-08-06 上海天旦网络科技发展有限公司 一种实时秒级数据处理和查询方法及系统
CN113746910A (zh) * 2021-08-25 2021-12-03 湖北美和易思教育科技有限公司 H5页面重连服务器的方法、终端及可读存储介质
CN114363204A (zh) * 2021-12-09 2022-04-15 网宿科技股份有限公司 请求监控方法、网络设备及存储介质

Also Published As

Publication number Publication date
CN105306288A (zh) 2016-02-03

Similar Documents

Publication Publication Date Title
WO2015196821A1 (zh) WebSocket服务器监控方法及装置
CN109547511B (zh) 一种web消息实时推送方法、服务器、客户端及系统
WO2017166713A1 (zh) 服务请求处理方法及装置
WO2019218480A1 (zh) 一种推送服务的重连方法及设备
US20150127773A1 (en) Electronic device, storage medium and file transferring method
US20190028332A1 (en) Configuration information push method and device
EP3382563B1 (en) Communication device, communication system, communication method, and communication program
RU2015126358A (ru) Аудио-видео связь через промежуточный сервер с уменьшенной задержкой
WO2014187220A1 (en) Electronic device, storage medium and file transferrting method
EP3420463A1 (en) Lease-based heartbeat protocol method and apparatus
WO2015078341A1 (zh) 应用程序远程更新的方法和装置
CN113986501B (zh) 实时数据库api无中断调用方法、系统、存储介质及服务器
WO2008074244A1 (zh) 一种即时通信的方法、系统及装置
CN107508916B (zh) 用于智能机器人的服务器链接管理方法
CN109766110B (zh) 一种控制方法、基板管理控制器及控制系统
CN114143911B (zh) 基于Android平台无线投屏断网自动重连的方法
US10958712B2 (en) Enhanced reliability for information services
CN110071952B (zh) 服务调用量的控制方法和装置
US7990886B2 (en) Network device and connection detection method thereof
CN108632300B (zh) 数据同步系统、方法、服务器、客户端及电子设备
US11729289B2 (en) Push message communication apparatus
CN111224811B (zh) 一种snmp请求监听系统、方法、装置及计算机可读存储介质
JP5329589B2 (ja) トランザクション処理システム及びトランザクション処理システムの動作方法
JP4882537B2 (ja) タイマ連携によるリクエスト制御方法
CN111162952A (zh) 一种设备容错方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15812847

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15812847

Country of ref document: EP

Kind code of ref document: A1