CN111835858B - Equipment access method, equipment and system - Google Patents

Equipment access method, equipment and system Download PDF

Info

Publication number
CN111835858B
CN111835858B CN202010694776.3A CN202010694776A CN111835858B CN 111835858 B CN111835858 B CN 111835858B CN 202010694776 A CN202010694776 A CN 202010694776A CN 111835858 B CN111835858 B CN 111835858B
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.)
Active
Application number
CN202010694776.3A
Other languages
Chinese (zh)
Other versions
CN111835858A (en
Inventor
杜修龙
左文仲
白龙彪
孔均渭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN202010694776.3A priority Critical patent/CN111835858B/en
Publication of CN111835858A publication Critical patent/CN111835858A/en
Application granted granted Critical
Publication of CN111835858B publication Critical patent/CN111835858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

The application provides a device access method, device and system, wherein the method comprises the following steps: the load balancing equipment receives a registration request sent by target active equipment, and sends the registration request 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 equipment based on a second load balancing strategy, and sends the registration request to the target access gateway. The method can realize the unified access of the active equipment under the condition of ensuring the load balance of the access gateway.

Description

Equipment access method, equipment and system
Technical Field
The application relates to the technical field of security monitoring, in particular to a device access method, device and system.
Background
An active device refers to a network device that will actively initiate registration with an application platform to access the application platform.
Currently, an active device access application platform generally configures a registration address in advance, that is, designates an access service, so that the active device initiates registration based on the registration address configured in advance, and realizes access through the designated access service.
Due to performance constraints of access to the service, when a large number of devices need to access, a plurality of registration addresses are often configured to realize load sharing of access to the devices.
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 load balancing equipment receives a registration request sent by target active equipment, and sends the registration request 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 equipment based on a second load balancing strategy through a network proxy, 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: active equipment, load balancing equipment, nodes and access gateways; 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 policy;
and the node is used for determining a target access gateway corresponding to the target active equipment from the access gateways based on a second load balancing strategy through a network proxy 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 device receives the registration request sent by the target active device;
the determining unit is used for determining a target access gateway corresponding to the target active device based on a second load balancing strategy through the network proxy;
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 reported by the target access gateway and the target access gateway; the corresponding relation between the target active equipment 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 which is initiated by the application platform and is aimed at the target active device, so that the target access gateway sends the service request to the load balancing device through a network proxy 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, a registration request sent by a target active device is received through load balancing equipment, and the registration request is sent to a first target node based on a first load balancing strategy; 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 a registration request to the target access gateway, so that uniform access of the active device is realized under the condition of ensuring the load balancing of the access gateway.
Drawings
FIG. 1 is a flow chart of a device access method according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of another device access method according to yet another exemplary embodiment of the present application;
FIG. 3 is a schematic architecture diagram of a specific application scenario illustrated in an exemplary embodiment of the present application;
FIG. 4A is a schematic diagram of an active device registration process, as shown in an exemplary embodiment of the present application;
FIG. 4B is a schematic diagram of a business operational flow shown in an exemplary embodiment of the present application;
FIG. 4C is a schematic diagram of a heartbeat keep-alive procedure as illustrated in an exemplary embodiment of the present application;
FIG. 5 is a schematic 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 yet another exemplary embodiment of the present application;
FIG. 7 is a schematic 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 exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present 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 better understand the technical solutions provided by the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more obvious, 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 flow chart of a device access method provided in an embodiment of the present application, 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 this embodiment of the present application, the target active device is not specifically a fixed active device, but may refer to any active device, and the embodiment of the present application will not be repeated later.
In the embodiment of the application, in order to realize unified access of the active device, the unified registration entry of the active device can be realized by using the load balancing device, and the active device can initiate a registration request to the load balancing device based on the address information of the load balancing device.
When the load balancing device receives the registration request sent by the target active device, a node (referred to herein as a first target node) may be selected from the node cluster based on a preset load balancing policy (referred to herein as a first load balancing policy), and the registration request may be sent to the first target node.
In one example, the first load balancing policy may be a polling policy, that is, selecting a node by polling, and sending a received registration request to the selected node to implement load balancing of the node.
In one example, multiple access gateways may be deployed on a node that 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 strategy, and sends a registration request to the target access gateway.
In this embodiment of the present application, when the first target node receives the registration request, an access gateway (referred to herein as a target access gateway) for accessing the target active device may be determined by the network proxy based on a preset load balancing policy (referred to herein as a second load balancing policy), so as to implement load balancing of the access gateway.
When the network proxy determines the target access gateway, the registration request of the target active device may be sent 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 network proxy on the first target node may be a target access gateway determined based on the second load balancing policy, and may also be an access gateway deployed on another node.
In addition, in the embodiment of the application, the interactive signaling among the management node, the access gateway and the network agent is sent through the container network.
In the method flow shown in fig. 1, a plurality of access gateways are exposed to the outside in the form of nodes, and the unified registration entry of the active device is realized by using the load balancing device, so that the unified access of the active device is realized 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 have one or more access gateway components installed thereon, and a network proxy is deployed on the node, and services are exposed to the outside through a node port (nodeport).
Wherein the management node exposes IP to upper layers (e.g., application platforms) and the load balancing device exposes IP to lower layers (e.g., active devices).
The access gateway components installed on the nodes form an access gateway cluster, and the respective networks in the container network formed by the access gateways and the network agents are communicated with each other.
In some embodiments, as shown in fig. 2, the device access method provided in the embodiments of the present application may further include the following steps:
step S120, the target access gateway reports the corresponding relation between the target active device and the target access gateway to the management node.
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 for 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.
And step 140, the target access gateway sends the service request to the load balancing equipment through the network proxy on the node where the target access gateway is located.
And step S150, the load balancing device sends the service request to the target active device.
The application platform initiates a service request to the target active device through the management node based on the corresponding relation between the target active device and the target access gateway recorded in the management service.
For example, when the target access gateway receives the 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 the service request for the target active device, the service request for the target active device can be initiated to the management node, and the management node can determine the target access gateway accessed by the target active device based on the recorded corresponding relation 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 equipment through a network proxy on the node where the target access gateway is located, and the load balancing equipment sends the service request to the target active equipment.
It should be noted that, in order to ensure consistency of the packet forwarding paths, 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 consistency of the registration request and the service request packet forwarding (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 method flow shown in fig. 2, the load balancing policy adopts a reverse device registration direction, so as to ensure that the service processing uses the access gateway accessed during active device registration, and adopts an access gateway service mechanism to reversely implement load balancing of the access gateway.
In some embodiments, after determining the target access gateway corresponding to the target active device, the network proxy on the first target node may update the forwarding mapping rule based on the correspondence between the target active device and the access gateway, and increase the forwarding mapping rule associated with the correspondence between the target active device and the access gateway (referred to herein as the target forwarding mapping rule).
The device access method provided by the embodiment of the application may further include:
the load balancing device receives a heartbeat request message of the target active device 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 the target access gateway based on the 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 proxy on the node where the target access gateway is located;
and the load balancing device sends the heartbeat response message to the target active device.
In this embodiment of the present application, when the load balancing device receives the heartbeat request sent by the target active device, a node (referred to herein as a second target node) may be selected from the node cluster based on the 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 device 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 agent on a node may maintain forwarding mapping rules that identify the packet forwarding paths between active devices and access gateways, i.e., which active device's packet is forwarded through which access gateway.
In one example, when there are multiple nodes, network agents on each node collectively maintain forwarding mapping rules.
For example, when the network proxy 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 forwarding mapping rule may be updated based on the corresponding relationship between the target active device and the target access gateway, and the target forwarding mapping rule may be increased.
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 the target access gateway receives 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 proxy, and the load balancing equipment sends the heartbeat response message to the target active 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 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 relation between the target active device and the first target node, so that the consistency of the message forwarding path is ensured.
In one 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 packet (including a service request or a heartbeat request) interaction within a preset valid time, the valid time of the forwarding mapping rule is refreshed; and when no matched message interaction exists in the preset effective time, aging the forwarding mapping rule.
For example, for any forwarding mapping rule, one table entry (routing rule table entry) in iptables may be corresponding, and session maintenance of the routing rule table entry may be implemented through the record module.
For any routing rule table item, when a matched service request or heartbeat request exists, the event module can refresh the effective time of the corresponding routing rule table item, and correspondingly, the effective time of the forwarding mapping rule corresponding to the routing rule table item is refreshed; when no matched service request or heartbeat request exists in the effective time, the corresponding routing rule table item is deleted by the event module, and accordingly, the forwarding mapping rule corresponding to the routing rule table item is also aged.
In one 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, re-sending a registration request to the load balancing equipment.
For example, in order to avoid a single point failure of the access gateway, for example, a node failure 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 fails, and at this time, the target active device may send a registration request to the load balancing device again to 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 embodiments of the present application are not repeated herein.
It should be noted that, after the network proxy on the second target node sends the heartbeat request message of the target active device to the target access gateway, if the heartbeat response message 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) that receives the registration request of the target active device again, may allocate an access gateway to the target active device again through the network proxy, report the corresponding relationship between the target active device and the newly allocated access gateway to the management node, determine that the corresponding relationship between the target active device and the access gateway is transformed, delete the recorded corresponding relationship between the target active device and the target access gateway, and store the corresponding relationship 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 by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below in connection with 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, an architecture diagram of a specific application scenario provided in this embodiment of the present application is shown in fig. 3, where a plurality of VAGs (Video Access Gateway, video access gateways) provide services for the outside by one VAG-Service (also may be referred to as K8S Service, simply referred to as Service), and then the services are exposed for the outside by using a node port (node port) manner, and a Load-balancing device is used to implement a unified registration entry of an active device.
It should be noted that, in the embodiment of the present application, the VAG adopts a K8S Service container network, so that a Node (such as a physical server) may be deployed with multiple VAG (i.e. multiple VAG components are installed), and a Node is deployed with a network proxy (which may be called kube-proxy), and services are provided to the outside through the same port (i.e. Node port) of the Node.
The VAM exposes IP to the upper layer and the load balancer exposes IP to the lower layer.
The VAGs installed on each Node are combined into a VAG cluster, and the respective networks in the container network formed by each VAG and the network agent are communicated.
The VAM (i.e., the management Node) may be a separate physical entity device or may be a component installed on a Node.
In addition, VAG-Service is virtual, and the actual route forwarding is realized by network agents on each Node in the K8S cluster, corresponding to the forwarding mapping rule, and the network agents on each Node commonly maintain the forwarding mapping rule.
Therefore, the VAG-Service must be used in conjunction with a network proxy on each Node, which is deployed on each Node in the K8S cluster, where this routing rule is set.
The registration flow, the service flow, and the heartbeat flow are described below, respectively.
1. Registration process
Based on the scenario shown in fig. 3, the registration procedure may include the following steps:
1. the target active device initiates registration to a unique IP address;
illustratively, the unique IP address is the IP address of the load balancing device.
It should be noted that, when a new active device joins the system, the application platform (CMS platform (security system platform) may pre-add information of the active device, such as an IP address, to the VAM (Video Access Manager, video access management node) in advance.
2. The load balancing equipment receives a registration request, performs first load balancing, and sends the registration request to a NodePort port of a target Node (Node) (namely the first target Node);
for example, the load balancing device may implement load balancing using a Round Robin (polling scheduling) policy, that is, when a registration request is received, a Node is selected by using a polling manner, and the registration request is sent 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 device 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 adopts a session maintaining policy through a network Proxy (such as Kube-Proxy), performs a second load balancing, and forwards the registration request to the target VAG.
The target Node receives the registration request, determines the allocated VAG based on the second load balancing policy through the network proxy, updates the forwarding mapping rule based on the corresponding relationship between the active device requesting registration and the allocated VAG (such as the corresponding relationship between the IP address of the active device and the IP address of the VAG), and starts session maintenance.
For example, assume that the session is held for 24 hours. When the session maintenance is set, when the network proxy receives the message of the active device in 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 always sent to the same VAG, 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, so that load balancing of the VAG is implemented reversely through Service.
In addition, considering that when the active device bound with the VAG is offline, the offline active device does not occupy resources on the previously bound VAG, and when the active device is reused, the active device occupies resources of the newly bound VAG, so the load balancing policy of the network proxy may be: and when the session is kept, and the corresponding relation between the matched active devices and the VAGs cannot be queried, selecting the optimal VAGs for loading according to the number of the active devices accessed by the VAGs, namely selecting the VAGs 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 the processing flow chart thereof may be as shown in fig. 4A (the forwarding process diagram of the load balancing device and the Node for the message is not shown).
2. Business operation flow
0. The CMS platform obtains the online state of the active device from the VAM and can initiate business operation aiming at the online active device.
Take as an example a service request for a target active device.
1. The VAM management node receives service operation for target active equipment initiated by the CMS platform;
illustratively, the control signaling of the application platform (i.e., CMS platform) is directly to the VAM (the VAM uses nodeport to expose services to the outside), the VAM is used as a signaling proxy, and is transferred to a corresponding VAG (e.g., a target VAG) through the container network, and then the target VAG transfers the control signaling to the load balancing device through nodeport through the network proxy on the Node where the target VAG is located, and then the responsible balancing device transfers 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 message to the target active device through the network proxy on the Node where the target VAG is located, and the processing flow chart of the target VAG may be as shown in fig. 4B (the forwarding process of the load balancing device and the Node to the message is not shown).
For example, when the network proxy sends a service request to the target active device, the service request needs to be forwarded through the load balancing device, where the service request is a message sent by the target active device, such as a heartbeat request message, and is an inverse path of a message forwarding path from the target active device to the network proxy.
3. Heartbeat keep-alive process
1. The active equipment sends a heartbeat request message to the Node;
for example, the active device may send a heartbeat request packet to the load balancing device, where 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 proxy of the selected Node sends the heartbeat request packet to the VAG.
2. The network agent on Node inquires the forwarding mapping rule, if the matched forwarding mapping rule is inquired, the heartbeat request message is forwarded to the VAG corresponding to the matched forwarding mapping rule;
illustratively, the forwarding mapping rule is refreshed or aged based on the session maintenance policy, and specific implementation thereof may be found in the related description in the above embodiments.
3. When the VAG receives the heartbeat request message, it returns a heartbeat response message, and the processing flow of the heartbeat response message 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 diagram).
The heartbeat response message sent by the VAG is forwarded to the corresponding active device through the network proxy and the load balancing device of the Node in sequence.
It should be noted that after the registration of the active device, if the heartbeat request message and the service request message of the active device do not exist in the session maintaining 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 message of the active device again, it needs to select a VAG again according to the load balancing policy through the network agent, if the VAG allocated during registration of the active device by the VAG, the VAG will not respond to the received message, and at this time, the active device will initiate registration again.
If the active device is accessed through the new VAG, the VAM can delete the original recorded corresponding relation between the active device and the assigned VAG when receiving the corresponding relation 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, the registration can be restarted, and the service function can be recovered, so that the VAG single-point fault can be avoided.
The methods provided herein are described above. The apparatus provided in this application is described below:
referring to fig. 5, a schematic structural diagram of a device access system provided in an embodiment of the present application, as shown in fig. 5, the device access system may include:
active equipment, load balancing equipment, nodes and access gateways; 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 policy;
and the node is used for determining a target access gateway corresponding to the target active equipment based on a second load balancing strategy through a network proxy 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 which is initiated by the application platform and is aimed at the target active device;
the access gateway is further configured to send the service request to the load balancing device through a network proxy 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, when serving as a first target node, a forwarding mapping rule based on a correspondence of the target active device and the target access gateway through a network proxy;
the load balancing device is further configured to receive a heartbeat request message of the target active device, and send the heartbeat request message to a second target node based on the first load balancing policy;
the node is further configured to, when serving as a second target node, forward, by using a network proxy, the heartbeat request packet 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 access gateway in the forwarding mapping rule;
the node is further configured to, when being used as a node where the target access gateway is located, receive, by using a network proxy, a heartbeat response message sent by the target access gateway, and send the heartbeat response message to the load balancing device;
the load balancing device is further configured to send the heartbeat response packet to the target active device.
In some embodiments, the forwarding mapping rules are refreshed or aged based on session maintenance policies.
In some embodiments, the active device is further configured to, when serving as the target active device, resend the registration request to the load balancing device if no heartbeat response message is received after sending the heartbeat request message.
Referring to fig. 7, a schematic structural diagram of a node according to an 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 device receives the registration request sent by the target active device;
the determining unit is used for determining a target access gateway corresponding to the target active device based on a second load balancing strategy through the network proxy;
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 method embodiments or system embodiments described above.
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 reported by the target access gateway and the target access gateway; the corresponding relation between the target active equipment 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 which is initiated by the application platform and is aimed at the target active device, so that the target access gateway sends the service request to the load balancing device through a network proxy 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 relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for device access, comprising:
the load balancing equipment receives a registration request sent by target active equipment, and sends the registration request 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 equipment based on a second load balancing strategy, and sends the registration request to the target access gateway.
2. The method according to claim 1, wherein the method further comprises:
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 for the target active device initiated by an 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;
the target access gateway sends the service request to the load balancing equipment through a network proxy on a node where the target access gateway is located;
and the load balancing device sends the service request to the target active device.
3. The method of claim 1, wherein after the network proxy on the first target node determines the target access gateway corresponding to the target active device, further comprising:
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 steps of:
the load balancing device receives a heartbeat request message of the target active device 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 rule;
the target access gateway sends the heartbeat response message sent by the target access gateway to the load balancing equipment through a network proxy on a node where the target access gateway is located;
and the load balancing device sends the heartbeat response message to the target active device.
4. A method according to claim 3, wherein the forwarding mapping rules are refreshed or aged based on session maintenance policies.
5. The method of claim 3, wherein after the target active device sends the heartbeat request message, further comprising:
and if the heartbeat response message is not received, re-sending a registration request to the load balancing equipment.
6. A device access system, comprising: active equipment, load balancing equipment, nodes and access gateways; 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 policy;
and the node is used for determining a target access gateway corresponding to the target active equipment based on a second load balancing strategy through a network proxy 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, wherein 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 which is initiated by the application platform and is aimed at the target active device;
the access gateway is further configured to send the service request to the load balancing device through a network proxy 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, wherein the system further comprises a controller configured to control the controller,
the node is further configured to update, when the node is used as a first target node, a forwarding mapping rule through a network proxy 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 message of the target active device, and send the heartbeat request message to a second target node based on the first load balancing policy;
the node is further configured to, when serving as a second target node, forward, by using a network proxy, the heartbeat request packet 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 access gateway in the forwarding mapping rule;
the node is further configured to, when being used as a node where the target access gateway is located, receive, by using a network proxy, a heartbeat response message sent by the target access gateway, and send the heartbeat response message to the load balancing device;
the load balancing device is further configured to send the heartbeat response packet 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 device receives the registration request sent by the target active device;
the determining unit is used for determining a target access gateway corresponding to the target active device based on a second load balancing strategy through the network proxy;
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 reported by the target access gateway and the target access gateway; the corresponding relation between the target active equipment 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; the target access gateway is an access gateway corresponding to the target active device determined based on a second load balancing strategy when the first target node receives the registration request by a network agent on the first target node;
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 which is initiated by the application platform and is aimed at the target active device, so that the target access gateway sends the service request to the load balancing device through a network proxy on a node where the target access gateway is located, and the load balancing device sends the service request to the target active device.
CN202010694776.3A 2020-07-17 2020-07-17 Equipment access method, equipment and system Active CN111835858B (en)

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 CN111835858A (en) 2020-10-27
CN111835858B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143368B (en) * 2021-12-21 2022-12-30 苏州万店掌网络科技有限公司 Communication method and device

Citations (3)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882699B (en) * 2011-07-14 2015-07-29 华为技术有限公司 The distribution method of fringe node and device and fringe node controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
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)

* Cited by examiner, † Cited by third party
Title
LVS集群及负载均衡技术在区域PACS的应用研究;王栋;《医疗卫生装备》;20160715(第07期);全文 *

Also Published As

Publication number Publication date
CN111835858A (en) 2020-10-27

Similar Documents

Publication Publication Date Title
US9998526B2 (en) Registration redirect server
US10979387B2 (en) Systems and methods for utilization of anycast techniques in a DNS architecture
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
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)
US7965699B1 (en) Routing/switching on a heterogeneous network
CN111615066B (en) Distributed micro-service registration and calling method based on broadcast
US10355979B2 (en) Media routing
EP2901651B1 (en) Application layer session routing
US10404854B2 (en) Overload control for session setups
US9148388B2 (en) Methods, systems, and computer readable media for performing enhanced service routing
CN111327668B (en) Network management method, device, equipment and storage medium
US8706845B2 (en) Method, apparatus, and system for maintaining status of bootstrap peer
US20060013227A1 (en) Method and appliance for distributing data packets sent by a computer to a cluster system
CN111835858B (en) Equipment access method, equipment and system
US20160226963A1 (en) Load balancing using predictable state partitioning
US20040151111A1 (en) Resource pooling in an Internet Protocol-based communication system
JP3974925B2 (en) Server device
JP4617203B2 (en) Server apparatus and communication connection method

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