Server health status detection method and device
By dynamically adjusting the detection cycle and unhealthy threshold in real-time statistics on the packet loss rate, the detection inaccuracy and business availability problems in the existing technology are solved, and abnormal servers are quickly removed, business losses are reduced, and system availability is improved.
Patent Information
- Application Number
- CN202211542536.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-12-02
AI Technical Summary
When existing load balancing products detect the health status of the backend server, they need to wait for multiple detection cycles to confirm the abnormality. The user manually enters the detection cycle and unhealthy threshold, which will affect the detection inaccuracy and business availability and cannot meet the strict business requirements. customer needs.
By real-time statistics on the packet loss rate of the target server, dynamically adjust the detection cycle and unhealthy threshold. If the packet loss rate reaches the threshold, the server is marked as unavailable. If it returns to normal, it is marked as available, so as to quickly remove abnormal servers and reduce business losses.
Dynamically monitor the packet loss rate of business traffic, timely reduce health check intervals and unhealthy thresholds, ensure that the back-end server can be removed in time, reduce user-side business losses, and improve system availability and stability.
Smart Images

Figure CN116016276B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a server health status detection method and device. Background Art
[0002] Cloud computing is a computing service. Cloud product load balancing can distribute large concurrent traffic to multiple backend instances, adjust resource utilization, eliminate the impact of single device failure on the system, improve system availability, and expand system service capabilities. Based on this background, customers often choose to deploy load balancing products. Load balancing products are mounted on the backend server cluster and regularly detect the health status of each backend server. If an abnormality is detected in the backend server, business traffic will no longer be distributed to the abnormal backend server, thereby improving system availability and expanding system service capabilities. Generally speaking, the industry's health check of the backend server depends on the number of probes and the probe interval entered by the user side, as well as the settings of the healthy threshold and the unhealthy threshold. After these configurations are issued, the load balancing product will perform health check detection on the backend server according to the user settings, thereby realizing the management of the backend server status.
[0003] Based on the existing product technology, the load balancing products of various manufacturers detect the health status of each mounted backend server by sending detection messages regularly. This method is a fallback health check. The disadvantage of this method is that if the backend server service is abnormal, it is necessary to wait for the detection cycle of the load balancing. In order to ensure the accuracy of the detection and eliminate external factors such as network instability, it is usually necessary to wait for multiple detection cycles (entered by the user) to be abnormal before the backend server is considered abnormal and the backend server is removed. The waiting detection cycle and unhealthy threshold are manually entered by the user and cannot be changed unless the user adjusts it. Whether it is the delayed removal of the backend server from the load balancing after the backend server service is abnormal, or the inaccuracy of the detection, it may directly affect the availability of the customer's business. This situation is unacceptable for customers with strict business requirements. Summary of the invention
[0004] The embodiments of the present disclosure provide a method and device for detecting the health status of a server.
[0005] In a first aspect, an embodiment of the present disclosure provides a server health status detection method, including: obtaining a detection cycle and an unhealthy threshold for detecting the health status of the server; counting the packet loss rate of the target server in real time; dynamically adjusting the detection cycle and the unhealthy threshold of the target server according to the packet loss rate; detecting the health status of the target server according to the adjusted detection cycle; if the number of abnormal health status of the target server reaches the adjusted unhealthy threshold, marking the target server as unavailable in the scheduling table.
[0006] In some embodiments, the method further includes: if it is detected that the health status of the target server returns to normal, marking the target server as available in the scheduling table.
[0007] In some embodiments, dynamically adjusting the detection period and unhealthy threshold of the target server according to the packet loss rate includes: if the packet loss rate exceeds a predetermined packet loss rate threshold, reducing the detection period and unhealthy threshold of the target server.
[0008] In some embodiments, dynamically adjusting the detection period and unhealthy threshold of the target server according to the packet loss rate includes: if the packet loss rate is 0 within a predetermined time, increasing the detection period and unhealthy threshold of the target server.
[0009] In some embodiments, the method further includes: in response to receiving a request to set a silent period, not counting the packet loss rate of the target server during the silent period after adjusting the detection period and unhealthy threshold of the target server.
[0010] In some embodiments, the method further includes: in response to receiving a request to set an upper limit of the detection cycle and / or unhealthy threshold, the detection cycle and / or unhealthy threshold of the target server is no longer increased after being adjusted to the upper limit.
[0011] In some embodiments, the method further includes: in response to receiving a request to set a lower limit of the detection period and / or unhealthy threshold, the detection period and / or unhealthy threshold of the target server is no longer reduced after being adjusted to the lower limit.
[0012] In the second aspect, an embodiment of the present disclosure provides a server health status detection device, including: an acquisition unit, configured to acquire a detection period and an unhealthy threshold for detecting the health status of the server; a statistical unit, configured to count the packet loss rate of the target server in real time; an adjustment unit, configured to dynamically adjust the detection period and the unhealthy threshold of the target server according to the packet loss rate; a detection unit, configured to detect the health status of the target server according to the adjusted detection period; a management unit, configured to mark the target server as unavailable in the scheduling table if the number of times the health status of the target server is abnormal reaches the adjusted unhealthy threshold.
[0013] In some embodiments, the management unit is further configured to: if it is detected that the health status of the target server returns to normal, mark the target server as available in the scheduling table.
[0014] In some embodiments, the adjustment unit is further configured to: if the packet loss rate exceeds a predetermined packet loss rate threshold, reduce a detection period and an unhealthy threshold of the target server.
[0015] In some embodiments, the adjustment unit is further configured to: if the packet loss rate is 0 within a predetermined time, increase the detection period and unhealthy threshold of the target server.
[0016] In some embodiments, the statistics unit is further configured to: in response to receiving a request to set a silent period, not count the packet loss rate of the target server during the silent period after the detection period and the unhealthy threshold of the target server are adjusted.
[0017] In some embodiments, the adjustment unit is further configured to: in response to receiving a request to set an upper limit for the detection period and / or unhealthy threshold, no longer increase the detection period and / or unhealthy threshold of the target server after being adjusted to the upper limit.
[0018] In some embodiments, the adjustment unit is further configured to: in response to receiving a request to set a lower limit of the detection cycle and / or unhealthy threshold, no longer reduce the detection cycle and / or unhealthy threshold of the target server after being adjusted to the lower limit.
[0019] In a third aspect, an embodiment of the present disclosure provides an electronic device for server health status detection, comprising: one or more processors; a storage device on which one or more computer programs are stored, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement a method as described in any one of the first aspects.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of the first aspects.
[0021] The server health status detection method and device provided by the embodiments of the present disclosure dynamically monitor the packet loss rate of user business traffic. When the packet loss rate reaches the packet loss rate threshold, the health check interval and the unhealthy threshold are dynamically reduced to ensure that the backend server can be removed in time, thereby reducing user-side business losses. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0024] Figure 2 is a flow chart of an embodiment of a server health status detection method according to the present disclosure;
[0025] Figure 3 is a schematic diagram of an application scenario of the server health status detection method according to the present disclosure;
[0026] Figure 4 is a flow chart of another embodiment of a server health status detection method according to the present disclosure;
[0027] Figure 5 is a structural schematic diagram of an embodiment of a server health status detection device according to the present disclosure;
[0028] Figure 6 It is a structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of a server health status detection method or a server health status detection apparatus of the present disclosure can be applied.
[0032] like Figure 1 As shown, the system architecture 100 may include a terminal device, a load balancing product and a server. The terminal device and the load balancing product communicate via a wireless network or a wired network, and the load balancing product and the server communicate via a wired network.
[0033] Users can use terminal devices to interact with load balancing products through the network. The business data sent by the terminal devices are distributed to the server through the load balancing product. Load balancing products are used to schedule servers. Various communication client applications can be installed on the terminal devices, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0034] The terminal device can be hardware or software. When the terminal device is hardware, it can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers and desktop computers, etc. When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0035] The server can be a server that provides various services, such as a backend server that provides business services for load balancing. For example, the backend server can feed back the received live data to the terminal device. The server can also be a server of a distributed system, or a server combined with blockchain. The server can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0036] The backend of the load balancing product can be mounted with a backend server cluster. The client business traffic is first sent to the load balancing product, and the load balancing product forwards the business traffic to a backend server based on the scheduling algorithm. The load balancing product regularly checks the survival status of the backend server, uniformly schedules server resources, and improves the availability of the system.
[0037] The load balancing product detects the availability of the mounted backend server cluster through health checks. You can define fields such as health check method, health check cycle, health check port, health check protocol, health check domain name, health check path, and return status code.
[0038] Multiple servers form a distributed server cluster, which is scheduled by a load balancing product. The load balancing product maintains a schedule. Only servers marked as available will be allocated to users, and servers marked as unavailable will not receive business data. The load balancing product can regularly detect the health status of each server. If a server is found to be abnormal, the status of the server in the schedule will be marked as unavailable, and the business data sent by the user will be assigned to other servers for processing. If the server returns to normal later, the status of the server in the schedule can be marked as available. The server can be allocated to users again.
[0039] It should be noted that the server health status detection method provided in the embodiments of the present disclosure is generally executed by a load balancing product, and accordingly, the server health status detection device is generally provided in the load balancing product.
[0040] It should be understood that Figure 1 The number of terminal devices, load balancing products and servers in the embodiment is only illustrative. Any number of terminal devices, load balancing products and servers may be provided according to implementation requirements.
[0041] Continue to refer Figure 2 , shows a process 200 of an embodiment of a server health status detection method according to the present disclosure. The server health status detection method comprises the following steps:
[0042] Step 201: Obtain a detection cycle and an unhealthy threshold for detecting the health status of a server.
[0043] In this embodiment, the execution subject of the server health status detection method (for example Figure 1 The load balancing product shown in the figure can receive a configuration request from a terminal that the user uses for load balancing management through a wired connection or a wireless connection, wherein the configuration request may include a detection period for a healthy state and an unhealthy threshold. For example, the detection period is 10 seconds, and the unhealthy threshold is 5 times. It is used to instruct the load balancing product to perform server detection every 10 seconds, and the number of abnormalities will be accumulated after an abnormality is detected. If a server is detected to be abnormal for 5 consecutive times, the server should be removed from the scheduling table, and the load balancing product will not assign business data to the server for processing. The abnormal statistics of the removed server will be cleared.
[0044] Each time a user sets the detection cycle and unhealthy threshold for detecting the health status of a server, the load balancing product will obtain these values and apply them to all servers mounted under the load balancing product. If the detection cycle and unhealthy threshold of a server change later, the load balancing product will also maintain the detection cycle and unhealthy threshold of the server.
[0045] The fields such as health check method, health check cycle, health check port, health check protocol, health check domain name, health check path, and return status code are predefined. For example, if the ICMP protocol PING packet is checked, if the PING fails, it means that the server is abnormal, and the return status code 200 indicates that it is normal. Health check is a common method in this field, so it will not be repeated here.
[0046] Step 202: Count the packet loss rate of the target server in real time.
[0047] In this embodiment, the load balancing product can be installed with a common packet capture tool to count the packet loss rate of the target server in real time. The target server can be any one of all the servers mounted under the load balancing product.
[0048] If a server abnormality is detected during the packet loss rate statistics, the number of abnormalities is recorded.
[0049] Step 203: dynamically adjust the detection period and unhealthy threshold of the target server according to the packet loss rate.
[0050] In this embodiment, if the packet loss rate is not 0, the detection period and the unhealthy threshold can be reduced. The adjustment can be made in a fixed step size, for example, each adjustment reduces the detection period by 1 second or 5 seconds, and the unhealthy threshold is reduced by 1 time. The step size can also be adjusted dynamically. For example, if the original detection period is relatively long, the step size can be set larger (for example, 5 seconds). After the adjustment, if the detection period is close to 5 seconds, the step size can be set smaller (for example, 1 second).
[0051] In some optional implementations of the present embodiment, the detection period and unhealthy threshold of the target server are dynamically adjusted according to the packet loss rate, including: if the packet loss rate exceeds a predetermined packet loss rate threshold, the detection period and unhealthy threshold of the target server are reduced. A packet loss rate threshold is pre-set, such as 5%. If it is detected that the packet loss rate is higher than the packet loss rate threshold, the detection period and unhealthy threshold of the target server are adjusted. If the packet loss rate threshold is not set, the detection period and unhealthy threshold will be reduced as soon as packet loss occurs, and if the network fluctuates and packet loss stops soon, the detection period and unhealthy threshold will be increased again. Setting a packet loss rate threshold can reduce the frequency of adjustment and avoid the adjustment of the detection period and unhealthy threshold due to an increase in the packet loss rate caused by network fluctuations.
[0052] In some optional implementations of this embodiment, the detection period and the unhealthy threshold are adjusted according to the packet loss rate, including: if the packet loss rate is 0 within a predetermined time, the detection period and the unhealthy threshold are increased. When the packet loss rate is 0 and has been stable for a period of time, the detection period and the unhealthy threshold are increased. This prevents the frequent adjustment of the detection period and the unhealthy threshold caused by the packet loss rate dropping to 0 briefly and then suddenly increasing.
[0053] Step 204: Detect the health status of the target server according to the adjusted detection cycle.
[0054] In this embodiment, after the adjustment, a new detection cycle is used to initiate detection, and the time of the next detection is the new detection cycle after the time of the previous detection. However, the abnormal statistical data before the adjustment is still valid. The abnormal times previously counted are accumulated together and not cleared.
[0055] Load balancing products can provide switches for dynamically adjusting detection cycles and unhealthy thresholds. Users can connect to load balancing products through terminal devices to enable "dynamic adjustment of health check parameters based on service packet loss rate" and input packet loss rate thresholds to dynamically monitor service-side traffic reaching backend services.
[0056] Step 205: If the number of abnormal health statuses of the target server reaches the adjusted unhealthy threshold, the target server is marked as unavailable in the scheduling table.
[0057] In this embodiment, abnormal health status refers to an abnormal returned status code. For example, if a test is performed by sending an http request, if the returned status code is 200, it means that the health status is normal. If the returned status code is 404 or 400 or other non-200, it means that the health status is abnormal. This application uses the protocol, status code and other information of conventional health detection in the prior art. Like conventional health detection, when the number of abnormal health status reaches the adjusted unhealthy threshold, it means that the target server needs to be removed, and the target server is marked as unavailable in the scheduling table. The load balancing product will no longer allocate business data to the target server for processing, but will share the processing with other servers.
[0058] The method provided by the above embodiment of the present disclosure dynamically monitors the packet loss rate of user service traffic by enabling "dynamically adjusting health check parameters by service packet loss rate" and inputting the packet loss rate tolerance. When the packet loss rate reaches the packet loss rate threshold, the health check interval and the unhealthy threshold are dynamically reduced, thereby speeding up the removal of abnormal servers. It is ensured that the backend service can be removed in time, thereby reducing the service loss on the user side.
[0059] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to set a silent period, the packet loss rate of the target server is not counted during the silent period after the detection period and unhealthy threshold of the target server are adjusted. Since the packet loss rate is calculated based on the number of packet losses over a period of time, the packet loss rate is greatly affected by network fluctuations during the silent period, and the packet loss rate cannot truly reflect the current state of the server at this time. Therefore, by setting the silent period not to count the packet loss rate, frequent adjustments to the detection period and unhealthy threshold caused by false detection can be avoided, thereby ensuring the stability of load balancing scheduling. Prevent frequent switching of servers from causing unsmooth business data.
[0060] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to set an upper limit of the detection period and / or unhealthy threshold, the detection period and / or unhealthy threshold of the target server are no longer increased after being adjusted to the upper limit. The upper limit of the detection period or the unhealthy threshold can be set separately, or the upper limit of the detection period and the unhealthy threshold can be set at the same time. In this way, the parameter with the upper limit set can no longer increase, preventing the parameter from increasing too much and being difficult to call back.
[0061] Optionally, the user can manually restore the detection period and unhealthy threshold to their initial values before dynamic adjustment.
[0062] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to set a lower limit of the detection period and / or unhealthy threshold, the detection period and / or unhealthy threshold of the target server no longer decreases after being adjusted to the lower limit. The lower limit of the detection period or the unhealthy threshold may be set separately, or the lower limit of the detection period and the unhealthy threshold may be set at the same time. In this way, the parameter with a lower limit set may no longer decrease, preventing the parameter from decreasing to 0 and not performing a health check.
[0063] Optionally, the detection cycle and the unhealthy threshold can be set to increase or decrease the step size, and the increase step size can be different from the decrease step size. The packet loss rate change pattern of the target server can be counted to predict the packet loss rate, and the increase step size or decrease step size can be dynamically adjusted according to the predicted packet loss rate. For example, according to the historical packet loss rate data statistics, if the packet loss rate of the target server drops, it will last for a long time once it drops, then the decrease step size can be set to a larger value so that the target server can be removed as soon as possible.
[0064] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the server health status detection method according to this embodiment. Figure 3In the application scenario, the user pre-sets the health status detection cycle of 10s and the unhealthy threshold of 5 times through the terminal device. Then enable 'Dynamically adjust health check parameters by service packet loss rate' and enter the packet loss rate threshold of 5% to dynamically monitor the service side traffic reaching the server. The terminal device continuously sends service data to the load balancing product. The load balancing product distributes the service data to at least one server for processing. For each server, a packet capture tool is used to count the packet loss rate in real time, and each server is tested as a target server in turn. For each server, once the service side packet loss rate of the server reaches the packet loss rate threshold, the health check cycle and unhealthy threshold of the server are dynamically reduced. So that the problematic server can be removed as soon as possible. When the server is in a state of no packet loss, the health check interval and unhealthy threshold can be dynamically increased to enhance the robustness of the product to network fluctuations. For example, if the user enables "Dynamically adjust health check parameters by service packet loss rate" and inputs a packet loss rate tolerance of 5%, a health check interval of 10s, and an unhealthy threshold of 5 times, this solution will dynamically monitor the packet loss rate of the server. Once the packet loss rate reaches 5%, the healthy interval is reduced to 9s (10-1), and the unhealthy threshold is reduced to 4 (5-1) times. The silent period defaults to 2s. After the silent period, the packet loss rate continues to be calculated until the unhealthy check interval is reduced to the limit value of 1s, and the unhealthy threshold is 1 time. After the server is removed, the health check interval is restored to 10s, and the unhealthy threshold is restored to 5 times. When the packet loss rate remains at 0%, the health check interval and unhealthy threshold are dynamically increased. The silent period defaults to 2s, and the limit values are 30s and 10 times respectively. When the number of unhealthy times of the server reaches the unhealthy threshold, if the server was originally enabled, it will be modified to unavailable in the scheduling table, that is, the server will be removed. If it is detected that the server meets the health check, if it is unavailable in the schedule, it can be enabled and modified to available in the schedule, that is, the server can be restored to use.
[0065] Further references Figure 4 , which shows a process 400 of another embodiment of a server health status detection method. The process 400 of the server health status detection method includes the following steps:
[0066] Step 401: Obtain a detection cycle and an unhealthy threshold for detecting the health status of a server.
[0067] Step 402: Count the packet loss rate of the target server in real time.
[0068] Step 403: dynamically adjust the detection period and unhealthy threshold of the target server according to the packet loss rate.
[0069] Step 404: Detect the health status of the target server according to the adjusted detection cycle.
[0070] Step 405: If the number of abnormal health statuses of the target server reaches the adjusted unhealthy threshold, the target server is marked as unavailable in the scheduling table.
[0071] Steps 401-405 are substantially the same as steps 201-205, and thus are not described in detail herein.
[0072] Step 406: If it is detected that the health status of the target server has returned to normal, the target server is marked as available in the scheduling table.
[0073] In this embodiment, when the health status of the target server changes from abnormal to normal, the target server can continue to provide services and is added to the scheduling table again for scheduling.
[0074] from Figure 4 It can be seen that Figure 2 Compared with the corresponding embodiment, the process 400 of the server health status detection method in this embodiment embodies the step of enabling the server to recover to normal. Therefore, the solution described in this embodiment can flexibly load the server and improve the stability of the server cluster.
[0075] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a server health status detection device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0076] like Figure 5 As shown, the server health status detection device 500 of this embodiment includes: an acquisition unit 501, a statistics unit 502, an adjustment unit 503, a detection unit 504 and a management unit 505. Among them, the acquisition unit 501 is configured to acquire a detection cycle and an unhealthy threshold for detecting the health status of the server; the statistics unit 502 is configured to count the packet loss rate of the target server in real time; the adjustment unit 503 is configured to dynamically adjust the detection cycle and the unhealthy threshold of the target server according to the packet loss rate; the detection unit 504 is configured to detect the health status of the target server according to the adjusted detection cycle; the management unit 505 is configured to mark the target server as unavailable in the scheduling table if the number of abnormal health status of the target server reaches the adjusted unhealthy threshold.
[0077] In this embodiment, the specific processing of the acquisition unit 501, the statistical unit 502, the adjustment unit 503, the detection unit 504 and the management unit 505 of the server health status detection device 500 can be referred to. Figure 2 Corresponding to step 201, step 202, step 203, step 204 and step 205 in the embodiment.
[0078] In some optional implementations of this embodiment, the management unit 505 is further configured to: if it is detected that the health status of the target server has returned to normal, mark the target server as available in the scheduling table.
[0079] In some optional implementations of this embodiment, the adjustment unit 503 is further configured to: if the packet loss rate exceeds a predetermined packet loss rate threshold, reduce the detection period and unhealthy threshold of the target server.
[0080] In some optional implementations of this embodiment, the adjustment unit 503 is further configured to: if the packet loss rate is 0 within a predetermined time, increase the detection period and unhealthy threshold of the target server.
[0081] In some optional implementations of this embodiment, the statistical unit 502 is further configured to: in response to receiving a request to set a silent period, not count the packet loss rate of the target server during the silent period after adjusting the detection period and unhealthy threshold of the target server.
[0082] In some optional implementations of this embodiment, the adjustment unit 503 is further configured to: in response to receiving a request to set an upper limit for the detection period and / or unhealthy threshold, no longer increase the detection period and / or unhealthy threshold of the target server after being adjusted to the upper limit.
[0083] In some optional implementations of this embodiment, the adjustment unit 503 is further configured to: in response to receiving a request to set a lower limit of the detection period and / or unhealthy threshold, the detection period and / or unhealthy threshold of the target server will no longer be reduced after being adjusted to the lower limit.
[0084] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0085] An electronic device for detecting the health status of a server includes: one or more processors; a storage device on which one or more computer programs are stored, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method described in process 200 or 400.
[0086] A computer-readable medium stores a computer program, wherein the computer program implements the method described in process 200 or 400 when executed by a processor.
[0087] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0088] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0089] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0090] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the server health status detection method. For example, in some embodiments, the server health status detection method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the server health status detection method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the server health status detection method in any other appropriate manner (e.g., by means of firmware).
[0091] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0092] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0093] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0095] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0096] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0097] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0098] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A server health status detection method, comprising: Get the detection cycle and unhealthy threshold used to detect the health status of the server; Real-time statistics of the packet loss rate of the target server; According to the statistical packet loss rate change law, the packet loss rate is predicted, and the detection cycle and the unhealthy threshold are dynamically adjusted according to the predicted packet loss rate. The detection cycle and the unhealthy threshold of the target server are adjusted; Detect the health status of the target server according to the adjusted detection cycle; If the number of abnormal health statuses of the target server reaches the adjusted unhealthy threshold, the target server is marked as unavailable in the scheduling table.
2. The method according to claim 1, wherein: The method further comprises: If it is detected that the health status of the target server has returned to normal, the target server is marked as available in the scheduling table.
3. The method according to claim 1, wherein: Adjust the detection period and unhealthy threshold of the target server, including: If the counted packet loss rate exceeds a predetermined packet loss rate threshold, the detection period and unhealthy threshold of the target server are reduced.
4. The method according to claim 1, wherein: Adjust the detection period and unhealthy threshold of the target server, including: If the counted packet loss rate is 0 within a predetermined time, the detection period and unhealthy threshold of the target server are increased.
5. The method according to claim 1, wherein: The method further comprises: In response to receiving a request to set a silent period, the packet loss rate of the target server is not counted during the silent period after the detection period and the unhealthy threshold of the target server are adjusted.
6. The method according to claim 1, wherein: The method further comprises: In response to receiving a request to set an upper limit of a detection period and / or an unhealthy threshold, the detection period and / or the unhealthy threshold of the target server are no longer increased after being adjusted to the upper limit.
7. The method according to claim 1, wherein: The method further comprises: In response to receiving a request to set a lower limit of a detection period and / or an unhealthy threshold, the detection period and / or the unhealthy threshold of the target server are no longer reduced after being adjusted to the lower limit.
8. A server health status detection device, comprising: An acquisition unit configured to acquire a detection cycle and an unhealthy threshold for detecting a health status of a server; A statistics unit is configured to count the packet loss rate of the target server in real time; an adjusting unit configured to predict the packet loss rate according to the statistical packet loss rate variation rule, dynamically adjust the detection cycle and the unhealthy threshold value increase step or decrease step according to the predicted packet loss rate, and adjust the detection cycle and the unhealthy threshold value of the target server; A detection unit, configured to detect the health status of the target server according to the adjusted detection cycle; The management unit is configured to mark the target server as unavailable in the scheduling table if the number of abnormal health status of the target server reaches the adjusted unhealthy threshold.
9. An electronic device for detecting the health status of a server, comprising: one or more processors; a storage device having one or more computer programs stored thereon, When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method, device and system used for maintaining connected heartbeat
CN103139303A
Comprehensive detection method based on dynamic time interval
CN106059813A
A method and apparatus for processing a state of a node of a block chain
CN109167699A
Elephant flow path monitoring and scheduling method based on SDN data center network
CN110932989A
Service dial testing method, device and system and storage medium
CN111221714A
