CN111835858A - Equipment access method, equipment and system - Google Patents
Equipment access method, equipment and system Download PDFInfo
- Publication number
- CN111835858A CN111835858A CN202010694776.3A CN202010694776A CN111835858A CN 111835858 A CN111835858 A CN 111835858A CN 202010694776 A CN202010694776 A CN 202010694776A CN 111835858 A CN111835858 A CN 111835858A
- Authority
- CN
- China
- Prior art keywords
- target
- access gateway
- node
- load balancing
- active device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The application provides a device access method, a device and a system, wherein the method comprises the following steps: the method comprises the steps that load balancing equipment receives a registration request sent by target active equipment, and the registration request is sent to a first target node based on a first load balancing strategy; and the network agent on the first target node determines a target access gateway corresponding to the target active device based on a second load balancing strategy, and sends the registration request to the target access gateway. The method can realize the uniform access of the active device under the condition of ensuring the load balance of the access gateway.
Description
Technical Field
The application relates to the technical field of security monitoring, in particular to a device access method, device and system.
Background
The active device refers to a network device which can actively initiate registration to the application platform so as to access the application platform.
Currently, an active device accesses an application platform, generally by configuring a registration address in advance, that is, by specifying an access service, so that the active device initiates registration based on the registration address configured in advance, and the access is realized by the specified access service.
Due to the access performance constraint of the server, when a large number of devices need to access, multiple registration addresses are often configured to implement load sharing of device access.
Disclosure of Invention
In view of this, the present application provides a device access method, device and system.
According to a first aspect of the present application, there is provided a device access method, including:
the method comprises the steps that load balancing equipment receives a registration request sent by target active equipment, and the registration request is sent to a first target node based on a first load balancing strategy;
and the first target node determines a target access gateway corresponding to the target active device through a network agent based on a second load balancing strategy, and sends the registration request to the target access gateway.
According to a second aspect of the present application, there is provided a device access system comprising: the system comprises an active device, a load balancing device, a node and an access gateway; wherein:
the load balancing device is used for receiving a registration request sent by a target active device in the active devices and sending the registration request to a first target node based on a first load balancing strategy;
and the node is used for determining a target access gateway corresponding to the target active device from the access gateways through a network agent based on a second load balancing strategy when the node is used as a first target node, and sending the registration request to the target access gateway.
According to a third aspect of the present application, there is provided a node comprising:
the receiving unit is used for receiving a registration request of the target active device sent by the load balancing device; the registration request is sent based on a first load balancing strategy when the load balancing equipment receives the registration request sent by the target active equipment;
a determining unit, configured to determine, by a network proxy, a target access gateway corresponding to the target active device based on a second load balancing policy;
and the sending unit is used for sending the registration request to the target access gateway through the network proxy.
According to a fourth aspect of the present application, there is provided a management node comprising:
the receiving unit is used for receiving the corresponding relation between the target active equipment and the target access gateway reported by the target access gateway; the corresponding relation between the target active device and the target access gateway is sent when the target access gateway receives a registration request sent by a first target node; the registration request received by the first target node is sent based on a first load balancing strategy when the load balancing equipment receives the registration request sent by the target active equipment;
and the sending unit is used for sending the service request to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway when receiving the service request aiming at the target active device initiated by the application platform, so that the target access gateway sends the service request to the load balancing device through a network agent on a node where the target access gateway is located, and the load balancing device sends the service request to the target active device.
According to the device access method, the load balancing device receives the registration request sent by the target active device, and the registration request is sent to the first target node based on the first load balancing strategy; and the network agent on the first target node determines a target access gateway corresponding to the target active device based on the second load balancing strategy, and sends the registration request to the target access gateway, so that the unified access of the active device is realized under the condition of ensuring the load balancing of the access gateway.
Drawings
Fig. 1 is a flowchart illustrating a device access method according to an exemplary embodiment of the present application;
fig. 2 is a schematic flow chart illustrating another device access method according to another exemplary embodiment of the present application;
FIG. 3 is an architectural diagram illustrating a specific application scenario according to an exemplary embodiment of the present application;
fig. 4A is a schematic diagram illustrating an active device registration process according to an exemplary embodiment of the present application;
FIG. 4B is a schematic diagram illustrating a business process flow according to an exemplary embodiment of the present application;
FIG. 4C is a schematic diagram illustrating a heartbeat keep alive procedure in accordance with an illustrative embodiment of the present application;
fig. 5 is a schematic structural diagram of a device access system according to an exemplary embodiment of the present application;
fig. 6 is a schematic structural diagram of another device access system according to another exemplary embodiment of the present application;
FIG. 7 is a block diagram of a node according to an exemplary embodiment of the present application;
fig. 8 is a schematic structural diagram of a management node according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In order to make the technical solutions provided in the embodiments of the present application better understood and make the above objects, features and advantages of the embodiments of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic flow chart of a device access method provided in an embodiment of the present application is shown, as shown in fig. 1, the device access method may include the following steps:
step S100, the load balancing device receives a registration request sent by the target active device, and sends the registration request to the first target node based on the first load balancing policy.
In the embodiment of the present application, the target active device does not refer to a fixed active device, but may refer to any active device, and the following description of the embodiment of the present application is not repeated.
In the embodiment of the present application, in order to implement uniform access of the active device, a load balancing device may be used to implement a uniform registration entry of the active device, and the active device may initiate a registration request to the load balancing device based on address information of the load balancing device.
When receiving a registration request sent by a target active device, a load balancing device may select a node (referred to as a first target node herein) from a node cluster based on a preset load balancing policy (referred to as a first load balancing policy herein), and send the registration request to the first target node.
In one example, the first load balancing policy may be a polling policy, that is, a node is selected by polling and the received registration request is sent to the selected node, so as to achieve load balancing of the node.
In one example, multiple access gateways may be deployed on a node, which may provide services through the same port of the node.
Step S110, the network agent on the first target node determines a target access gateway corresponding to the target active device based on the second load balancing policy, and sends the registration request to the target access gateway.
In this embodiment of the application, when the first target node receives the registration request, the network agent may determine, based on a preset load balancing policy (referred to as a second load balancing policy herein), an access gateway (referred to as a target access gateway herein) for accessing the target active device, so as to implement load balancing of the access gateway.
When the network agent determines the target access gateway, the network agent may send a registration request of the target active device to the target access gateway, so that the target active device accesses the application platform through the target access gateway.
It should be noted that the target access gateway is not necessarily an access gateway deployed on the first target node, that is, the target access gateway determined by the network proxy on the first target node based on the second load balancing policy may also be an access gateway deployed on another node.
In addition, in the embodiment of the present application, the interactive signaling among the management node, the access gateway, and the network proxy is sent through the container network.
As can be seen, in the method flow shown in fig. 1, a plurality of access gateways expose services to the outside in a node form, and use the load balancing device to implement a unified registration entry of the active device, so that the unified access of the active device is implemented under the condition of ensuring the load balancing of the access gateways.
For example, the device access system provided in the embodiment of the present application may include one or more nodes, where one node may be installed with one or more access gateway components, and a network proxy is deployed on the node, and exposes a service to the outside through a node port (node).
Wherein, the management node exposes IP to the upper layer (such as application platform), and the load balancing device exposes IP to the lower layer (such as active device).
The access gateway components installed on each node form an access gateway cluster, and the respective networks in the container network formed by each access gateway and the network agent are communicated with each other.
In some embodiments, as shown in fig. 2, the device access method provided in the embodiment of the present application may further include the following steps:
and step S120, the target access gateway reports the corresponding relation between the target active equipment and the target access gateway to the management node.
Illustratively, the management node may be a separate physical entity device, or may be a component installed on a certain node.
Step S130, when the management node receives a service request aiming at the target active device initiated by the application platform, the service request is sent to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway.
Step S140, the target access gateway sends the service request to the load balancing device through the network agent on the node where the target access gateway is located.
And step S150, the load balancing equipment sends the service request to the target active equipment.
Illustratively, the application platform initiates a service request to the target active device through the management node based on the correspondence between the target active device and the target access gateway recorded in the management service.
For example, when the target access gateway receives a registration request of the target active device, the corresponding relationship between the target active device and the target access gateway may be reported to the management node, so that the management node records the corresponding relationship between the target active device and the target access gateway.
When the application platform receives a service request for the target active device, the application platform may initiate the service request for the target active device to the management node, and the management node may determine a target access gateway to which the target active device is accessed based on the recorded correspondence between the active device and the access gateway, and initiate the service request to the target active device through the target access gateway.
When the target access gateway receives the service request, the service request can be sent to the load balancing device through the network proxy on the node where the target access gateway is located, and the load balancing device sends the service request to the target active device.
It should be noted that, in order to ensure the consistency of the packet forwarding path, when the target access gateway receives the service request, the target access gateway may also send the service request to the load balancing device through the network proxy on the first target node, that is, when the node where the target access gateway is located is not the first target node, the target access gateway may forward the service request to the first target node, and the network proxy on the first target node forwards the service request to the load balancing device, so as to ensure the consistency of the registration request and the forwarding of the service request packet (registration request: load balancing device-first target node-target access gateway, service request: target access gateway-first target node-load balancing device).
It can be seen that in the flow of the method shown in fig. 2, the load balancing policy adopts a reverse device registration direction to ensure that the service processing uses the access gateway accessed when the active device is registered, and an access gateway service mechanism is adopted to reversely implement load balancing of the access gateway.
In some embodiments, after the network proxy on the first target node determines the target access gateway corresponding to the target active device, the network proxy may update the forwarding mapping rule based on the correspondence between the target active device and the access gateway, and add the forwarding mapping rule (referred to herein as the target forwarding mapping rule) associated with the correspondence between the target active device and the access gateway.
The device access method provided by the embodiment of the application may further include:
the load balancing equipment receives a heartbeat request message of the target active equipment and sends the heartbeat request message to a second target node based on a first load balancing strategy;
the network agent on the second target node forwards the heartbeat request message to a target access gateway based on a target forwarding mapping rule in the forwarding mapping rules;
the target access gateway sends the heartbeat response message sent by the target access gateway to the load balancing equipment through the network agent on the node where the target access gateway is located;
and the load balancing equipment sends the heartbeat response message to the target active equipment.
In this embodiment of the application, when the load balancing device receives a heartbeat request sent by a target active device, a node (referred to as a second target node herein) may be selected from a node cluster based on a first balancing policy, and the heartbeat request is sent to the second target node. Wherein the second target node is not necessarily the same node as the first target node. The load balancing equipment does not need to distinguish request types, and selects nodes based on the first balancing strategy for any received request, so that the processing process is simplified, and the processing efficiency is improved.
For example, a network proxy on a node may maintain a forwarding mapping rule that identifies a packet forwarding path between an active device and an access gateway, i.e., which active device's packet is forwarded through which access gateway.
In one example, when there are multiple nodes, the network agents on each node collectively maintain the forwarding mapping rules.
For example, when the network agent on the first target node receives the registration request of the target active device and determines the target access gateway corresponding to the target active device, the network agent may update the forwarding mapping rule and add the target forwarding mapping rule based on the corresponding relationship between the target active device and the target access gateway.
The target active device can keep alive the target forwarding mapping rule by sending a heartbeat request.
When the second target node receives the heartbeat request message, the heartbeat request message can be forwarded to the target access gateway through the network proxy based on the target forwarding mapping rule.
When receiving the heartbeat request message, the target access gateway can return a heartbeat response message to the target active device.
When the node where the target access gateway is located receives the heartbeat response message, the heartbeat response message can be sent to the load balancing equipment through the network agent, and the heartbeat response message is sent to the target active equipment by the load balancing equipment.
In some embodiments, in the active device registration process, when the load balancing device determines a corresponding node based on the first load balancing policy, the corresponding relationship between the active device and the determined node may also be recorded, for example, the corresponding relationship between the source IP address and the node identifier is recorded.
Correspondingly, when the load balancing device receives the heartbeat request of the target active device, the heartbeat request can be sent to the first target node based on the recorded corresponding relationship between the target active device and the first target node, so as to ensure the consistency of the message forwarding path.
In an example, the forwarding mapping rule may be refreshed or aged based on a session maintenance policy, that is, for any forwarding mapping rule, when there is a matching message (including a service request or a heartbeat request) interaction within a preset effective time, the effective time of the forwarding mapping rule is refreshed; and when the matched message interaction does not exist in the preset effective time, aging the forwarding mapping rule.
For example, for any forwarding mapping rule, the forwarding mapping rule may correspond to an entry (routing rule entry) in iptables, and session maintenance of the routing rule entry may be implemented by the receiver module.
For any routing rule table entry, when a matched service request or heartbeat request exists, the receiver module can refresh the effective time of the corresponding routing rule table entry, and correspondingly, the effective time of the forwarding mapping rule corresponding to the routing rule table entry is refreshed; when no matched service request or heartbeat request exists in the valid time, the receiver module deletes the corresponding routing rule table entry, and correspondingly, the forwarding mapping rule corresponding to the routing rule table entry is also aged.
In an example, after the target active device sends the heartbeat request message, the method may further include:
and if the heartbeat response message is not received, the registration request is sent to the load balancing equipment again.
For example, in order to avoid a single point failure of the access gateway, such as a failure of a node where the access gateway is located, after the target active device sends the heartbeat request message, if the heartbeat response message is not received, the target active device may determine that the target access gateway is failed, and at this time, the target active device may send a registration request to the load balancing device again and perform registration again.
When the load balancing device receives the registration request of the target active device, the subsequent processing flow may refer to the related description in the method flow shown in fig. 1, and the embodiment of the present application is not described herein again.
It should be noted that after the network agent on the second target node sends the heartbeat request packet of the target active device to the target access gateway, if the heartbeat response packet returned by the target access gateway is not received, it is determined that the access gateway is abnormal.
In addition, after the target active node initiates registration again, the node (which may be referred to as a third target node) receiving the registration request receives the registration request of the target active device again, the network proxy may reallocate an access gateway to the target active device, and report the correspondence between the target active device and the newly allocated access gateway to the management node, the management node determines that the correspondence between the target active device and the access gateway is transformed, deletes the recorded correspondence between the target active device and the target access gateway, and stores the correspondence between the target active device and the newly allocated access gateway.
In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the following describes the technical solutions provided in the embodiments of the present application with reference to specific application scenarios.
In this embodiment, an active device is taken as an example of an active device in a security system.
Referring to fig. 3, which is a schematic diagram of an architecture of a specific application scenario provided in the embodiment of the present application, as shown in fig. 3, a plurality of VAGs (Video Access gateways) provide services to the outside by one VAG-Service (also may be referred to as K8 Service, which is simply referred to as Service), and then expose the services to the outside by using a node port (node port) manner, and use Load-balance device (Load balancing device) to implement a unified registration entry of an active device.
It should be noted that, in the embodiment of the present application, the VAG employs a K8S Service container network, so that multiple VAGs (i.e., multiple VAG components are installed) may be deployed on one Node (e.g., a physical server), and a network agent (which may be referred to as a kube-proxy) is deployed on the Node, and services are provided outside through the same port (i.e., a Node port) of the Node.
The VAM exposes the IP to the upper layers and the load balancer exposes the IP to the lower layers.
VAGs installed on each Node are combined into a VAG cluster, and the VAGs and the container network formed by the network agents are communicated with each other through networks.
The VAM (i.e., the management Node) may be a separate physical entity device, or may be a component installed on a certain Node.
In addition, the VAG-Service is virtual, corresponding to the forwarding mapping rule, and the actual routing forwarding is realized by the network agents on each Node in the K8S cluster, and the network agents on each Node maintain the forwarding mapping rule together.
Therefore, the VAG-Service must be used in conjunction with a network agent on each Node, which is deployed on each Node in the K8S cluster, where this routing rule is set.
The following describes the registration process, the service process, and the heartbeat process, respectively.
First, registration process
Based on the scenario shown in fig. 3, the registration process may include the following steps:
1. the target active device initiates registration to the unique IP address;
illustratively, the unique IP address is an IP address of the load balancing device.
It should be noted that, when a new active device is added to the system, the application platform (for example, a CMS platform (security system platform)) may pre-add information of the active device, such as an IP address, to the VAM (Video Access Manager).
2. Load balancing equipment receives a registration request, performs first load balancing, and sends the registration request to a Node port of a target Node (i.e. the first target Node);
for example, the load balancing device may implement load balancing by using a Round Robin policy, that is, when receiving a registration request, selecting a Node in a Round Robin manner, and sending the registration request to the selected Node.
For example, assuming that the system includes 3 nodes (Node 1-Node 3), the first registration request received by the load balancing apparatus may be forwarded to Node1, the second registration request may be forwarded to Node2, the third registration request may be forwarded to Node3, the fourth registration request may be forwarded to Node1, and so on.
3. The target Node performs a second load balancing by using a session maintenance policy through a network agent (such as Kube-Proxy), and forwards the registration request to the target VAG.
Illustratively, the target Node receives the registration request, determines the allocated VAG based on the second load balancing policy through the network agent, updates the forwarding mapping rule based on the correspondence between the active device requesting registration and the allocated VAG (e.g., the correspondence between the IP address of the active device and the IP address of the VAG), and opens session maintenance.
For example, assume that the session is maintained for 24 hours. When the session maintenance is set, and the network agent receives the message of the active device within the session maintenance time, the message can be forwarded to the corresponding VAG according to the forwarding mapping rule, and the session maintenance time is refreshed, so that the message of the same active device is ensured to be sent to the same VAG all the time, and the binding of the active device and the VAG is realized.
It should be noted that, in the embodiment of the present application, the device access Service is stateful, and the Service processing needs to use the VAG bound by the active device, and reversely implement load balancing of the VAG through Service.
In addition, considering that when the active device bound to the VAG is offline, the offline active device does not occupy the resource on the previously bound VAG, and when the offline active device is used again, the resource of the newly bound VAG is occupied, and therefore, the load balancing policy of the network agent may be: and while maintaining the session, selecting the optimal VAG for loading according to the number of the active devices accessed by the VAG under the condition that the corresponding relation between the active devices and the VAG which are not matched is not inquired, namely selecting the VAG with the minimum number of the accessed active devices.
5. The target VAG reports the corresponding relationship between the target active device and the target VAG to the VAM, and a processing flow chart thereof may be as shown in fig. 4A (the forwarding process of the load balancing device and the Node to the packet is not shown in the figure).
Second, business operation process
0. The CMS platform obtains the online status of the active device from the VAM, and may initiate a business operation for the online active device.
Take a service request for a target active device as an example.
1. The VAM management node receives business operation aiming at target active equipment initiated by a CMS platform;
illustratively, the control signaling of the application platform (i.e., the CMS platform) is directly sent to the VAM (the VAM exposes services to the outside using a Node), the VAM serves as a signaling proxy and is forwarded to a corresponding VAG (e.g., a target VAG) through a container network, the target VAG forwards the control signaling to the load balancing device through the Node via the network proxy on the Node where the target VAG is located, and the device responsible for balancing forwards the control signaling to the active device.
2. The VAM management node sends the service request message to a target VAG;
3. the target VAG forwards the service request packet to the target active device through the network agent on the Node where the target VAG is located, and a processing flow chart of the target VAG may be as shown in fig. 4B (the load balancing device and the Node forward the packet are not shown in the figure).
Illustratively, when the network proxy sends the service request to the target active device, the service request needs to be forwarded through the load balancing device, which is a reverse path of a message forwarding path from the target active device to the network proxy for a message sent by the target active device, such as a heartbeat request message.
Third, heartbeat keep-alive flow
1. The active equipment sends a heartbeat request message to the Node;
illustratively, the active device may send a heartbeat request packet to the load balancing device, and the load balancing device sends the heartbeat request packet to the selected Node (i.e., the second target Node) according to a preset load balancing policy, and the network agent of the selected Node sends the heartbeat request packet to the VAG.
2. A network agent on the Node inquires a forwarding mapping rule, and if a matched forwarding mapping rule is inquired, the heartbeat request message is forwarded to a VAG corresponding to the matched forwarding mapping rule;
for example, the forwarding mapping rule is refreshed or aged based on the session maintenance policy, and the specific implementation thereof can be referred to the related description in the above embodiments.
3. When receiving the heartbeat request message, the VAG returns a heartbeat response message, and the processing flow may be as shown in fig. 4C (the forwarding process of the load balancing device and the Node to the message is not shown in the figure).
Illustratively, a heartbeat response message sent by the VAG is forwarded to the corresponding active device sequentially through the network agent of the Node and the load balancing device.
It should be noted that, after the active device is registered, if the heartbeat request packet and the service request packet of the active device do not exist within the session holding time, the active device is in an offline state, at this time, the network agent on the Node deletes the corresponding forwarding mapping rule, and further, when the Node receives the packet of the active device again, it needs to select a VAG again according to the load balancing policy by the network agent, and if the VAG is allocated to the active device during registration, the VAG does not respond to the received packet, and at this time, the active device initiates registration again.
If the active device is accessed through a new VAG, the VAM may delete the originally recorded corresponding relationship between the active device and the assigned VAG when receiving the corresponding relationship between the active device and the VAG reported by the new VAG.
In addition, after the active device sends the heartbeat request message, when the heartbeat response message is not received, registration can be reinitiated, namely, the service function can be recovered, so that the single point fault of the VAG can be avoided.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
referring to fig. 5, a schematic structural diagram of a device access system provided in an embodiment of the present application is shown in fig. 5, where the device access system may include:
the system comprises an active device, a load balancing device, a node and an access gateway; wherein:
the load balancing device is used for receiving a registration request sent by a target active device in the active devices and sending the registration request to a first target node based on a first load balancing strategy;
and the node is used for determining a target access gateway corresponding to the target active device through a network agent based on a second load balancing strategy when the node is used as a first target node, and sending the registration request to the target access gateway.
In some embodiments, as shown in fig. 6, the system further comprises: a management node;
the access gateway is used for reporting the corresponding relation between the target active device and the target access gateway to the management node when the access gateway is used as the target access gateway;
the management node is used for sending the service request to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway when receiving the service request aiming at the target active device initiated by an application platform;
the access gateway is also used for sending the service request to the load balancing equipment through a network agent on a node where the access gateway is located when the access gateway is used as a target access gateway;
the load balancing device is further configured to send the service request to the target active device.
In some embodiments, the node is further configured to update, by the network proxy when serving as the first target node, a forwarding mapping rule based on a correspondence between the target active device and the target access gateway;
the load balancing device is further configured to receive a heartbeat request packet of the target active device, and send the heartbeat request packet to a second target node based on the first load balancing policy;
the node is further configured to forward, when serving as a second target node, the heartbeat request packet to the target access gateway through a network agent based on a target forwarding mapping rule in the forwarding mapping rules; the target forwarding mapping rule is a forwarding mapping rule associated with the corresponding relation between the target active device and the access gateway in the forwarding mapping rules;
the node is also used for receiving a heartbeat response message sent by the target access gateway through a network agent when the node is used as the node where the target access gateway is located, and sending the heartbeat response message to the load balancing equipment;
the load balancing device is further configured to send the heartbeat response message to the target active device.
In some embodiments, the forwarding mapping rules are refreshed or aged based on a session maintenance policy.
In some embodiments, the active device is further configured to, when serving as the target active device, send a registration request to the load balancing device again if a heartbeat response message is not received after sending a heartbeat request message.
Referring to fig. 7, a schematic structural diagram of a node provided in the embodiment of the present application is shown in fig. 7, where the node may include:
the receiving unit is used for receiving a registration request of the target active device sent by the load balancing device; the registration request is sent based on a first load balancing strategy when the load balancing equipment receives the registration request sent by the target active equipment;
a determining unit, configured to determine, by a network proxy, a target access gateway corresponding to the target active device based on a second load balancing policy;
and the sending unit is used for sending the registration request to the target access gateway through the network proxy.
In some embodiments, the Node shown in fig. 7 may be a Node (Node) in any of the above method embodiments or system embodiments.
Referring to fig. 8, a schematic structural diagram of a management node according to an embodiment of the present application is shown in fig. 8, where the management node may include:
the receiving unit is used for receiving the corresponding relation between the target active equipment and the target access gateway reported by the target access gateway; the corresponding relation between the target active device and the target access gateway is sent when the target access gateway receives a registration request sent by a first target node; the registration request received by the first target node is sent based on a first load balancing strategy when the load balancing equipment receives the registration request sent by the target active equipment;
and the sending unit is used for sending the service request to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway when receiving the service request aiming at the target active device initiated by the application platform, so that the target access gateway sends the service request to the load balancing device through a network agent on a node where the target access gateway is located, and the load balancing device sends the service request to the target active device.
In some embodiments, the management node shown in fig. 8 may be a node in any of the method embodiments or system embodiments described above.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (10)
1. A device access method, comprising:
the method comprises the steps that load balancing equipment receives a registration request sent by target active equipment, and the registration request is sent to a first target node based on a first load balancing strategy;
and the network agent on the first target node determines a target access gateway corresponding to the target active device based on a second load balancing strategy, and sends the registration request to the target access gateway.
2. The method of claim 1, further comprising:
the target access gateway reports the corresponding relation between the target active equipment and the target access gateway to a management node;
when the management node receives a service request which is initiated by an application platform and aims at the target active device, the service request is sent to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway;
the target access gateway sends the service request to the load balancing equipment through a network agent on a node where the target access gateway is located;
and the load balancing equipment sends the service request to the target active equipment.
3. The method of claim 1, wherein after the network proxy at the first target node determines the target access gateway corresponding to the target active device, the method further comprises:
the network agent on the first target node updates a forwarding mapping rule based on the corresponding relation between the target active device and the target access gateway;
the method further comprises the following steps:
the load balancing equipment receives a heartbeat request message of the target active equipment, and sends the heartbeat request message to a second target node based on the first load balancing strategy;
the network agent on the second target node forwards the heartbeat request message to the target access gateway based on a target forwarding mapping rule in the forwarding mapping rules; the target forwarding mapping rule is a forwarding mapping rule associated with a corresponding relation between the target active device and the target access gateway in the forwarding mapping rules;
the target access gateway sends a heartbeat response message sent by the target access gateway to the load balancing equipment through a network agent on a node where the target access gateway is located;
and the load balancing equipment sends the heartbeat response message to the target active equipment.
4. The method of claim 3, wherein the forwarding mapping rule is refreshed or aged based on a session maintenance policy.
5. The method according to claim 3, wherein after the target active device sends the heartbeat request message, the method further comprises:
and if the heartbeat response message is not received, the registration request is sent to the load balancing equipment again.
6. A device access system, comprising: the system comprises an active device, a load balancing device, a node and an access gateway; wherein:
the load balancing device is used for receiving a registration request sent by a target active device in the active devices and sending the registration request to a first target node based on a first load balancing strategy;
and the node is used for determining a target access gateway corresponding to the target active device through a network agent based on a second load balancing strategy when the node is used as a first target node, and sending the registration request to the target access gateway.
7. The system of claim 6, further comprising: a management node;
the access gateway is used for reporting the corresponding relation between the target active device and the target access gateway to the management node when the access gateway is used as the target access gateway;
the management node is used for sending the service request to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway when receiving the service request aiming at the target active device initiated by an application platform;
the access gateway is also used for sending the service request to the load balancing equipment through a network agent on a node where the access gateway is located when the access gateway is used as a target access gateway;
the load balancing device is further configured to send the service request to the target active device.
8. The system of claim 6,
the node is further configured to update a forwarding mapping rule based on a correspondence between the target active device and the target access gateway through a network proxy when serving as a first target node;
the load balancing device is further configured to receive a heartbeat request packet of the target active device, and send the heartbeat request packet to a second target node based on the first load balancing policy;
the node is further configured to forward, when serving as a second target node, the heartbeat request packet to the target access gateway through a network agent based on a target forwarding mapping rule in the forwarding mapping rules; the target forwarding mapping rule is a forwarding mapping rule associated with the corresponding relation between the target active device and the access gateway in the forwarding mapping rules;
the node is also used for receiving a heartbeat response message sent by the target access gateway through a network agent when the node is used as the node where the target access gateway is located, and sending the heartbeat response message to the load balancing equipment;
the load balancing device is further configured to send the heartbeat response message to the target active device.
9. A node, comprising:
the receiving unit is used for receiving a registration request of the target active device sent by the load balancing device; the registration request is sent based on a first load balancing strategy when the load balancing equipment receives the registration request sent by the target active equipment;
a determining unit, configured to determine, by a network proxy, a target access gateway corresponding to the target active device based on a second load balancing policy;
and the sending unit is used for sending the registration request to the target access gateway through the network proxy.
10. A management node, comprising:
the receiving unit is used for receiving the corresponding relation between the target active equipment and the target access gateway reported by the target access gateway; the corresponding relation between the target active device and the target access gateway is sent when the target access gateway receives a registration request sent by a first target node; the registration request received by the first target node is sent based on a first load balancing strategy when the load balancing equipment receives the registration request sent by the target active equipment;
and the sending unit is used for sending the service request to the target access gateway based on the recorded corresponding relation between the target active device and the target access gateway when receiving the service request aiming at the target active device initiated by the application platform, so that the target access gateway sends the service request to the load balancing device through a network agent on a node where the target access gateway is located, and the load balancing device sends the service request to the target active device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010694776.3A CN111835858B (en) | 2020-07-17 | 2020-07-17 | Equipment access method, equipment and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010694776.3A CN111835858B (en) | 2020-07-17 | 2020-07-17 | Equipment access method, equipment and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111835858A true CN111835858A (en) | 2020-10-27 |
CN111835858B CN111835858B (en) | 2023-05-30 |
Family
ID=72923686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010694776.3A Active CN111835858B (en) | 2020-07-17 | 2020-07-17 | Equipment access method, equipment and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111835858B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114143368A (en) * | 2021-12-21 | 2022-03-04 | 苏州万店掌网络科技有限公司 | Communication method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624916A (en) * | 2012-03-26 | 2012-08-01 | 华为技术有限公司 | Method, node manager and system for load balancing in cloud computing system |
US20140143428A1 (en) * | 2011-07-14 | 2014-05-22 | Huawei Technologies Co., Ltd. | Method, Apparatus, and Edge Node Controller for Allocating Edge Node |
CN111083181A (en) * | 2018-10-19 | 2020-04-28 | 北京奇虎科技有限公司 | Equipment scheduling method, gateway and system for large-scale access to Internet of things |
CN111327668A (en) * | 2019-09-25 | 2020-06-23 | 杭州海康威视系统技术有限公司 | Network management method, device, equipment and storage medium |
-
2020
- 2020-07-17 CN CN202010694776.3A patent/CN111835858B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140143428A1 (en) * | 2011-07-14 | 2014-05-22 | Huawei Technologies Co., Ltd. | Method, Apparatus, and Edge Node Controller for Allocating Edge Node |
CN102624916A (en) * | 2012-03-26 | 2012-08-01 | 华为技术有限公司 | Method, node manager and system for load balancing in cloud computing system |
CN111083181A (en) * | 2018-10-19 | 2020-04-28 | 北京奇虎科技有限公司 | Equipment scheduling method, gateway and system for large-scale access to Internet of things |
CN111327668A (en) * | 2019-09-25 | 2020-06-23 | 杭州海康威视系统技术有限公司 | Network management method, device, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
王栋: "LVS集群及负载均衡技术在区域PACS的应用研究", 《医疗卫生装备》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114143368A (en) * | 2021-12-21 | 2022-03-04 | 苏州万店掌网络科技有限公司 | Communication method and device |
Also Published As
Publication number | Publication date |
---|---|
CN111835858B (en) | 2023-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9130954B2 (en) | Distributed health check for global server load balancing | |
US7742421B2 (en) | Systems, methods, and computer program products for distributing application or higher layer communications network signaling entity operational status information among session initiation protocol (SIP) entities | |
US6954784B2 (en) | Systems, method and computer program products for cluster workload distribution without preconfigured port identification by utilizing a port of multiple ports associated with a single IP address | |
CN102177685B (en) | Methods, systems, and computer readable media for throttling traffic to an internet protocol (IP) network server using alias hostname identifiers assigned to the IP network server with a domain name system (DNS) | |
US10979387B2 (en) | Systems and methods for utilization of anycast techniques in a DNS architecture | |
CN112929285B (en) | Communication optimization system of block chain network | |
US20130097335A1 (en) | System and methods for managing network protocol address assignment with a controller | |
CN111615066A (en) | Distributed micro-service registration and calling method based on broadcast | |
EP2901651B1 (en) | Application layer session routing | |
EP3000221B1 (en) | Methods, systems, and computer readable media for performing enhanced service routing | |
CN111327668B (en) | Network management method, device, equipment and storage medium | |
EP2747364A1 (en) | Overload control for session setups | |
US20060013227A1 (en) | Method and appliance for distributing data packets sent by a computer to a cluster system | |
US20110078489A1 (en) | Method, apparatus, and system for maintaining status of bootstrap peer | |
CN115103008A (en) | Service request forwarding system | |
CN111835858B (en) | Equipment access method, equipment and system | |
KR20180095260A (en) | Apparatus and method for providing of IoT service | |
KR100788631B1 (en) | Resource pooling in an internet protocol-based communication system | |
US20230102122A1 (en) | Methods, systems, and computer readable media for identifying alternate delivery endpoints for mobile originated data and monitoring reports in a communications network | |
JP3974925B2 (en) | Server device | |
CN114900526A (en) | Load balancing method and system, computer storage medium and electronic device | |
CN111147617B (en) | Method and system for distributing addresses based on DHCP server cluster load | |
JP2023547880A (en) | Network nodes and methods in network nodes for providing backup network functionality | |
JP4617203B2 (en) | Server apparatus and communication connection method | |
CN116319800A (en) | BRAS load scheduling method based on DHCP server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |