[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115914027B - Health check system in load balancing equipment - Google Patents

Health check system in load balancing equipment Download PDF

Info

Publication number
CN115914027B
CN115914027B CN202211633488.2A CN202211633488A CN115914027B CN 115914027 B CN115914027 B CN 115914027B CN 202211633488 A CN202211633488 A CN 202211633488A CN 115914027 B CN115914027 B CN 115914027B
Authority
CN
China
Prior art keywords
module
health
result
sub
checking
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.)
Active
Application number
CN202211633488.2A
Other languages
Chinese (zh)
Other versions
CN115914027A (en
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.)
Shanghai Hongji Information Technology Co Ltd
Original Assignee
Shanghai Hongji Information Technology Co Ltd
Filing date
Publication date
Application filed by Shanghai Hongji Information Technology Co Ltd filed Critical Shanghai Hongji Information Technology Co Ltd
Priority to CN202211633488.2A priority Critical patent/CN115914027B/en
Publication of CN115914027A publication Critical patent/CN115914027A/en
Application granted granted Critical
Publication of CN115914027B publication Critical patent/CN115914027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a health check system in load balancing equipment, which relates to the technical field of equipment health check, and comprises the following components: a health check module and a forwarding module; the forwarding module and the back-end server are both connected with the health check module; the forwarding module is connected with the back-end server; the health checking module is used for checking the back-end server by utilizing N preset health checking methods to obtain N health checking sub-results of the current times; outputting the total health examination result of the current times of the back-end server according to the preset threshold and the health examination score results of all the current times; and the forwarding module is used for controlling the flow distribution to the back-end server according to the total health check result of the current times. The invention improves the reliability of the health check notification and the forwarding performance of the forwarding module.

Description

Health check system in load balancing equipment
Technical Field
The invention relates to the technical field of equipment health inspection, in particular to a health inspection system in load balancing equipment.
Background
The load balancing device will periodically send a probe message to the backend server to check its operational status, a process called health check. For example, the load balancing device sends ICMPrequest messages to the back-end server group every 5 seconds, and if one of the servers operates normally, the load balancing device replies ICMPREPLY messages. After receiving ICMPREPLY of the server, the load balancing device considers that the running state of the server is normal; if the load balancing device does not receive ICMP REPLY messages of a certain server, the load balancing device considers that the state of the server is abnormal. The load balancing device does not distribute the traffic to the back-end servers with abnormal health check states, but only distributes the traffic to the back-end servers with normal health check states, namely, only the servers with normal health check states can bear the traffic, so that the reliability of the traffic is improved. When the abnormal back-end server is restored to the normal state, the health check also detects and rejoins the abnormal back-end server to the load cluster and re-carries the traffic.
Typically, only one method is used for health checking on a backend server, such as internet control message protocol (InternetControlMessageProtocol, ICMP), transmission control protocol (TransmissionControlProtocol, TCP), user datagram protocol (UserDatagram Protocol, UDP), and the like. Under the condition that the network is congested, messages of the health check are easy to discard, and misjudgment is easy to occur in the health check. To increase fault tolerance, a backend server may be checked for health using N (N >1, up to 16) methods simultaneously, and if M (m+.n) of the health checks are normal, the backend server is considered normal.
In the existing health inspection system, as shown in fig. 2, in order to increase fault tolerance, the health inspection module performs health inspection on each back-end server by using N (up to 16) methods at the same time, and sends all the health inspection results to the forwarding module, where the forwarding module gathers a large number of health inspection results and performs a large number of analysis decisions, which consumes the performance of the forwarding module and affects the forwarding performance to a certain extent. The health check notices are transmitted through the port socket, when the number of the health check results is relatively large, the number of the interactive messages is relatively large, and thus the message channels are easy to be congested to cause message loss, and abnormal health results can be caused. In summary, the reliability of the health check notification in the existing health check system is low, and the forwarding performance of the forwarding module is poor.
Disclosure of Invention
The invention aims to provide a health check system in load balancing equipment, which improves the reliability of health check notification and the forwarding performance of a forwarding module.
In order to achieve the above object, the present invention provides the following solutions:
A health check system in a load balancing device, the health check system comprising: a health check module and a forwarding module; the forwarding module and the back-end server are both connected with the health check module; the forwarding module is connected with the back-end server;
The health check module comprises:
The checking sub-module is connected with the back-end server and is used for checking the back-end server by using N preset health checking methods to obtain N health checking sub-results of the current times; the health check result is a normal result or an abnormal result; n >1;
The result output sub-module is connected with the checking sub-module and is used for outputting the total health check result of the current times of the back-end server according to the preset threshold value and the health check score results of all the current times;
The forwarding module includes:
And the flow distribution sub-module is connected with the result output sub-module and is used for controlling flow distribution to the back-end server according to the total health examination result of the current times.
Optionally, the health check system further comprises: the checking method stores the sub-module; the inspection method storage submodule is connected with the inspection submodule;
The checking method storage submodule is used for storing the preset health checking method.
Optionally, the health check module further comprises: the inspection method obtains a sub-module; the inspection method acquisition sub-module is respectively connected with the inspection method storage sub-module and the inspection sub-module;
the inspection method acquisition sub-module is used for acquiring the preset health inspection method from the inspection method storage sub-module and sending the preset health inspection method to the inspection sub-module.
Optionally, the health check module further comprises: a preset threshold value storage sub-module; the preset threshold value storage submodule is connected with the result output submodule;
the preset threshold value storage submodule is used for storing the preset threshold value.
Optionally, the result output sub-module includes:
The first judging unit is connected with the checking submodule and is used for judging whether the number of the normal results in the R health checking sub-results is larger than or equal to the preset threshold value or not to obtain a first judging result; r < N;
the first execution unit is connected with the first judgment unit and is used for controlling the inspection sub-module to stop the inspection of the current times when the first judgment result is yes, and determining the total health inspection result of the current times as a normal total result;
the second execution unit is connected with the first judgment unit and is used for controlling the inspection sub-module to continue the current times of inspection when the first judgment result is negative;
The second judging unit is connected with the checking sub-module and is used for judging whether the number of normal results in the N current times of health checking sub-results is larger than or equal to the preset threshold value or not when the checking sub-module finishes executing N preset health checking methods, so as to obtain a second judging result;
the third execution unit is connected with the second judgment unit and is used for determining the total health examination result of the current times as a normal total result when the second judgment result is yes;
The fourth execution unit is connected with the second judgment unit and is used for determining the total health examination result as an abnormal total result when the second judgment result is negative;
And the to-be-forwarded unit is respectively connected with the first execution unit, the third execution unit, the fourth execution unit and the forwarding module and is used for sending the current times of health examination total results to the forwarding module when the current times of health examination total results are different from the last health examination total results or reach an advertising interval.
Optionally, the traffic distribution submodule includes:
The third judging unit is connected with the result output submodule and is used for judging whether the total result of the health examination of the current times is a normal result or not and reaching a third judging result;
the fifth execution unit is connected with the third judgment unit and is used for continuing to distribute the flow to the back-end server when the third judgment result is yes;
And the sixth execution unit is connected with the third judgment unit and is used for stopping flow distribution to the back-end server when the third judgment result is negative.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
The invention discloses a health check system in load balancing equipment, which comprises: a health check module and a forwarding module; the forwarding module and the back-end server are both connected with the health check module; the forwarding module is connected with the back-end server; a health check module comprising: the checking sub-module is connected with the back-end server and is used for checking the back-end server by using N preset health checking methods to obtain N health checking sub-results of the current times; the health check result is a normal result or an abnormal result; n >1; the result output sub-module is connected with the checking sub-module and is used for outputting the total health check result of the current times of the back-end server according to the preset threshold value and the health check score results of all the current times; a forwarding module comprising: and the flow distribution sub-module is connected with the result output sub-module and is used for controlling the flow distribution to the back-end server according to the total health examination result of the current times. The invention utilizes the health inspection module to gather the health inspection sub-results of the back-end server to obtain the health inspection total results, and the health inspection sub-results are not put into the forwarding module to gather and judge any more, thereby reducing the work of the forwarding module, and ensuring the calculation power of the forwarding module to be used for flow distribution as much as possible, so that the forwarding performance of the load balancing equipment can be improved; in addition, unnecessary health check notices between the forwarding module and the health check module can be reduced, the condition that the health check notices are lost due to excessive health check notices can be avoided, and the reliability of the health check notices and the forwarding performance of the forwarding module are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a health checking system in a load balancing device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a conventional health inspection system;
Fig. 3 is a schematic diagram of a health check flow based on a health check system in a load balancing device.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a health check system in load balancing equipment, which aims to improve the reliability of health check notification and the forwarding performance of a forwarding module.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Fig. 1 is a schematic structural diagram of a health checking system in a load balancing device according to an embodiment of the present invention. As shown in fig. 1, the health check system in the load balancing apparatus in the present embodiment includes: a health check module 1 and a forwarding module 2; the forwarding module 2 and the back-end server 3 are both connected with the health check module 1; the forwarding module 2 is connected to a backend server 3.
Health check module 1, comprising:
The checking sub-module 11 is connected with the back-end server 3 and is used for checking the back-end server 3 by using N preset health checking methods to obtain N health checking sub-results of the current times; the health check result is a normal result or an abnormal result; n >1. Specifically, nmax may be set to 16.
The result output sub-module 12 is connected with the checking sub-module 11, and is used for outputting the total result of the health check of the current times of the back-end server 3 according to the preset threshold value and the health check score of all the current times.
A forwarding module 2 comprising:
the flow distribution sub-module 21 is connected to the result output sub-module 12, and is configured to control flow distribution to the backend server 3 according to the total health check result of the current times.
As an alternative embodiment, the health check system further comprises: the checking method stores the sub-module; the inspection method storage sub-module is connected with the inspection sub-module 11.
The checking method storage sub-module is used for storing a preset health checking method.
As an alternative embodiment, the health check module 1 further comprises: the inspection method obtains a sub-module; the inspection method acquisition sub-module is connected with the inspection method storage sub-module and the inspection sub-module 11, respectively.
The inspection method acquisition sub-module is used for acquiring a preset health inspection method from the inspection method storage sub-module and transmitting the preset health inspection method to the inspection sub-module 11.
As an alternative embodiment, the health check module 1 further comprises: a preset threshold value storage sub-module; the preset threshold storage sub-module is connected with the result output sub-module 12.
The preset threshold value storage submodule is used for storing a preset threshold value.
As an alternative embodiment, the result output sub-module 12 comprises:
The first judging unit is connected with the checking sub-module 11 and is used for judging whether the number of the normal results in the R health checking sub-results is larger than or equal to a preset threshold value or not to obtain a first judging result; r < N.
And the first execution unit is connected with the first judgment unit and is used for controlling the checking sub-module 11 to stop checking the current times and determining the total health checking result of the current times as a normal total result when the first judgment result is yes.
And the second execution unit is connected with the first judgment unit and is used for controlling the inspection sub-module 11 to continue the current times of inspection when the first judgment result is negative.
And the second judging unit is connected with the checking sub-module 11 and is used for judging whether the number of normal results in the N current times of health checking sub-results is larger than or equal to a preset threshold value or not when the checking sub-module 11 finishes executing the N preset health checking methods, so as to obtain a second judging result.
And the third execution unit is connected with the second judgment unit and is used for determining the total health examination result of the current times as a normal total result when the second judgment result is yes.
And the fourth execution unit is connected with the second judgment unit and is used for determining the total health examination result as an abnormal total result when the second judgment result is negative.
The unit to be forwarded is respectively connected with the first execution unit, the third execution unit, the fourth execution unit and the forwarding module 2, and is used for sending the total health examination result of the current times to the forwarding module 2 when the total health examination result of the current times is different from the total health examination result of the last time or reaches an advertising interval.
As an alternative embodiment, the traffic distribution sub-module 21 includes:
And a third judging unit, connected to the result output sub-module 12, for judging whether the total result of the health check of the current times is a normal result, and reaching a third judging result.
And the fifth execution unit is connected with the third judgment unit and is used for continuing to distribute the flow to the back-end server 3 when the third judgment result is yes.
And a sixth execution unit, connected to the third judgment unit, for stopping the flow distribution to the backend server 3 when the third judgment result is negative.
As shown in fig. 3, the health check process for implementing the load balancing device based on the health check system in the load balancing device includes:
(1) The forwarding module informs the health checking module to perform health checking on the specific back-end server by using N preset health checking methods, and a preset threshold value is set to be M (M is less than or equal to N).
(2) The health check module starts the N health checks on the back-end server one by one, and for any one of the health checks, if a reply message (ICMPREPLY message) of the back-end server can be timely received and the message accords with the expectation, the state of the server under the health check is considered to be normal; otherwise, the state of this server under the health check is considered abnormal.
(3) After collecting R (R is less than or equal to N) health examination score results, further judging as follows:
It is assumed that among the R health check score results, the number indicating that the server is in a normal state is S (the number of corresponding servers in an abnormal state is N-S).
(4) If S is greater than or equal to M, the backend server state is considered normal, otherwise, the remaining health check is continued.
(5) If all of the N health checks end (r=n) (the end time of each health check is different, if one health check does not end, it is not known whether the state of the back-end server of its check is normal or abnormal), then the back-end server state is considered abnormal, otherwise it returns to (3) to wait for the next round of judgment (since the working time of each health check is different, it is necessary to wait for all health checks to be performed to prevent erroneous judgment).
(6) After the judgment is finished, if the total result of the last health examination is changed or the notification interval is reached (the health examination module needs to notify the total result of the health examination to the forwarding module, and notification is frequent, for example, 1 second, which is called notification interval), the total result of the health examination (including two cases that 0 represents that the back-end server is abnormal and 1 represents that the back-end server is normal) is notified to the forwarding module. The forwarding module is responsible for traffic distribution. The back of the load balancing device is connected with a plurality of back-end servers. If the state of a certain back-end server is abnormal, the back-end server does not participate in the flow distribution; only the server with normal state can participate in the flow distribution, otherwise, waiting for the next round of judgment
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the system of the present invention and its core ideas; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (5)

1. A health check system in a load balancing device, the health check system comprising: a health check module and a forwarding module; the forwarding module and the back-end server are both connected with the health check module; the forwarding module is connected with the back-end server;
The health check module comprises:
The checking sub-module is connected with the back-end server and is used for checking the back-end server by using N preset health checking methods to obtain N health checking sub-results of the current times; the health check result is a normal result or an abnormal result; n >1;
the result output sub-module is connected with the checking sub-module and is used for outputting the total health check result of the current times of the back-end server according to the preset threshold value and the health check score results of all the current times;
The forwarding module includes:
The flow distribution sub-module is connected with the result output sub-module and is used for controlling flow distribution to the back-end server according to the total health examination result of the current times;
the result output sub-module includes:
The first judging unit is connected with the checking submodule and is used for judging whether the number of the normal results in the R health checking sub-results is larger than or equal to the preset threshold value or not to obtain a first judging result; r < N;
the first execution unit is connected with the first judgment unit and is used for controlling the inspection sub-module to stop the inspection of the current times when the first judgment result is yes, and determining the total health inspection result of the current times as a normal total result;
the second execution unit is connected with the first judgment unit and is used for controlling the inspection sub-module to continue the current times of inspection when the first judgment result is negative;
The second judging unit is connected with the checking sub-module and is used for judging whether the number of normal results in the N current times of health checking sub-results is larger than or equal to the preset threshold value or not when the checking sub-module finishes executing N preset health checking methods, so as to obtain a second judging result;
the third execution unit is connected with the second judgment unit and is used for determining the total health examination result of the current times as a normal total result when the second judgment result is yes;
The fourth execution unit is connected with the second judgment unit and is used for determining the total health examination result as an abnormal total result when the second judgment result is negative;
And the to-be-forwarded unit is respectively connected with the first execution unit, the third execution unit, the fourth execution unit and the forwarding module and is used for sending the current times of health examination total results to the forwarding module when the current times of health examination total results are different from the last health examination total results or reach an advertising interval.
2. The health check system in a load balancing device of claim 1, further comprising: the checking method stores the sub-module; the inspection method storage submodule is connected with the inspection submodule;
The checking method storage submodule is used for storing the preset health checking method.
3. The health check system in a load balancing device of claim 2, wherein the health check module further comprises: the inspection method obtains a sub-module; the inspection method acquisition sub-module is respectively connected with the inspection method storage sub-module and the inspection sub-module;
the inspection method acquisition sub-module is used for acquiring the preset health inspection method from the inspection method storage sub-module and sending the preset health inspection method to the inspection sub-module.
4. The health check system in a load balancing device of claim 3, wherein the health check module further comprises: a preset threshold value storage sub-module; the preset threshold value storage submodule is connected with the result output submodule;
the preset threshold value storage submodule is used for storing the preset threshold value.
5. The health check system in a load balancing device of claim 1, wherein the traffic distribution sub-module comprises:
The third judging unit is connected with the result output submodule and is used for judging whether the total result of the health examination of the current times is a normal result or not and reaching a third judging result;
the fifth execution unit is connected with the third judgment unit and is used for continuing to distribute the flow to the back-end server when the third judgment result is yes;
And the sixth execution unit is connected with the third judgment unit and is used for stopping flow distribution to the back-end server when the third judgment result is negative.
CN202211633488.2A 2022-12-19 Health check system in load balancing equipment Active CN115914027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211633488.2A CN115914027B (en) 2022-12-19 Health check system in load balancing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211633488.2A CN115914027B (en) 2022-12-19 Health check system in load balancing equipment

Publications (2)

Publication Number Publication Date
CN115914027A CN115914027A (en) 2023-04-04
CN115914027B true CN115914027B (en) 2024-11-15

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311896A (en) * 2020-11-16 2021-02-02 杭州迪普科技股份有限公司 Health examination method, device, equipment and computer readable storage medium
CN113986676A (en) * 2021-11-03 2022-01-28 北京天融信网络安全技术有限公司 Server health check method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311896A (en) * 2020-11-16 2021-02-02 杭州迪普科技股份有限公司 Health examination method, device, equipment and computer readable storage medium
CN113986676A (en) * 2021-11-03 2022-01-28 北京天融信网络安全技术有限公司 Server health check method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101521683B (en) Online game system and accessing method and client communication method thereof
CN110908872B (en) Method and system for detecting server state
CN112422684B (en) Target message processing method and device, storage medium and electronic device
CN107204875B (en) Data reporting link monitoring method and device, electronic equipment and storage medium
CN109769029B (en) Communication connection method based on electricity consumption information acquisition system and terminal equipment
CN113726556B (en) Edge internet of things proxy node operation and maintenance method, system, storage medium and computing equipment
CN110768848B (en) Method and device for switching main server and standby server
CN102290862B (en) Peer to peer communication method and system of power distribution terminals
CN108243222A (en) Server network architecture method and device
CN115914027B (en) Health check system in load balancing equipment
CN111092931B (en) Method and system for rapidly distributing streaming data of online super real-time simulation of power system
CN113783961A (en) Remote terminal management method and device, computer equipment and storage medium
CN106488416B (en) Industry short message sending method and device
CN105490837B (en) A kind of network monitoring processing method and device
CN115396529A (en) Multichannel communication method, device, terminal equipment and storage medium
CN115914027A (en) Health check system in load balancing equipment
CN105471674A (en) Method and system for testing performance of server
CN104378230A (en) System and method for improving stability of Telnet server
CN216387853U (en) Real-time vehicle fault pushing system of electric vehicle remote service and management system
CN101355512B (en) Data transmission system, method and transmission control server
CN114520827A (en) Message receiving method, pushing method, system and medium
CN116546090B (en) Telemetry data pushing method, device, equipment and storage medium
CN113708984B (en) Network quality detection method, device, computing equipment and computer storage medium
CN218867927U (en) 10kV distribution transformer neutral point automatic grounding device
CN114095404B (en) Video equipment state calculation output method, device and equipment based on stream calculation

Legal Events

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