CN113986676A - Server health check method and device, electronic equipment and storage medium - Google Patents

Server health check method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113986676A
CN113986676A CN202111292985.6A CN202111292985A CN113986676A CN 113986676 A CN113986676 A CN 113986676A CN 202111292985 A CN202111292985 A CN 202111292985A CN 113986676 A CN113986676 A CN 113986676A
Authority
CN
China
Prior art keywords
result
health
check
server
health check
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
CN202111292985.6A
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.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software 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 Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202111292985.6A priority Critical patent/CN113986676A/en
Publication of CN113986676A publication Critical patent/CN113986676A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a server health check method, a server health check device, electronic equipment and a storage medium, which are used for solving the problem that the health check state detection requirement under a complex scene is difficult to meet. The method comprises the following steps: acquiring policy configuration information; analyzing the strategy configuration information by using a custom rule script to obtain a check strategy; and performing interactive health check on the server nodes in the cluster for multiple times according to the check strategy to obtain a health check result, wherein the interactive health check refers to performing the health check by using a detection request carrying response information, and the response information is included in the last response result.

Description

Server health check method and device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of server clustering and health check, and in particular, to a server health check method, apparatus, electronic device, and storage medium.
Background
The Heartbeat Mechanism (Heartbeat Mechanism) refers to a Heartbeat packet in computer science is a periodic signal, and whether the behavior is normal or not or whether the behavior is consistent with a computer system is detected in a form of hardware or software. Usually, a heartbeat packet is sent every few seconds between machines, and if the receiving terminal does not receive the heartbeat packet within a specified time (usually within a time interval of sending several heartbeat packets), the sending terminal is determined to have failed to send.
The server health check means that the effect of checking the health state of a server node is achieved by using a heartbeat mechanism between servers, and the health state here means that the server can normally provide services for the terminal. Specific examples thereof include: and sending a heartbeat packet at regular time to let the opposite side know that the opposite side still stays alive, and letting the opposite side return a response packet of the heartbeat packet, so that whether the opposite side stays alive or not can be known, and the connection validity can be ensured.
At present, the idea for server health check is that a certain rule is constructed and a single request is sent for a specified Protocol, such as Internet Control Message Protocol (ICMP), Transmission Control Protocol (TCP), hypertext Transfer Protocol (HTTP), and the like, but it is found in practice that sending a single request using a specified Protocol is difficult to meet the health check state detection requirement in a complex scene, for example, for complex scenes such as banks, hospitals, finance, schools, and the like.
Disclosure of Invention
An object of the embodiments of the present application is to provide a server health check method, device, electronic device and storage medium, which are used to solve the problem that it is difficult to meet the health check state detection requirement in a complex scene.
The embodiment of the application provides a server health check method, which comprises the following steps: acquiring policy configuration information; analyzing the strategy configuration information by using a custom rule script to obtain a check strategy; and performing interactive health check on the server nodes in the cluster for multiple times according to the check strategy to obtain a health check result, wherein the interactive health check refers to performing the health check by using a detection request carrying response information, and the response information is included in the last response result. In the implementation process, the policy configuration information is analyzed by using the custom rule script to obtain the check policy, and interactive health check is performed on the server nodes in the cluster according to the check policy, so that the condition that a single request is sent to check and detect the health state is avoided. The self-defined rule script can self-define the interactive detection rule, and the strategy configuration information can set various complex scenes of the interactive detection strategy, so that the obtained interactive health examination result can meet the detection requirement of the health examination state under the complex scenes.
Optionally, in this embodiment of the present application, performing multiple interactive health checks on server nodes in a cluster according to a checking policy to obtain a health check result, where the method includes: generating a first detection request according to a preset protocol rule, and sending the first detection request to a server node in a cluster so as to enable the server node in the cluster to return a first response result comprising response information; judging whether the first response result is a first expected result; and if so, sending a second detection request carrying response information to the server nodes in the cluster, so that the server nodes in the cluster return a second response result corresponding to the second detection request, and determining a health check result according to the second response result. In the implementation process, the second probe request carrying the response information is sent to the server node in the cluster only when the first response result is the first expected result, so that the server node in the cluster returns the second response result corresponding to the second probe request, and the health check result is determined according to the second response result, and therefore, the two-time interactive probe strategy can meet the probe requirement of the health check state in most cases.
Optionally, in this embodiment of the application, after determining whether the first response result is the first expected result, the method further includes: if the first response result is not the first expected result, the health check result is determined to be a failure.
Optionally, in this embodiment of the present application, determining a health check result according to the second response result includes: judging whether the second response result is a second expected result; if so, determining that the health check result is successful, otherwise, determining that the health check result is failure.
Optionally, in this embodiment of the present application, performing multiple interactive health checks on server nodes in a cluster according to a checking policy includes: acquiring a health examination script, and loading an examination strategy through the health examination script to acquire a strategy examination script; the server nodes in the load balancing cluster are interactively health checked multiple times while the policy check script is executed. In the implementation process, the checking strategy is loaded through the health checking script to obtain a strategy checking script; when the strategy checking script is executed, the server nodes in the load balancing cluster are subjected to interactive health checking for many times, and the detection requirement of the health checking state under the complex scene can be effectively met by the interactive health checking results for many times.
Optionally, in this embodiment of the present application, after obtaining the health check result, the method further includes: judging whether the health examination result is successful or not; and if so, modifying the health state of the server node to be normal, otherwise, modifying the health state of the server node to be abnormal.
Optionally, in an embodiment of the present application, the method further includes: judging whether the health state of the server node is normal or not; and if so, acquiring the data traffic and forwarding the data traffic to the server node. In the implementation process, the data traffic is acquired and forwarded to the server node only when the health state of the server node is normal, so that the condition that the service cannot be provided due to the fact that the traffic is forwarded to the abnormal server node is avoided, and the robustness of the server health check is effectively improved.
An embodiment of the present application further provides a server health check device, including: the configuration information acquisition module is used for acquiring the strategy configuration information; the checking strategy obtaining module is used for analyzing the strategy configuration information by using the user-defined rule script to obtain a checking strategy; and the check result obtaining module is used for carrying out multiple interactive health checks on the server nodes in the cluster according to the check strategy to obtain a health check result, wherein the interactive health checks refer to carrying out the health checks by using the detection request carrying the response information, and the response information is included in the last response result.
Optionally, in an embodiment of the present application, the inspection result obtaining module includes: the system comprises a detection request sending module, a response information sending module and a response information sending module, wherein the detection request sending module is used for generating a first detection request according to a preset protocol rule and sending the first detection request to a server node in a cluster so as to enable the server node in the cluster to return a first response result comprising response information; the first result judging module is used for judging whether the first response result is a first expected result or not; and the first result determining module is used for sending a second detection request carrying response information to the server nodes in the cluster if the first response result is a first expected result, so that the server nodes in the cluster return a second response result corresponding to the second detection request, and determining a health check result according to the second response result.
Optionally, in this embodiment of the present application, the server health check apparatus further includes: and the checking result negation module is used for determining the health checking result as failure if the first response result is not the first expected result.
Optionally, in an embodiment of the present application, the inspection result determining module includes: the second result judging module is used for judging whether the second response result is a second expected result or not; and the second result determining module is used for determining that the health examination result is successful if the second response result is a second expected result, and otherwise, determining that the health examination result is failed.
Optionally, in an embodiment of the present application, the inspection result obtaining module includes: the inspection script obtaining module is used for obtaining the health inspection script and loading an inspection strategy through the health inspection script to obtain a strategy inspection script; and the interactive check module is used for performing interactive health check on the server nodes in the load balancing cluster for a plurality of times when the strategy check script is executed.
Optionally, in this embodiment of the present application, the server health check apparatus further includes: the third result judging module is used for judging whether the health examination result is successful or not; and the health state modification module is used for modifying the health state of the server node to be normal if the health check result is successful, or modifying the health state of the server node to be abnormal if the health check result is not successful.
Optionally, in this embodiment of the present application, the server health check apparatus further includes: the health state judging module is used for judging whether the health state of the server node is normal or not; and the data traffic sending module is used for acquiring the data traffic and forwarding the data traffic to the server node if the health state of the server node is normal.
An embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory storing processor-executable machine-readable instructions, the machine-readable instructions when executed by the processor performing the method as described above.
Embodiments of the present application also provide a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the method as described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a schematic flow chart illustrating a server health check method provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of a health check system in a load balancing environment according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating forwarding of data traffic according to a health check result according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a server health check device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the embodiments of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments obtained by a person skilled in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the embodiments of the present application.
Before introducing the server health check method provided in the embodiment of the present application, some concepts related to the embodiment of the present application are introduced:
a computer cluster (also referred to as a cluster) refers to a group of loosely or tightly connected computers that work together and need to be installed with an operating system and cooperative software to cooperate together, and the cooperative computers may also be referred to as cluster nodes.
A High-Availability (HA) Cluster, also known as a High Availability Cluster, a clustered HA Cluster, or a failover Cluster, is a group of electronic computers that support server applications that operate reliably with the goal of minimum outage time.
It should be noted that the server health check method provided in the embodiments of the present application may be executed by an electronic device, where the electronic device refers to a device terminal or a server having a function of executing a computer program, and the device terminal includes, for example: a smart phone, a personal computer, a tablet computer, a personal digital assistant, or a mobile internet device, etc. The server is, for example: x86 server and non-x 86 server, non-x 86 server includes: mainframe, minicomputer, and UNIX server.
Application scenarios to which the server health check method is applicable are described below, where the application scenarios include, but are not limited to: the server health check method is used for carrying out health check and the like on the server nodes in the computer cluster, wherein the computer cluster comprises but is not limited to a load balancing system cluster, a high-availability cluster and the like, the load balancing system relates to various industries such as banks, hospitals, finance, schools and the like, and the server health check method can be used for providing diversified health check services for the industries and meeting the detection requirements of health check states of different industries under complex scenes of different services.
Please refer to fig. 1, which is a schematic flow chart of a server health check method according to an embodiment of the present application; the server health check method mainly includes the steps of analyzing strategy configuration information by using a custom rule script to obtain a check strategy, and performing interactive health check on server nodes in a cluster according to the check strategy, so that the condition that a single request is sent to check and detect a health state is avoided. The self-defined rule script can self-define the interactive detection rule, and the strategy configuration information can set various complex scenes of the interactive detection strategy, so that the obtained interactive health examination result can meet the detection requirement of the health examination state under the complex scenes. The embodiment of the server health check method may include:
step S110: the electronic device obtains policy configuration information.
The embodiment of step S110 described above is, for example: the electronic device obtains the policy configuration information from the configuration file on the file system or the mobile storage device, and of course, the electronic device may also obtain the policy configuration information from the configuration table of the database, and so on. Policy Configuration Information (Policy Configuration Information) herein refers to checking Policy Configuration related Information for health check, and the measurement Configuration Information herein includes but is not limited to: duration of each probing interval, timeout duration, number of attempts, etc.
After step S110, step S120 is performed: the electronic equipment analyzes the strategy configuration information by using the custom rule script to obtain the check strategy.
The embodiment of step S120 described above is, for example: the electronic equipment analyzes the strategy configuration information by using a custom rule script which is interpreted and executed by a preset programming language to obtain a check strategy; the preset programming language can use LISP, Shell, Perl, Python and the like, the custom rule script can be written by a user according to custom detection rules such as service characteristics, namely the custom rule script can enable the user to define the detection rules according to the service characteristics, so that the user can more flexibly check the health of the server nodes in the cluster, and can better cope with unknown services and more complex health check scenes in a load balancing environment.
After step S120, step S130 is performed: and the electronic equipment carries out multiple interactive health checks on the server nodes in the cluster according to the check strategy to obtain health check results.
The interactive health check refers to performing health check by carrying a probe request of response information in a response result, and specifically, the electronic device may send the probe request to the server multiple times to allow the electronic device to interact with the server at a deeper level, specifically, for example: in the interaction process of the HTTP service, the electronic device may obtain a redirect address returned by the server (i.e., response information returned in a last response result), and then resend the probe request to the redirect address to confirm the working health state of the server, or, in the user authentication process, it is necessary to first obtain the server authentication encryption algorithm type (i.e., response information returned in the last response result), then encrypt the authentication information according to the authentication encryption algorithm type, and send the encrypted information to the server, thereby verifying the health state of the server.
There are many embodiments of the above step S130, including but not limited to the following:
in a first embodiment, an electronic device executes a health check script that may perform a plurality of interactive health checks according to different protocols, which may include:
step S131: the electronic equipment generates a first detection request according to a preset protocol rule and sends the first detection request to the server nodes in the cluster, so that the server nodes in the cluster return a first response result comprising response information.
The embodiment of step S131 described above is, for example: taking the example of interactive health check by the HTTP service, the user may write an HTTP health check script according to the service authentication rule, and then the script on the electronic device may generate a first probe request according to the preset protocol rule, and send the first probe request to the server nodes in the cluster, so that the server nodes in the cluster return a first response result including the response information.
Step S132: the electronic device determines whether the first response result is a first expected result.
Step S133: if the first response result is the first expected result, the electronic device sends a second detection request carrying response information to the server nodes in the cluster, so that the server nodes in the cluster return a second response result corresponding to the second detection request, and the health check result is determined according to the second response result.
The embodiments of the above steps S132 to S133 are, for example: the electronic equipment judges whether the first response result is a first expected result; and if the first response result is the first expected result, the electronic equipment sends a second detection request carrying response information to the server nodes in the cluster. And after receiving the second detection request, the server nodes in the cluster return a second response result corresponding to the second detection request. The electronic equipment judges whether the second response result is a second expected result; if the second response result is a second expected result, the electronic device determines that the health check result is successful; if the second response result is not the second expected result, the electronic device determines that the health check result is a failure.
Step S134: if the first response result is not the first expected result, the health check result is determined to be a failure.
In a second embodiment, a health check script is used to perform multiple interactive health checks in a load balancing environment, which may include: and acquiring a health check script, and loading a check strategy through the health check script to acquire a strategy check script. The server nodes in the load balancing cluster are interactively health checked multiple times while the policy check script is executed. The interactive health check refers to performing health check by using a probe request carrying response information, where the response information is included in a last response result.
Please refer to fig. 2, which is a schematic diagram of a health check system in a load balancing environment according to an embodiment of the present application; the health check system may include: the system comprises load balancing equipment, an HTTP service cluster and a MySQL service cluster; the HTTP service cluster comprises a server A and a server B, and the MySQL service cluster comprises a server C and a server D. Here, the servers a and B serve as real nodes for providing services at the backend, and when the services provided by the servers a and B depend on the services provided by the servers C and D, the servers a and B and the servers C and D need to be checked for health at the same time. I.e., a health check method is needed to detect services related to both protocols, conventional health check methods cannot perform health check for services of both protocol types, e.g., a and B servers provide HTTP services, and C and D provide database services for a and B. Embodiments that use a health check script to perform multiple interactive health checks in such a load balancing environment are for example: acquiring a health check script (which may be a health check script written by a user for HTTP services and MySQL services), and performing health check on the HTTP services, specifically for example: and performing health check on the HTTP service on the server A, and if the health check result of the HTTP service on the server A is successful, then performing health check on the MySQL service on the server C, wherein the service can be normally provided for the client only if the HTTP service on the server A and the MySQL service on the server C are successful.
In the implementation process, the policy configuration information is analyzed by using the custom rule script to obtain the check policy, and interactive health check is performed on the server nodes in the cluster according to the check policy, so that the condition that a single request is sent to check and detect the health state is avoided. The self-defined rule script can self-define the interactive detection rule, and the strategy configuration information can set various complex scenes of the interactive detection strategy, so that the obtained interactive health examination result can meet the detection requirement of the health examination state under the complex scenes.
Please refer to fig. 3, which is a schematic flow chart illustrating forwarding of data traffic according to a health check result according to an embodiment of the present application; optionally, after the health check result is obtained above, the data traffic may also be forwarded according to the health check result, including:
step S210: the electronic device determines whether the health check result is successful.
Step S220: and if the health check result is successful, the electronic equipment modifies the health state of the server node to be normal.
Step S230: and if the health check result is not successful, the electronic equipment modifies the health state of the server node into abnormal.
The embodiments of the above steps S210 to S230 are, for example: the electronic equipment judges whether the health check result is successful by using an executable program compiled or interpreted by a preset programming language; if the health check result is successful, the health state of the server node is modified to be normal; and if the health check result is not successful, modifying the health state of the server node into an abnormal state. Among others, programming languages that may be used are, for example: C. c + +, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python, and PHP, among others.
Step S240: the electronic equipment judges whether the health state of the server node is normal.
Step S250: and if the health state of the server node is normal, the electronic equipment acquires the data traffic and forwards the data traffic to the server node.
The embodiments of the above steps S240 to S250 are, for example: the electronic equipment judges whether the health state of the server node is normal or not by using an executable program compiled or interpreted and executed by a preset programming language; and if the health state of the server node is normal, the electronic equipment acquires the data traffic and forwards the data traffic to the server node. It is to be appreciated that if the health of the server node is abnormal, the electronic device avoids forwarding data traffic to the server node. Among others, programming languages that may be used are, for example: C. c + +, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python, and PHP, among others.
Please refer to fig. 4, which is a schematic structural diagram of a server health check apparatus according to an embodiment of the present application; the embodiment of the present application provides a server health check device 300, including:
a configuration information obtaining module 310, configured to obtain policy configuration information.
And the inspection policy obtaining module 320 is configured to analyze the policy configuration information using the custom rule script to obtain an inspection policy.
The examination result obtaining module 330 is configured to perform multiple interactive health examinations on the server nodes in the cluster according to the examination policy to obtain a health examination result, where the interactive health examinations refer to performing health examinations using probe requests carrying response information, and the response information is included in the last response result.
Optionally, in an embodiment of the present application, the inspection result obtaining module includes:
and the detection request sending module is used for generating a first detection request according to a preset protocol rule and sending the first detection request to the server nodes in the cluster so as to enable the server nodes in the cluster to return a first response result comprising response information.
And the first result judging module is used for judging whether the first response result is a first expected result.
And the first result determining module is used for sending a second detection request carrying response information to the server nodes in the cluster if the first response result is a first expected result, so that the server nodes in the cluster return a second response result corresponding to the second detection request, and determining a health check result according to the second response result.
Optionally, in this embodiment of the present application, the server health check apparatus further includes:
and the checking result negation module is used for determining the health checking result as failure if the first response result is not the first expected result.
Optionally, in an embodiment of the present application, the inspection result determining module includes:
and the second result judging module is used for judging whether the second response result is a second expected result.
And the second result determining module is used for determining that the health examination result is successful if the second response result is a second expected result, and otherwise, determining that the health examination result is failed.
Optionally, in an embodiment of the present application, the inspection result obtaining module includes:
and the examination script obtaining module is used for obtaining the health examination script and loading the examination strategy through the health examination script to obtain the strategy examination script.
And the interactive check module is used for performing interactive health check on the server nodes in the load balancing cluster for a plurality of times when the strategy check script is executed.
Optionally, in this embodiment of the present application, the server health check apparatus further includes:
and the third result judging module is used for judging whether the health examination result is successful.
And the health state modification module is used for modifying the health state of the server node to be normal if the health check result is successful, or modifying the health state of the server node to be abnormal if the health check result is not successful.
Optionally, in this embodiment of the present application, the server health check apparatus further includes:
and the health state judgment module is used for judging whether the health state of the server node is normal or not.
And the data traffic sending module is used for acquiring the data traffic and forwarding the data traffic to the server node if the health state of the server node is normal.
It should be understood that the apparatus corresponds to the above-mentioned embodiment of the server health check method, and can perform the steps related to the above-mentioned embodiment of the method, and the specific functions of the apparatus can be referred to the above description, and the detailed description is appropriately omitted here to avoid redundancy. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device.
Please refer to fig. 5, which illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application. An electronic device 400 provided in an embodiment of the present application includes: a processor 410 and a memory 420, the memory 420 storing machine-readable instructions executable by the processor 410, the machine-readable instructions when executed by the processor 410 performing the method as above.
Embodiments of the present application also provide a computer-readable storage medium 430, where the computer-readable storage medium 430 stores a computer program, and the computer program is executed by the processor 410 to perform the above method.
The computer-readable storage medium 430 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
In addition, functional modules of the embodiments in the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an alternative embodiment of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present application, and all the changes or substitutions should be covered by the scope of the embodiments of the present application.

Claims (10)

1. A server health check method, comprising:
acquiring policy configuration information;
analyzing the strategy configuration information by using a custom rule script to obtain a check strategy;
and performing multiple interactive health checks on the server nodes in the cluster according to the check strategy to obtain health check results, wherein the interactive health checks are performed by using detection requests carrying response information, and the response information is included in the last response result.
2. The method of claim 1, wherein performing multiple interactive health checks on the server nodes in the cluster according to the check policy to obtain health check results comprises:
generating a first detection request according to a preset protocol rule, and sending the first detection request to a server node in the cluster so as to enable the server node in the cluster to return a first response result comprising response information;
judging whether the first response result is a first expected result;
if so, sending a second detection request carrying the response information to the server node in the cluster, so that the server node in the cluster returns a second response result corresponding to the second detection request, and determining the health check result according to the second response result.
3. The method of claim 2, wherein after said determining whether said first response result is a first expected result, further comprising:
determining the health check result as a failure if the first response result is not a first expected result.
4. The method of claim 2, wherein said determining the health check result from the second response result comprises:
judging whether the second response result is a second expected result;
if so, determining that the health check result is successful, otherwise, determining that the health check result is failed.
5. The method of claim 1, wherein performing a plurality of interactive health checks on the server nodes in the cluster according to the check policy comprises:
acquiring a health check script, and loading the check strategy through the health check script to acquire a strategy check script;
and when the strategy checking script is executed, carrying out a plurality of interactive health checks on the server nodes in the load balancing cluster.
6. The method of claim 1, further comprising, after said obtaining health check results:
judging whether the health examination result is successful or not;
and if so, modifying the health state of the server node to be normal, otherwise, modifying the health state of the server node to be abnormal.
7. The method of claim 6, further comprising:
judging whether the health state of the server node is normal or not;
and if so, acquiring data traffic and forwarding the data traffic to the server node.
8. A server health check device, comprising:
the configuration information acquisition module is used for acquiring the strategy configuration information;
the checking strategy obtaining module is used for analyzing the strategy configuration information by using a custom rule script to obtain a checking strategy;
and the check result obtaining module is used for carrying out multiple interactive health checks on the server nodes in the cluster according to the check strategy to obtain a health check result, wherein the interactive health checks refer to carrying out health checks by using a detection request carrying response information, and the response information is included in the last response result.
9. An electronic device, comprising: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the machine-readable instructions, when executed by the processor, performing the method of any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the method of any one of claims 1 to 7.
CN202111292985.6A 2021-11-03 2021-11-03 Server health check method and device, electronic equipment and storage medium Pending CN113986676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111292985.6A CN113986676A (en) 2021-11-03 2021-11-03 Server health check method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111292985.6A CN113986676A (en) 2021-11-03 2021-11-03 Server health check method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113986676A true CN113986676A (en) 2022-01-28

Family

ID=79746093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111292985.6A Pending CN113986676A (en) 2021-11-03 2021-11-03 Server health check method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113986676A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962247A (en) * 2023-08-01 2023-10-27 北京志凌海纳科技有限公司 Active health check method, device, equipment and medium in load balancing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962247A (en) * 2023-08-01 2023-10-27 北京志凌海纳科技有限公司 Active health check method, device, equipment and medium in load balancing system
CN116962247B (en) * 2023-08-01 2024-02-09 北京志凌海纳科技有限公司 Active health check method, device, equipment and medium in load balancing system

Similar Documents

Publication Publication Date Title
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
JP6726706B2 (en) System and method for detecting anomalous events based on the popularity of convolution
CN108667770B (en) Website vulnerability testing method, server and system
CN108038039B (en) Method for recording log and micro-service system
CN107835228B (en) Instruction processing method and device based on dynamic generalized routing
US10970200B2 (en) Test result triage for a failed code validation
CN111046310A (en) Page processing method, device, server and computer readable storage medium
CN111953770B (en) Route forwarding method and device, route equipment and readable storage medium
CN109873732B (en) Test method and device for proxy server
US11055416B2 (en) Detecting vulnerabilities in applications during execution
CN113986676A (en) Server health check method and device, electronic equipment and storage medium
CN111556080A (en) Network node monitoring method, device, medium and electronic equipment
CN111327588A (en) Network access security detection method, system, terminal and readable storage medium
CN113010892B (en) Method and device for detecting malicious behavior of small program
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN116260643A (en) Security testing method, device and equipment for web service of Internet of things
CN111049899A (en) kafka message storage system, method, apparatus, and computer-readable storage medium
CN112395194B (en) Method and device for accessing test platform
CN115051824A (en) Vertical override detection method, system, equipment and storage medium
CN112199281A (en) Data processing method and device, terminal equipment and readable storage medium
CN111107143A (en) Network file transmission detection method, device and system
CN117331754B (en) Abnormality problem reduction method, abnormality problem reduction system, electronic device, and computer storage medium
CN112887410B (en) Running method, device, equipment and storage medium of web service program
CN115994361B (en) Container vulnerability detection method, system, electronic device and readable storage medium
CN113778800B (en) Error information processing method, device, system, equipment and storage medium

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