An optimization method and terminal for health detection
A health detection and optimization method technology, applied in the field of distributed systems, can solve problems such as resource occupation, application rigidity, slow response, etc., and achieve the effect of increasing load capacity, avoiding request congestion, and high pertinence
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0076] Please refer to figure 1 , the first embodiment of the present invention is:
[0077] An optimization method for health detection, including steps:
[0078] S1. Set up a health detection cluster, where the health detection cluster includes more than one health detection node;
[0079] In S1, each of the health detection nodes corresponds to more than one application node;
[0080] Each of the health detection nodes includes a master node and a backup node;
[0081] In an optional implementation manner, the application nodes all access the reverse proxy server;
[0082] S2. Receive a health degree rule, where the health degree rule includes a health degree detection attribute and a health degree threshold corresponding to each application node;
[0083] The health detection node saves the health degree rules in memory;
[0084] In an optional embodiment, the health detection node may store the health degree rules of its corresponding application nodes in the memory,...
Embodiment 2
[0090] An optimization method for health detection, which is different from Embodiment 1 in that:
[0091] In S2, the health degree detection attribute includes the interface address corresponding to the application node, the request parameter, the upper limit of the interface response time and the list of key interfaces, and the list of key interfaces includes the address of the key interface, the request parameter of the key interface and the upper limit of the response time of the key interface;
[0092] S3 is specifically:
[0093] Send a heartbeat detection packet to the application node through the health detection node every preset period, if no response message from the application node is received for three consecutive periods, output the abnormality message of the application node availability, otherwise, execute S31;
[0094] S31. Perform health degree detection on the application node to be detected according to the interface address and the request parameter, and ...
Embodiment 3
[0107] Apply the above-mentioned optimization method of health detection to the actual scene:
[0108] Suppose there is an Nginx cluster, a Redis cluster, and a health detection cluster (there are 4 instances in this cluster, that is, 4 health detection nodes check1 to check4), and 10 business instances corresponding to 10 application nodes (busi1 to busi10) ); the application node includes a login interface (A interface), an interface for obtaining user information (B interface) and a token verification interface (C interface), and they are all key interfaces. Under normal circumstances, the response time of the A interface is 1 seconds, the response time of interface B is 0.5 seconds, and the response time of interface C is 0.1 seconds;
[0109] A1. Set the corresponding relationship between the health detection node and the application node: check1 corresponds to busi1 to busi5, check3 corresponds to busi6 to busi10; and configure check1 as the master node, check2 as the st...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

