Health monitoring method and device for transparent equipment
By allocating virtual IP addresses and the establishment of static ARP tables for transparent devices, the problems that transparent devices cannot receive and respond to health monitoring messages have been solved, and the health monitoring of transparent devices and improvement of network stability have been realized.
Patent Information
- Application Number
- CN202411497885.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art cannot directly monitor health of transparent devices because transparent devices lack IP addresses and cannot receive and respond to health monitoring messages.
To allocate virtual IP addresses for transparent devices, and set up static ARP tables on the load balancing device, send health detection packets through virtual IP addresses, and construct a reply packet to monitor the health state of transparent devices.
The health monitoring of transparent equipment is realized to ensure that the load balancing equipment can monitor the healthy state of the transparent equipment by detecting the packet, thereby improving the robustness and stability of the network.
Smart Images

Figure CN119383136A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer information processing, and in particular to a health monitoring method and device for a transparent device. Background Art
[0002] In the HTTPS access scenario, the communication between the client and the server is encrypted using SSL / TLS, and transparent devices such as firewalls need to perform security checks on the decrypted messages. However, transparent devices usually do not have the SSL decryption function, so the load device is required to act as an intermediary between the client and the server to perform SSL decryption. The decrypted plaintext message is sent from the load device to the transparent device, which processes it and then returns the message to the load device, which re-encrypts it and sends it back to the server.
[0003] Under normal circumstances, if Figure 1 As shown in the figure, the path of the data flow is: client, load device, transparent device, load device, server. When an abnormality occurs in the transparent device, the link between the load device and the transparent device is interrupted. At this time, the load device needs to detect the abnormality of the transparent device in time through the health monitoring mechanism, and switch the scheduling strategy to bypass the abnormal transparent device and forward the message directly to the server to ensure the stable operation of the system.
[0004] In the prior art, the device performs health monitoring by continuously sending ICMP or TCP probe messages to the specified IP address (server_ip). The interval for sending monitoring messages is usually configurable. If a response message from the target device is received within the predetermined time, the load device considers that the target device is in good health; if no response is received within the predetermined time, the target device is judged to be abnormal and the health check is unreachable. Since transparent devices do not have IP addresses, they cannot be the direct objects of health monitoring, and the IP addresses for monitoring cannot be specified. Therefore, the load device cannot send health monitoring messages directly to the transparent device. In addition, even if the transparent device receives the monitoring message, it will only forward it and does not have the ability to reply to the health monitoring message. This makes the existing technical solutions unable to meet the health monitoring needs of transparent devices.
[0005] Therefore, a new health monitoring method and apparatus for transparent equipment is needed.
[0006] The above information disclosed in the Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention
[0007] In view of this, the present application provides a health monitoring method and device for transparent devices, which can solve the problem that transparent devices cannot process health monitoring messages; enable the load balancing device to monitor the health status of the transparent device through detection messages, thereby performing correct scheduling, thereby improving the robustness and stability of the network.
[0008] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0009] According to one aspect of the present application, a health monitoring method for a transparent device is proposed, the method comprising: allocating a virtual IP address to the transparent device; a load balancing device establishing a static ARP table entry for the transparent device based on the virtual IP address; sending a health detection message to the transparent device according to the virtual IP address; constructing a reply message based on the return message of the transparent device to the health detection message; and performing health monitoring on the transparent device according to the return message of the transparent device to the reply message.
[0010] In an exemplary embodiment of the present application, allocating a virtual IP address to a transparent device includes: setting a virtual IP address for the transparent device that is in the same network segment as a load balancing device.
[0011] In an exemplary embodiment of the present application, the load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address, including: specifying a MAC address for the transparent device; and establishing a static ARP table entry for the transparent device according to the virtual IP address and the MAC address.
[0012] In an exemplary embodiment of the present application, specifying a MAC address for the transparent device includes: using the interface address of the load balancing device that receives the message of the transparent device as the MAC address; and / or using the interface address of the load balancing device that sends the message of the transparent device as the MAC address.
[0013] In an exemplary embodiment of the present application, a health detection message is sent to the transparent device according to the virtual IP address, including: constructing a health detection message based on the virtual IP address, the health detection message is an ICMP detection message or a TCP detection message; the load balancing device sends a health detection message to the transparent device.
[0014] In an exemplary embodiment of the present application, the load balancing device sends a health detection message to the transparent device, including: the first health detection message is forwarded to the transparent device via a layer 2 broadcast; and the remaining health detection messages reach the transparent device by matching a MAC address table entry.
[0015] In an exemplary embodiment of the present application, constructing a reply message based on the return message of the transparent device to the health detection message includes: constructing a reply message when the destination IP address of the reply message is a virtual IP address.
[0016] In an exemplary embodiment of the present application, constructing a reply message includes: swapping the source MAC address and the destination MAC address of the return message; swapping the source IP address and the destination IP address of the return message; and modifying a preset field according to the message type to generate the reply message.
[0017] In an exemplary embodiment of the present application, health monitoring of the transparent device is performed based on a return message from the transparent device to the reply message, including: when a return message from the transparent device to the reply message is obtained, determining that the transparent device is in a healthy state.
[0018] According to one aspect of the present application, a health monitoring device for a transparent device is proposed, and the device includes: an allocation module, which is used to allocate a virtual IP address to the transparent device; a table entry module, which is used for a load balancing device to establish a static ARP table entry for the transparent device based on the virtual IP address; a detection module, which is used to send a health detection message to the transparent device according to the virtual IP address; a construction module, which is used to construct a reply message based on the return message of the transparent device to the health detection message; and a monitoring module, which is used to perform health monitoring on the transparent device according to the return message of the transparent device to the reply message.
[0019] According to one aspect of the present application, an electronic device is proposed, which includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0020] According to one aspect of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.
[0021] According to the transparent device health monitoring method and device of the present application, a virtual IP address is assigned to the transparent device; a load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address; a health detection message is sent to the transparent device according to the virtual IP address; a reply message is constructed based on the return message of the transparent device for the health detection message; the transparent device is subjected to health monitoring according to the return message of the transparent device for the reply message, thereby solving the problem that the transparent device cannot process the health monitoring message; the load balancing device can monitor the health status of the transparent device through the detection message, thereby performing correct scheduling, thereby improving the robustness and stability of the network.
[0022] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other objects, features and advantages of the present application will become more apparent by describing in detail the exemplary embodiments thereof with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application, and it is clear to a person skilled in the art that other accompanying drawings can be obtained from these accompanying drawings without creative effort.
[0024] Figure 1 It is a system flow trend diagram in the prior art.
[0025] Figure 2 The figure is a flow chart of a method for health monitoring of a transparent device according to an exemplary embodiment.
[0026] Figure 3 The present invention is a flowchart of a method for health monitoring of a transparent device according to another exemplary embodiment.
[0027] Figure 4 The present invention is a flowchart of a method for health monitoring of a transparent device according to another exemplary embodiment.
[0028] Figure 5 The invention is a block diagram of a health monitoring apparatus for a transparent device according to an exemplary embodiment.
[0029] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment.
[0030] Figure 7 It is a block diagram of a computer-readable medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0032] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0034] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0035] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.
[0036] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.
[0037] The technical abbreviations involved in this application are explained as follows:
[0038] Transparent device, a device with transparent mode turned on. It is transparent to the user, and the user is unaware of the existence of the transparent device. It works without an IP address, and there is no need to set an IP address for it, and the user does not know the IP address of the transparent device.
[0039] Health monitoring: Send a probe message of a specific protocol to a specified destination IP address and monitor the health of the link based on the response result of the probe message.
[0040] ARP, the Address Resolution Protocol, is a TCP / IP protocol that obtains the physical address based on the IP address. When a host sends information, it broadcasts the ARP request containing the target IP address to all hosts on the local area network, and receives the return message to determine the target's physical address; after receiving the return message, the IP address and physical address are stored in the local ARP cache and retained for a certain period of time. The next request directly queries the ARP cache to save resources.
[0041] A fake IP identifier is used to identify a non-existent, fake IP address of a transparent device.
[0042] Bounce module, a module that processes and replies to detection messages.
[0043] Figure 2 FIG. 2 is a flow chart of a transparent device health monitoring method according to an exemplary embodiment. The transparent device health monitoring method 20 at least includes steps S202 to S208.
[0044] like Figure 2 As shown, in S202, a virtual IP address is allocated to the transparent device. For example, a virtual IP address that is in the same network segment as the load balancing device is set for the transparent device. A virtual IP address is allocated to the transparent device. The virtual IP address is in the same network segment as the load balancing device to ensure that the load balancing device can communicate with the transparent device directly through the Layer 2 network without the need for additional routing configuration. The allocation of the virtual IP address enables the transparent device to participate in health monitoring, thereby solving the technical problem that the transparent device itself does not have an IP address.
[0045] The load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address, including: specifying a MAC address for the transparent device; and establishing a static ARP table entry for the transparent device according to the virtual IP address and the MAC address. The specification can be made by the interface address of the load balancing device. The interface address can be the MAC address of the interface that receives the transparent device message, or the MAC address of the interface that sends the message to the transparent device. This ensures that the load balancing device can correctly identify and communicate with the transparent device. By binding the virtual IP address with the specified MAC address, the load balancing device can correctly send the health monitoring message to the transparent device according to the ARP table entry.
[0046] More specifically, specifying a MAC address for the transparent device includes: using the interface address of the load balancing device that receives the message of the transparent device as the MAC address; and / or using the interface address of the load balancing device that sends the message of the transparent device as the MAC address.
[0047] In S204, the load balancing device creates a static ARP table entry for the transparent device based on the virtual IP address. The creation of the static ARP table entry enables subsequent detection messages to easily reach the transparent device through the network, ensuring the effectiveness of the health monitoring mechanism.
[0048] In S206, a health detection message is sent to the transparent device according to the virtual IP address. For example, a health detection message may be constructed based on the virtual IP address, and the health detection message may be an ICMP detection message or a TCP detection message; the load balancing device sends the health detection message to the transparent device.
[0049] More specifically, the first health detection message is forwarded to the transparent device via Layer 2 broadcast; the remaining health detection messages reach the transparent device by matching the MAC address table entry. The establishment of static ARP table entries allows subsequent detection messages to easily reach the transparent device through the network, ensuring the effectiveness of the health monitoring mechanism.
[0050] In S208, a reply message is constructed based on the return message of the transparent device to the health detection message. For example, the reply message may be constructed when the destination IP address of the reply message is a virtual IP address.
[0051] After receiving the health detection message, the transparent device processes the message and returns it to the load balancing device through the Layer 2 network. During this process, the transparent device does not need to modify the message content and only performs a simple forwarding operation. After the load balancing device receives the message returned by the transparent device, it will process the returned message through the bounce module.
[0052] When the load balancing device receives a message returned by the transparent device, and the destination IP of the message is a virtual IP address, the bounce module will construct a corresponding reply message. For example, when processing an ICMP probe message, the source and destination MAC addresses and IP addresses are swapped, and the ICMP message type is modified to "reply"; for a TCP probe message, it is converted into a syn+ack message, and then the reply message is sent back to the transparent device.
[0053] In S210, health monitoring is performed on the transparent device according to the return message of the transparent device in response to the reply message. For example, when the return message of the transparent device in response to the reply message is obtained, it is determined that the transparent device is in a healthy state.
[0054] If a reply message in the correct format is successfully received, the transparent device is determined to be in a healthy state, and the load balancing device will continue to dispatch traffic to the transparent device; if no reply is received or the message is abnormal, the transparent device is considered abnormal, and the load balancing device will skip the transparent device and adjust the scheduling strategy to send traffic directly to the server.
[0055] This method ensures that transparent devices can effectively participate in the health monitoring process by combining virtual IP with static ARP table, overcoming the limitation that traditional transparent devices cannot be monitored due to lack of IP addresses.
[0056] According to the health monitoring method for transparent devices of the present application, a virtual IP address is assigned to the transparent device; a load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address; a health detection message is sent to the transparent device according to the virtual IP address; a reply message is constructed based on the return message of the transparent device for the health detection message; and the health monitoring of the transparent device is performed according to the return message of the transparent device for the reply message, thereby solving the problem that the transparent device cannot process the health monitoring message; the load balancing device can monitor the health status of the transparent device through the detection message, thereby performing correct scheduling, thereby improving the robustness and stability of the network.
[0057] It should be clearly understood that the present application describes how to form and use specific examples, but the principles of the present application are not limited to any details of these examples. On the contrary, based on the teaching of the content disclosed in the present application, these principles can be applied to many other embodiments.
[0058] Figure 3 The present invention is a flowchart of a method for health monitoring of a transparent device according to another exemplary embodiment. Figure 3 The process 30 shown is for Figure 2 The process shown is a detailed description of S208 "constructing a reply message based on the return message of the transparent device to the health detection message".
[0059] like Figure 3 As shown, in S302, the source MAC address and the destination MAC address of the return message are swapped. After the transparent device processes the health monitoring detection message, when returning the message, the source MAC address is usually the MAC address of the transparent device, and the destination MAC address is the interface MAC address of the load balancing device. In order to ensure that the message can be successfully returned to the load balancing device, the rebound module of the load balancing device needs to swap the two MAC addresses. That is, the source MAC address of the original message will be used as the new destination MAC address, and the destination MAC address will be used as the new source MAC address, thereby constructing the correct link return path.
[0060] In S304, the source IP address and the destination IP address of the return message are swapped. Since the transparent device itself does not have an IP address, the virtual IP address used in the detection message is used for monitoring purposes. When constructing the reply message, the source IP address and the destination IP address also need to be swapped so that the message can flow back to the load balancing device correctly. Specifically, the destination IP (virtual IP address) in the original detection message will be used as the source IP of the reply message, and the source IP (IP of the load balancing device) will be used as the destination IP of the reply message. This ensures that the load balancing device can receive the reply message and continue processing.
[0061] In S306, the preset fields are modified according to the message type to generate the reply message.
[0062] If the probe message is of ICMP type (such as Ping request), when constructing the reply message, the ICMP type field needs to be changed from "request" to "reply" to meet the health monitoring standards. In addition, the checksum of the ICMP message needs to be recalculated and updated to ensure the integrity and validity of the message.
[0063] If the probe message is of TCP type, the Flags field needs to be modified when constructing the reply message. It is usually set to the "syn+ack" flag to indicate the response to the TCP connection request. When the TCP connection is established, the load balancing device only needs to confirm the health status of the transparent device through the syn+ack response without the need for a complete three-way handshake process. In addition, other fields in the TCP message (such as sequence number, checksum, etc.) also need to be recalculated and set according to the protocol to ensure the legitimacy of the return message.
[0064] Through the above steps, the reply message that meets the protocol requirements can be effectively processed and generated, completing the health monitoring process of the transparent device. After the load balancing device receives the reply message, it will determine whether the transparent device is in normal working condition. If the reply message is correct, the transparent device will continue to be used for traffic forwarding; if no reply is received or the message is inconsistent, the transparent device will be skipped and the scheduling strategy will be adjusted to ensure system stability.
[0065] Figure 4 The present invention is a flowchart of a method for health monitoring of a transparent device according to another exemplary embodiment. Figure 4 The process 40 shown is for Figure 2 Detailed description of S102 "" in the process shown.
[0066] like Figure 4 As shown, in S402, a virtual IP address is set for the transparent device. A false IP identifier is set for the transparent device, and this IP will be used as the IP of the transparent device. The load device will specify this IP as the object of health check. It is generally configured as an IP address in the same network segment as the interface connected to the load, so that it does not need to configure additional routes and can use direct routes to send packets.
[0067] In S404, a static ARP entry is generated. A corresponding static ARP entry is generated on the load device, and the corresponding MAC address information is specified for the fake IP. The IP address is the fake IP identifier of the transparent device, the MAC address is the MAC address of the interface on the load device that receives the transparent device message (in order to be able to send packets normally, the MAC addresses of the packet receiving interface and the packet sending interface need to be modified to different MAC addresses), and the outbound interface is the interface on the load device that sends the message to the transparent device.
[0068] In S406, the load balancing device sends a health monitoring message. The load device health monitoring module sends an ICMP or TCP detection message to the fake IP identifier of the transparent device. The destination IP of the message is set to the fake IP identifier of the transparent device. When checking the route, the IP will be queried in the MAC table. After the pre-configured static MAC table entry is queried, the destination MAC is set to the MAC address in the static ARP table entry.
[0069] The first health monitoring message will be sent to the transparent device via Layer 2 broadcast and the MAC table entry will be recorded. Subsequent health monitoring messages will query the MAC table to reach the transparent device.
[0070] In S408, the transparent device receives the message and forwards it from the outbound interface. The transparent device will not modify the message content after processing, and will send the original message from the outbound interface.
[0071] The first packet sent from the outbound interface of the transparent device is sent to the load device through Layer 2 broadcast and the MAC table entry is recorded. Subsequent packets look up the MAC table to reach the load device.
[0072] In S410, the inbound interface of the load balancing device obtains a message. The load balancing device detects that the destination MAC of the packet returned by the transparent device is the MAC of the device, and receives the message to the bounce module for processing.
[0073] In S412, it is determined whether it is a transparent device IP address. The bounce module determines whether the destination IP of the message is a false IP identifier of the transparent device. If so, the bounce module constructs a corresponding reply message and sends it back to the transparent device. Otherwise, the bounce module does not process the message and follows the normal business process.
[0074] In S414, normal processing is performed.
[0075] In S416, a reply message is generated.
[0076] For ICMP detection messages, the rebound module swaps the source and destination MAC and source and destination IP, and changes the ICMP message type field to "reply", recalculates the checksum, and then sends the message back to the transparent device.
[0077] For TCP detection messages, the rebound module swaps the source and destination MAC and source and destination IP, modifies fields such as Flags, and converts it into a syn+ack message before sending it back to the transparent device.
[0078] In S418, a reply message is sent.
[0079] In S420, the transparent device receives the message and forwards it.
[0080] In S422, the load balancing device obtains the message, and the return packet passes through the transparent device and returns to the health monitoring module of the load device along the original path.
[0081] In S424, whether it is a normal response.
[0082] In S426, the transparent device is in normal state. When the health monitoring module receives the corresponding reply packet, it considers that the transparent device is normal, and the load device will continue to dispatch traffic to the transparent device, otherwise it will skip the transparent device and directly send the packet to the next level device.
[0083] In S428, the transparent device state is abnormal.
[0084] A normal TCP link requires three handshakes to establish and four waves to disconnect the link. However, in the scenario solved by this solution, it is only necessary to detect whether the transparent device is normal. It is not necessary to go through all the processes. Receiving the correct reply SYN ACK message can prove that the transparent device is normal.
[0085] This application adds a false IP identifier to the transparent device so that the health monitoring message can reach the transparent device; at the same time, a rebound module is added to offload the processing of the health monitoring message to the load, solving the problem that the transparent device cannot process the health monitoring message; the load can monitor whether the transparent device is abnormal through ICMP or TCP detection messages, allowing the load to be correctly scheduled, thereby improving the robustness and stability of the network.
[0086] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided in the present application are executed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0087] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0088] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0089] Figure 5 FIG. 1 is a block diagram of a health monitoring device for a transparent device according to an exemplary embodiment. Figure 5 As shown, the health monitoring device 50 of the transparent device includes: an allocation module 502 , a table entry module 504 , a detection module 506 , a construction module 508 , and a monitoring module 510 .
[0090] The allocation module 502 is used to allocate a virtual IP address to the transparent device; the allocation module 502 is also used to set a virtual IP address for the transparent device that is in the same network segment as the load balancing device.
[0091] The entry module 504 is used for the load balancing device to establish a static ARP entry for the transparent device based on the virtual IP address;
[0092] The detection module 506 is used to send a health detection message to the transparent device according to the virtual IP address; the detection module 506 is also used to construct a health detection message based on the virtual IP address, and the health detection message is an ICMP detection message or a TCP detection message; the load balancing device sends a health detection message to the transparent device.
[0093] The construction module 508 is used to construct a reply message based on the return message of the transparent device to the health detection message; the construction module 508 is also used to construct a reply message when the destination IP address of the reply message is a virtual IP address.
[0094] The monitoring module 510 is used to perform health monitoring on the transparent device according to the return message of the transparent device to the reply message. The monitoring module 510 is also used to determine that the transparent device is in a healthy state when the return message of the transparent device to the reply message is obtained.
[0095] According to the health monitoring device of the transparent device of the present application, a virtual IP address is assigned to the transparent device; a load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address; a health detection message is sent to the transparent device according to the virtual IP address; a reply message is constructed based on the return message of the transparent device for the health detection message; a health monitoring method of the transparent device is performed according to the return message of the transparent device for the reply message, thereby solving the problem that the transparent device cannot process the health monitoring message; the load balancing device can monitor the health status of the transparent device through the detection message, thereby performing correct scheduling, thereby improving the robustness and stability of the network.
[0096] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment.
[0097] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present application is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0098] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0099] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 610 can perform the following steps: Figure 2 , Figure 3 , Figure 4 Follow the steps shown in .
[0100] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0101] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0102] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0103] The electronic device 600 may also communicate with one or more external devices 600' (e.g., keyboards, pointing devices, Bluetooth devices, etc.) to enable a user to communicate with the electronic device 600, and / or any device (e.g., routers, modems, etc.) that the electronic device 600 can communicate with one or more other computing devices. Such communication may be performed via an input / output (I / O) interface 650. In addition, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0104] Through the above description of the implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by combining software with necessary hardware. Figure 7 As shown, the technical solution according to the implementation mode of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation mode of the present application.
[0105] The software product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.
[0106] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0107] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0108] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the computer-readable medium realizes the following functions: allocating a virtual IP address to the transparent device; the load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address; sending a health detection message to the transparent device according to the virtual IP address; constructing a reply message based on the return message of the transparent device to the health detection message; and performing health monitoring on the transparent device according to the return message of the transparent device to the reply message.
[0109] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0110] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.
[0111] The exemplary embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A health monitoring method for a transparent device, characterized in that: include: Assign virtual IP addresses to transparent devices; The load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address; Sending a health detection message to the transparent device according to the virtual IP address; Constructing a reply message based on the return message of the transparent device to the health detection message; The health of the transparent device is monitored according to the return message of the transparent device in response to the reply message.
2. The method according to claim 1, characterized in that Assign virtual IP addresses to transparent devices, including: A virtual IP address that is in the same network segment as the load balancing device is set for the transparent device.
3. The method according to claim 2, characterized in that The load balancing device establishes a static ARP table entry for the transparent device based on the virtual IP address, including: Assigning a MAC address to the transparent device; A static ARP table entry is established for the transparent device according to the virtual IP address and the MAC address.
4. The method according to claim 3, characterized in that Assigning a MAC address to the transparent device includes: Using the interface address of the load balancing device that receives the message of the transparent device as the MAC address; and / or The interface address of the load balancing device that sends the message of the transparent device is used as the MAC address.
5. The method according to claim 1, characterized in that Sending a health detection message to the transparent device according to the virtual IP address includes: Constructing a health detection message based on the virtual IP address, wherein the health detection message is an ICMP detection message or a TCP detection message; The load balancing device sends a health detection message to the transparent device.
6. The method according to claim 5, characterized in that The load balancing device sends a health detection message to the transparent device, including: The first health detection message is forwarded to the transparent device via layer 2 broadcast; The remaining health detection messages reach the transparent device by matching the MAC address table entries.
7. The method according to claim 1, characterized in that Constructing a reply message based on the return message of the transparent device to the health detection message, including: When the destination IP address of the reply message is a virtual IP address, a reply message is constructed.
8. The method according to claim 7, characterized in that Construct a reply message, including: Swap the source MAC address and destination MAC address of the return message; Swap the source IP address and destination IP address of the return message; The preset fields are modified according to the message type to generate the reply message.
9. The method according to claim 1, characterized in that Performing health monitoring on the transparent device according to a return message of the transparent device in response to the reply message includes: When a return message from the transparent device to the reply message is obtained, it is determined that the transparent device is in a healthy state.
10. A health monitoring device for a transparent device, characterized in that: include: An allocation module, used for allocating virtual IP addresses to transparent devices; An entry module, used for a load balancing device to establish a static ARP entry for the transparent device based on the virtual IP address; A detection module, used for sending a health detection message to the transparent device according to the virtual IP address; A construction module, used to construct a reply message based on the return message of the transparent device to the health detection message; A monitoring module is used to perform health monitoring on the transparent device according to a return message of the transparent device in response to the reply message.