CN107332771B - Method for guaranteeing routing consistency, router and routing system - Google Patents

Method for guaranteeing routing consistency, router and routing system Download PDF

Info

Publication number
CN107332771B
CN107332771B CN201710757120.XA CN201710757120A CN107332771B CN 107332771 B CN107332771 B CN 107332771B CN 201710757120 A CN201710757120 A CN 201710757120A CN 107332771 B CN107332771 B CN 107332771B
Authority
CN
China
Prior art keywords
level routing
routing node
detection result
level
node
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
CN201710757120.XA
Other languages
Chinese (zh)
Other versions
CN107332771A (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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201710757120.XA priority Critical patent/CN107332771B/en
Publication of CN107332771A publication Critical patent/CN107332771A/en
Application granted granted Critical
Publication of CN107332771B publication Critical patent/CN107332771B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results

Abstract

The invention discloses a method for guaranteeing routing consistency, a router and a routing system, wherein the method comprises the following steps: the upper-level routing node detects the network state reaching each lower-level routing node; sharing the detection result to different processes of the same application in the upper-level routing node; and each process respectively forwards the data packets based on the detection result, wherein the data packets with the same flow characteristics are forwarded to the same next-level routing node. The technical scheme provided by the invention not only can dynamically adjust the conditions of the links and the nodes of the network, but also can carry out consistent routing according to the characteristics of the flow, thereby ensuring the stability of the flow.

Description

Method for guaranteeing routing consistency, router and routing system
Technical Field
The invention relates to the technical field of internet, in particular to a method for guaranteeing route consistency, a router and a route selecting system.
Background
Today, as the internet is rapidly developed, common routing methods are classified into static routing and dynamic routing.
Static routing refers to routing information manually configured by a user or a network administrator, and when the topology structure of a network or the state of a link changes, the network administrator needs to manually modify the relevant static routing information in a routing table.
Dynamic routing is a concept opposite to static routing, and means that a router can automatically establish its own routing table according to specific routing information exchanged among a plurality of routers, and can timely and automatically adjust according to changes of links and nodes, where the changes include: the number of router nodes (hop count), the network transmission cost (cost), the bandwidth (bandwidth), the delay (delay), the load (load), the reliability (reliability), the maximum transmission unit (mtu), (maximum transmission unit), and so on, which are included in the path.
Static routing can be fixed based on the characteristic IP of the traffic, but lacks the handling of feedback on the network conditions. From the viewpoint of flexibility of routing, dynamic routing can well solve the problem of network congestion, but for traffic with the same characteristics, consistency of routing selection cannot be guaranteed, so that traffic is unstable, and user experience is further affected.
Disclosure of Invention
In order to solve the problem in the prior art, embodiments of the present invention provide a method and a system for guaranteeing route consistency. The technical scheme is as follows:
in one aspect, a method for guaranteeing routing consistency is applied to a previous-level routing node, where the method includes the following steps:
the upper-level routing node detects the network state reaching each lower-level routing node;
sharing the detection result to different processes of the same application in the upper-level routing node;
and each process respectively forwards the data packets based on the detection result, wherein the data packets with the same flow characteristics are forwarded to the same next-level routing node.
Further, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol.
Further, the step of forwarding the data packet by each process based on the detection result specifically includes:
selecting the next-level routing node with normal network state in the detection result as a target node;
and performing consistent hash operation on the flow characteristics, selecting a next-level routing node from the target nodes and forwarding the data packet.
Further, the step of the previous-stage routing node detecting the network state reaching each next-stage routing node specifically includes: and the upper-level routing node periodically detects the network state reaching each lower-level routing node.
In another aspect, a method for guaranteeing route consistency is applied to a plurality of upper-level routing nodes, where the method includes the following steps:
the plurality of upper-level routing nodes respectively detect the network state reaching each lower-level routing node;
the plurality of upper-level routing nodes share respective detection results;
and each upper-level routing node forwards a data packet based on the detection result, wherein the data packets with the same flow characteristics are forwarded to the same lower-level routing node.
Further, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol.
Further, the step of forwarding the data packet by each upper-level routing node based on the detection result specifically includes:
selecting the next-level routing node with normal network state in all the detection results as a target node;
and performing consistent hash operation on the flow characteristics, selecting a next-level routing node from the target nodes and forwarding the data packet.
Further, the step of sharing the respective detection results among the plurality of upper-level routing nodes specifically includes:
establishing a database to store the detection results of all the upper-level routing nodes;
summarizing the detection results, and selecting the next-level routing node with the normal network state reaching each previous-level routing node as a final detection result;
and sharing the final detection result to each other upper-level routing node by using a synchronous mode.
Further, the step of detecting, by the plurality of upper-level routing nodes, the network state of each lower-level routing node includes: and the plurality of upper-level routing nodes periodically and respectively detect the network state reaching each lower-level routing node.
In yet another aspect, a router includes:
the detection module is used for detecting the network state reaching each next-level routing node;
the sharing module is used for sharing the detection result to different processes in the same current application;
and the forwarding module is used for receiving a data packet sent by a user and forwarding the data packet based on the detection result, wherein the data packets with the same flow characteristics are forwarded to the same next-level routing node.
Further, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol.
Further, the forwarding module is specifically configured to:
selecting the next-level routing node with normal network state in the detection result as a target node;
and performing consistent hash operation on the flow characteristics, selecting a next-level routing node from the detection result, and forwarding the data packet.
In yet another aspect, a routing system, wherein the system comprises a plurality of upper level routing nodes and a plurality of lower level routing nodes, wherein:
each upper-level routing node respectively detects the network state reaching all the lower-level routing nodes and shares the detection result;
and each upper-level routing node forwards a data packet based on the detection result, wherein the data packets with the same flow characteristics are forwarded to the same lower-level routing node.
Further, the traffic includes one or more of a source IP address, a destination IP address, and a protocol.
And further, the system further comprises a data center, stores and summarizes the detection results of all the upper-level routing nodes, selects the lower-level routing node with the normal network state reaching each upper-level routing node as a final detection result, and shares the final detection result with each other upper-level routing node in a synchronous mode.
Further, each upper-level routing node selects a lower-level routing node and forwards a data packet by performing consistent hash operation on the traffic characteristics based on the final detection result.
In yet another aspect, an electronic storage medium stores computer-executable instructions for causing the computer to perform any of the methods described above.
In yet another aspect, an electronic device includes:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method according to the obtained program instructions.
In yet another aspect, an electronic system includes: a plurality of the above electronic devices.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: the invention can dynamically adjust the link and node condition of the network and carry out consistent routing according to the flow characteristic by forwarding the data packets with the same flow characteristic to the same next-level routing node, thereby ensuring the stability of the flow and improving the user experience.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for maintaining route consistency according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for maintaining route consistency according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a router according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a routing system in the fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Implement one
Please refer to fig. 1, which is a flowchart illustrating a method for maintaining routing consistency according to an embodiment of the present invention.
In this embodiment, the method for guaranteeing routing consistency is applied to a previous-level routing node, and different processes of the same application in the previous-level routing node can be ensured to forward data packets with the same traffic characteristics to the same next-level routing node, so that the stability of traffic is ensured, and the user experience is improved.
It should be noted that the previous-level routing node and the next-level routing node mentioned in the embodiment of the present invention are determined according to an actual application scenario, and specifically, are divided according to a sequence of receiving user request traffic, and the previous-level routing node preferentially receives the user request traffic and forwards the user request traffic to the next-level routing node, so that in different application scenarios, the routing node may be defined as the previous-level routing node or the next-level routing node.
In step S1, the previous-level routing node probes the state of the network that reaches each of the next-level routing nodes.
In this embodiment, there is usually more than one next-level routing node having a routing relationship with the previous-level routing node, and among the plurality of next-level routing nodes having a routing relationship, the previous-level routing node detects a network state reaching each next-level routing node, and detects whether communication between the previous-level routing node and the current next-level routing node is smooth, and whether communication between two routing nodes is smooth includes various manners, such as detecting through a ping instruction, or other manners, which is not limited herein.
In this embodiment, the form of probing the network state reaching each next-level routing node by the previous-level routing node is also various, and may be periodic probing or aperiodic probing, for example, probing periodically with 500ms as one probing period or probing randomly, which is not limited herein.
After the detection in step S1, a detection result is formed, and the detection result includes the next-level routing node in a normal communication state with the previous-level routing node.
In step S2, the probe result is shared with different processes of the same application in the upper level routing node.
In this embodiment, a Process (Process) is used to indicate a basic execution unit of an application in a memory environment, and taking a Unix operating system as an example, the Process is a basic component in the Unix operating system environment and is a basic unit of system resource allocation, and almost all tasks such as user management and resource allocation performed in the Unix operating system are implemented by controlling the application Process by the operating system. An Application Program (Application) is generally composed of a plurality of programs, each Program being an executing process, and each process being either single-threaded or multi-threaded. Therefore, from the perspective of a user, a process is an execution process of an application program, and from the perspective of an operating system kernel, the process represents a basic unit of resources such as a memory and a CPU time slice allocated by an operating system, and is a running environment provided for a running program, and the process is different from the application program in that the application program is stored as a static file in a storage space such as a hard disk of a computer system, and the process is a system resource management entity maintained by the operating system under a dynamic condition.
In this embodiment, the detection results of the previous-level routing node for all the next-level routing nodes having a routing relationship with the previous-level routing node are shared by a sharing method to different processes of the same application in the current previous-level routing node, for example, if the current application a of the previous-level routing node includes three processes, i.e., process 1, process 2, and process 3, then process 1, process 2, and process 3 all share the detection results, so that each process uses the shared detection results as data packets for forwarding traffic, thereby ensuring that the next-level routing nodes forwarded by all the processes maintain good communication state with the previous-level routing node, and ensuring the stability of the traffic.
In step S3, the processes respectively forward data packets based on the detection result, where the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
In this embodiment, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol, where the protocol represents a communication protocol in the traffic packet, such as a TCP protocol, a UDP protocol, and the like.
Whether the traffic characteristics are the same or not can be determined according to actual requirements, for example, in some embodiments, the traffic characteristics are the source IP addresses, and the source IP addresses are the same, which means that the traffic characteristics are the same. That is, in the process of setting the program, it is necessary to determine which contents are specifically included in the traffic characteristics, and then determine whether the traffic characteristics are the same according to whether the contents are all the same.
In this embodiment, taking the example that the traffic characteristics only include the source IP address, the step of forwarding the data packet by each process based on the detection result specifically includes:
selecting a next-level routing node with a normal network state in the detection result as a target node;
and performing consistent hash operation on the source IP address, selecting a next-level routing node from the target node and forwarding the data packet.
In the embodiment, consistent hashing is a special hashing algorithm, and after the consistent hashing algorithm is used, the change of the slot number (namely, the size) of the hash table only needs to remap K/n keywords on average, wherein K is the number of the keywords and n is the number of the slots, but almost all the keywords need to be remapped compared with the situation that one slot is added or deleted in a traditional hash table, so the algorithm of the invention is simple and clear.
In this embodiment, a certain node of the next-level route may be considered to be available and juxtaposed to be in an available hash state only when the detection results of all the previous-level routing nodes are normal, otherwise, the node is considered to be in an abnormal and unusable hash state, and when the previous-level routing node selects the next-level routing node, the same consistent hash feature is provided, so that the same routing node of the next-level routing nodes in which many hash states are available may be selected.
That is to say, based on the consistent hash algorithm, when all processes share the same detection result, if the traffic characteristics are the same, the finally selected next-level routing node is also the same, thereby ensuring that the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
Therefore, when the previous-level routing node forwards the user data packet, the dynamic adjustment can be performed according to the link and node conditions of the network, and the consistent routing can be performed according to the characteristics of the flow, so that the stability of the flow is ensured, and the user experience is improved.
Example two
Please refer to fig. 2, which is a flowchart illustrating a method for guaranteeing routing consistency according to a second embodiment of the present invention.
In this embodiment, the method for guaranteeing routing consistency is applied to a plurality of upper-level routing nodes, and can ensure that data packets with the same traffic characteristics in a plurality of upper-level routing nodes can be forwarded to the same lower-level routing node, thereby ensuring traffic stability and improving user experience.
It should be noted that the previous-level routing node and the next-level routing node mentioned in the embodiment of the present invention are determined according to an actual application scenario, and specifically, are divided according to a sequence of receiving user request traffic, and the previous-level routing node preferentially receives the user request traffic and forwards the user request traffic to the next-level routing node, so that in different application scenarios, the routing node may be defined as the previous-level routing node or the next-level routing node.
In step S11, the plurality of upper-level routing nodes respectively detect the network state of reaching each lower-level routing node.
In this embodiment, there is a routing relationship between a plurality of upper-level routing nodes and a plurality of lower-level routing nodes, and there is usually more than one lower-level routing node having a routing relationship with the upper-level routing nodes, among a plurality of lower-level routing nodes having a routing relationship, the upper-level routing nodes detect a network state reaching each lower-level routing node, and other upper-level routing nodes also detect a network state reaching each lower-level routing node, detect whether communication between the upper-level routing node and the current lower-level routing node is smooth, and detect whether communication between two routing nodes is smooth includes various manners, such as detecting through a ping instruction, or other manners, which are not limited herein.
In this embodiment, the form of probing the network state reaching each next-level routing node by the previous-level routing node is also various, and may be periodic probing or aperiodic probing, for example, probing periodically with 500ms as one probing period or probing randomly, which is not limited herein.
In step S22, the respective probe results are shared among a plurality of upper-level routing nodes.
In this embodiment, the step S22 of sharing the respective detection results among the plurality of upper-level routing nodes specifically includes:
establishing a database to store the detection results of all the upper-level routing nodes;
summarizing the detection results, and selecting the next-level routing node with the normal network state reaching each previous-level routing node as a final detection result;
and sharing the final detection result to each other upper-level routing node by using a synchronous mode.
In this embodiment, each upper-level routing node uploads a detection result of detecting a network state reaching each lower-level routing node to a database, where the database is established on a management center node, and the management center node may be an independently set server communicating with each upper-level routing node, or one of the upper-level routing nodes.
The detection results of all the previous-level routing nodes are collected through the database, then the detection results are collected, and a final detection result is selected by using a logical and mode, specifically, the next-level routing node with a normal network state reaching each previous-level routing node is selected as the final detection result, that is, the network connection state of all the next-level routing nodes and each previous-level routing node in the final detection result is normal. And finally, sharing the final detection result to each other upper-level routing node by using a synchronous mode.
In step S33, each previous-level routing node forwards the data packet based on the detection result, where the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
In this embodiment, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol, where the protocol represents a communication protocol in the traffic packet, such as a TCP protocol, a UDP protocol, and the like.
Whether the traffic characteristics are the same or not can be determined according to actual requirements, for example, in some embodiments, the traffic characteristics are the source IP addresses, and the source IP addresses are the same, which means that the traffic characteristics are the same. That is, in the process of setting the program, it is necessary to determine which contents are specifically included in the traffic characteristics, and then determine whether the traffic characteristics are the same according to whether the contents are all the same.
In this embodiment, taking an example that the traffic characteristics only include a source IP address, the step of forwarding the data packet by each upper-level routing node based on the detection result specifically includes:
selecting the next-level routing node with normal network state in all detection results as a target node;
and performing consistent hash operation on the source IP address, selecting a next-level routing node from the target node and forwarding the data packet.
In the embodiment, consistent hashing is a special hashing algorithm, and after the consistent hashing algorithm is used, the change of the slot number (namely, the size) of the hash table only needs to remap K/n keywords on average, wherein K is the number of the keywords and n is the number of the slots, but almost all the keywords need to be remapped compared with the situation that one slot is added or deleted in a traditional hash table, so the algorithm of the invention is simple and clear.
In this embodiment, a certain node of the next-level route may be considered to be available and juxtaposed to be in an available hash state only when the detection results of all the previous-level routing nodes are normal, otherwise, the node is considered to be in an abnormal and unusable hash state, and when the previous-level routing node selects the next-level routing node, the same consistent hash feature is provided, so that the same routing node of the next-level routing nodes in which many hash states are available may be selected.
That is to say, based on the consistent hash algorithm, when all the previous-level routing nodes share the same detection result, if the traffic characteristics are the same, the finally selected next-level routing node is also the same, thereby ensuring that the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
The method for guaranteeing routing consistency provided by the embodiment of the invention forwards the data packets with the same flow characteristics to the same next-level routing node, so that not only can the dynamic adjustment be carried out aiming at the link and node conditions of the network, but also the consistent routing can be carried out according to the flow characteristics, thereby ensuring the stability of the flow and improving the user experience.
It should be noted that, in this embodiment, the manner of processing the forwarding of the data packet on the upper-level routing node may be single-process operation or multi-process operation, and when the data packet is multi-process operation, the method for guaranteeing the route consistency in the embodiment shown in fig. 1 may be simultaneously applied to the upper-level routing node, so as to ensure that the data packets with the same traffic characteristics are forwarded to the same lower-level routing node.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a router according to a third embodiment of the present invention.
In this embodiment, the router 10 is one of the upper level routing nodes, and specifically includes a probing module 101, a sharing module 102, and a forwarding module 103.
And the detection module 101 is configured to detect a network state of each next-level routing node.
In this embodiment, there is usually more than one next-level routing node having a routing relationship with the router 10, and among the plurality of next-level routing nodes having a routing relationship, the detection module 101 in the router 10 detects a network state of each next-level routing node, and includes various ways, such as detecting through a ping instruction, or other ways, without limitation, to detect whether communication between the router 10 and the current next-level routing node is smooth or not, and whether communication between the two is smooth or not.
In this embodiment, the detection module 101 in the router 10 detects the network state reaching each next-level routing node in various forms, and may be a periodic detection, an aperiodic detection, for example, a periodic detection with 500ms as one detection period, or a random detection, which is not limited herein.
And the sharing module 102 is configured to share the detection result to different processes in the same application. The application comprises flow agent application and is responsible for forwarding the data packet sent by the user according to the relevant strategy.
In this embodiment, a Process (Process) is used to indicate a basic execution unit of an application in a memory environment, and taking a Unix operating system as an example, the Process is a basic component in the Unix operating system environment and is a basic unit of system resource allocation, and almost all tasks such as user management and resource allocation performed in the Unix operating system are implemented by controlling the application Process by the operating system. An Application Program (Application) is generally composed of a plurality of programs, each Program being an executing process, and each process being either single-threaded or multi-threaded. Therefore, from the perspective of a user, a process is an execution process of an application program, and from the perspective of an operating system kernel, the process represents a basic unit of resources such as a memory and a CPU time slice allocated by an operating system, and is a running environment provided for a running program, and the process is different from the application program in that the application program is stored as a static file in a storage space such as a hard disk of a computer system, and the process is a system resource management entity maintained by the operating system under a dynamic condition.
In this embodiment, the detection results of the previous-level routing node for all the next-level routing nodes having a routing relationship with the previous-level routing node are shared by using a sharing method to different processes of the same application in the current previous-level routing node, for example, if the current application a of the previous-level routing node includes three processes, i.e., process 1, process 2, and process 3, then process 1, process 2, and process 3 all share the detection results, so that each process can synchronously forward the data packet of the traffic according to the shared detection results, thereby ensuring the stability of the traffic.
And the forwarding module 103 receives a data packet sent by a user, and forwards the data packet based on the detection result, wherein the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
In this embodiment, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol, where the protocol represents a communication protocol in the traffic packet, such as a TCP protocol, a UDP protocol, and the like.
Whether the traffic characteristics are the same or not can be determined according to actual requirements, for example, in some embodiments, the traffic characteristics are the source IP addresses, and the source IP addresses are the same, which means that the traffic characteristics are the same. That is, in the process of setting the program, it is necessary to determine which contents are specifically included in the traffic characteristics, and then determine whether the traffic characteristics are the same according to whether the contents are all the same.
In this embodiment, taking the example that the traffic characteristics only include the source IP address, the forwarding module 103 is specifically configured to:
selecting a next routing node with a normal network state in the detection result as a target node;
and performing consistent hash operation on the source IP address, and selecting a next-level routing node from the target node and forwarding.
In the embodiment, consistent hashing is a special hashing algorithm, and after the consistent hashing algorithm is used, the change of the slot number (namely, the size) of the hash table only needs to remap K/n keywords on average, wherein K is the number of the keywords and n is the number of the slots, but almost all the keywords need to be remapped compared with the situation that one slot is added or deleted in a traditional hash table, so the algorithm of the invention is simple and clear.
In this embodiment, a certain node of the next-level route may be considered to be available and juxtaposed to be in an available hash state only when the detection results of all the previous-level routing nodes are normal, otherwise, the node is considered to be in an abnormal and unusable hash state, and when the previous-level routing node selects the next-level routing node, the same consistent hash feature is provided, so that the same routing node of the next-level routing nodes in which many hash states are available may be selected.
That is to say, based on the consistent hash algorithm, when all processes share the same detection result, if the traffic characteristics are the same, the finally selected next-level routing node is also the same, thereby ensuring that the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
The router 10 provided in the embodiment of the present invention forwards the data packets with the same traffic characteristics to the same next-level routing node, so that not only can the dynamic adjustment be performed for the link and node conditions of the network, but also the consistent routing can be performed according to the traffic characteristics, thereby ensuring the stability of the traffic and improving the user experience.
Example four
Referring to fig. 4, a schematic structural diagram of a routing system according to a fourth embodiment of the present invention is shown.
In the present embodiment, the routing system 20 includes a plurality of upper level routing nodes (201, 202 are shown as examples), a plurality of lower level routing nodes (211, 212, 213 are shown as examples), and a data center 222.
Each upper level routing node (201, 202, etc.) respectively detects the network state reaching all the lower level routing nodes (211, 212, 213, etc.), and shares the detection result.
In this embodiment, there is a routing relationship between a plurality of previous routing nodes (e.g. 201, 202, etc.) and a plurality of next routing nodes (e.g. 211, 212, 213, etc.), there is usually more than one next routing node (e.g. 211, 212, 213, etc.) having a routing relationship with the previous routing nodes (e.g. 201, 202, etc.), among a plurality of next routing nodes (e.g. 211, 212, 213, etc.) having a routing relationship, the previous routing nodes (e.g. 201, 202, etc.) detect the network status reaching each next routing node (e.g. 211, 212, 213, etc.), and other previous routing nodes (e.g. 201, 202, etc.) also detect the network status reaching each next routing node (e.g. 211, 212, 213, etc.), detect whether the previous routing nodes (e.g. 201, 202, etc.) and the current next routing nodes (e.g. 211, 212, 213, etc.) are in smooth communication, detecting whether a communication between two routing nodes is smooth may include various means, such as detecting via a ping, or other means, which are not limited herein.
In this embodiment, the form of probing the network state reaching each next-level routing node (e.g., 211, 212, 213, etc.) by the previous-level routing node (e.g., 201, 202, etc.) is also various, and the probing may be periodic probing, or aperiodic probing, for example, periodically probing with 500ms as one probing period, or probing in a random manner, which is not limited herein.
The data center 222 stores and summarizes the detection results of all the upper-level routing nodes (e.g., 201, 202, etc.), selects the lower-level routing nodes (e.g., 211, 212, 213, etc.) with normal network states reaching each upper-level routing node (e.g., 201, 202, etc.) as final detection results, and shares the final detection results to each other upper-level routing node (e.g., 201, 202, etc.) in a synchronous manner.
And each upper-level routing node (such as 201, 202 and the like) forwards the data packet based on the final detection result, wherein the data packet with the same traffic characteristic is forwarded to the same lower-level routing node (such as 211, 212, 213 and the like).
In this embodiment, the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol, where the protocol represents a communication protocol in the traffic packet, such as a TCP protocol, a UDP protocol, and the like.
Whether the traffic characteristics are the same or not can be determined according to actual requirements, for example, in some embodiments, the traffic characteristics are the source IP addresses, and the source IP addresses are the same, which means that the traffic characteristics are the same. That is, in the process of setting the program, it is necessary to determine which contents are specifically included in the traffic characteristics, and then determine whether the traffic characteristics are the same according to whether the contents are all the same.
In this embodiment, each upper-level routing node performs consistent hash operation on the traffic characteristics based on the final detection result, and selects a lower-level routing node and forwards the data packet.
In the embodiment, consistent hashing is a special hashing algorithm, and after the consistent hashing algorithm is used, the change of the slot number (namely, the size) of the hash table only needs to remap K/n keywords on average, wherein K is the number of the keywords and n is the number of the slots, but almost all the keywords need to be remapped compared with the situation that one slot is added or deleted in a traditional hash table, so the algorithm of the invention is simple and clear.
In this embodiment, a certain node of the next-level route may be considered to be available and juxtaposed to be in an available hash state only when the detection results of all the previous-level routing nodes are normal, otherwise, the node is considered to be in an abnormal and unusable hash state, and when the previous-level routing node selects the next-level routing node, the same consistent hash feature is provided, so that the same routing node among the plurality of next-level routing nodes may be selected.
That is to say, based on the consistent hash algorithm, when all the previous-level routing nodes share the same detection result, if the traffic characteristics are the same, the finally selected next-level routing node is also the same, thereby ensuring that the data packets with the same traffic characteristics are forwarded to the same next-level routing node.
The routing system 20 provided in the embodiment of the present invention forwards the data packets with the same traffic characteristics to the same next-level routing node, so that not only can the dynamic adjustment be performed for the link and node conditions of the network, but also the consistent routing can be performed according to the traffic characteristics, thereby ensuring the stability of the traffic and improving the user experience.
EXAMPLE five
A computer electronic storage medium having stored thereon computer-executable instructions for causing the computer to perform the method of securing route consistency shown in fig. 1 or the method of securing route consistency provided by the embodiment shown in fig. 2.
The computer electronic storage medium provided by the embodiment of the invention forwards the data packets with the same flow characteristics to the same next-level routing node, so that not only can the dynamic adjustment be carried out according to the conditions of links and nodes of a network, but also the consistent routing can be carried out according to the flow characteristics, thereby ensuring the stability of the flow and improving the user experience.
EXAMPLE six
An electronic device, wherein the electronic device comprises:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the method for guaranteeing the route consistency shown in fig. 1 or the method for guaranteeing the route consistency provided by the embodiment shown in fig. 2 according to the obtained program instruction.
According to the electronic device provided by the embodiment of the invention, the data packets with the same flow characteristics are forwarded to the same next-level routing node, so that not only can dynamic adjustment be carried out according to the conditions of links and nodes of a network, but also consistent routing can be carried out according to the flow characteristics, thereby ensuring the stability of the flow and improving the user experience.
EXAMPLE seven
An electronic system, wherein the electronic system comprises: a plurality of the aforementioned electronic devices.
The electronic system provided by the embodiment of the invention forwards the data packets with the same flow characteristics to the same next-level routing node, so that not only can the dynamic adjustment be carried out according to the conditions of the links and the nodes of the network, but also the consistent routing can be carried out according to the flow characteristics, thereby ensuring the stability of the flow and improving the user experience.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method for guaranteeing routing consistency is applied to a plurality of upper-level routing nodes, and is characterized by comprising the following steps:
the plurality of upper-level routing nodes respectively detect the network state reaching each lower-level routing node;
summarizing the detection results of the previous-level routing nodes, and selecting the next-level routing node with a normal network state reaching each previous-level routing node as a final detection result;
sharing the final detection result to each other upper-level routing node by using a synchronous mode;
each upper-level routing node shares the final detection result to different processes of the same application in the upper-level routing node;
each process respectively forwards a data packet based on the final detection result, wherein the data packets with the same flow characteristics are forwarded to the same next-level routing node;
the step of forwarding the data packet by each process based on the final detection result specifically includes:
and performing consistent hash operation on the flow characteristics, selecting a next-level routing node from the final detection result, and forwarding the data packet.
2. The method of ensuring route consistency of claim 1, wherein the traffic characteristics include one or more of a source IP address, a destination IP address, and a protocol.
3. The method for guaranteeing routing consistency according to claim 1, wherein the step of detecting the network status of each next-level routing node by the plurality of previous-level routing nodes respectively comprises: and the plurality of upper-level routing nodes periodically and respectively detect the network state reaching each lower-level routing node.
4. A routing system comprising a plurality of upper level routing nodes and a plurality of lower level routing nodes, wherein:
each upper-level routing node respectively detects the network state reaching all the lower-level routing nodes and shares the detection result;
the data center is used for storing and summarizing the detection results of all the upper-level routing nodes, selecting the lower-level routing node with the normal network state reaching each upper-level routing node as a final detection result, and sharing the final detection result to each other upper-level routing node in a synchronous mode;
each upper-level routing node shares the final detection result to different processes of the same application in the upper-level routing node;
and each process selects a next-level routing node and forwards a data packet by performing consistent hash operation on the flow characteristics based on the final detection result, wherein the data packets with the same flow characteristics are forwarded to the same next-level routing node.
5. The routing system of claim 4, wherein the traffic characteristics comprise one or more of a source IP address, a destination IP address, and a protocol.
6. An electronic storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 3.
7. An electronic device, characterized in that the electronic device comprises:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the method of any one of claims 1 to 3 in accordance with the obtained program instructions.
8. An electronic system, characterized in that the electronic system comprises: a plurality of electronic devices as claimed in claim 7.
CN201710757120.XA 2017-08-29 2017-08-29 Method for guaranteeing routing consistency, router and routing system Active CN107332771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710757120.XA CN107332771B (en) 2017-08-29 2017-08-29 Method for guaranteeing routing consistency, router and routing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710757120.XA CN107332771B (en) 2017-08-29 2017-08-29 Method for guaranteeing routing consistency, router and routing system

Publications (2)

Publication Number Publication Date
CN107332771A CN107332771A (en) 2017-11-07
CN107332771B true CN107332771B (en) 2020-05-22

Family

ID=60204614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710757120.XA Active CN107332771B (en) 2017-08-29 2017-08-29 Method for guaranteeing routing consistency, router and routing system

Country Status (1)

Country Link
CN (1) CN107332771B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109039959B (en) * 2018-07-27 2021-04-16 广东工业大学 SDN rule consistency judgment method and related device
CN114374635B (en) * 2021-12-14 2023-12-05 阿里巴巴(中国)有限公司 Route detection method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1607790A (en) * 2003-10-15 2005-04-20 安捷伦科技有限公司 Method and system for the centralized collection of link state routing protocol data
CN101521895A (en) * 2009-04-03 2009-09-02 南京邮电大学 Forwarding method used for constructing multi-hop routing in wireless self-organizing network
CN103534991A (en) * 2013-07-23 2014-01-22 华为技术有限公司 Packet forwarding method and apparatus
CN106131919A (en) * 2016-07-15 2016-11-16 中国电子科技集团公司第五十四研究所 A kind of synchronous method of non-stop layer self-organized network topology
CN106254240A (en) * 2016-09-18 2016-12-21 腾讯科技(深圳)有限公司 A kind of data processing method and routing layer equipment and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104660505B (en) * 2013-11-18 2018-10-19 华为技术有限公司 Control method, the method and its device of routing iinformation generation that routing iinformation generates

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1607790A (en) * 2003-10-15 2005-04-20 安捷伦科技有限公司 Method and system for the centralized collection of link state routing protocol data
CN101521895A (en) * 2009-04-03 2009-09-02 南京邮电大学 Forwarding method used for constructing multi-hop routing in wireless self-organizing network
CN103534991A (en) * 2013-07-23 2014-01-22 华为技术有限公司 Packet forwarding method and apparatus
CN106131919A (en) * 2016-07-15 2016-11-16 中国电子科技集团公司第五十四研究所 A kind of synchronous method of non-stop layer self-organized network topology
CN106254240A (en) * 2016-09-18 2016-12-21 腾讯科技(深圳)有限公司 A kind of data processing method and routing layer equipment and system

Also Published As

Publication number Publication date
CN107332771A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
US10999184B2 (en) Health checking in a distributed load balancer
US11843657B2 (en) Distributed load balancer
JP6169251B2 (en) Asymmetric packet flow in distributed load balancers
JP6030807B2 (en) Open connection with distributed load balancer
US9432245B1 (en) Distributed load balancer node architecture
US9461922B2 (en) Systems and methods for distributing network traffic between servers based on elements in client packets
US9559961B1 (en) Message bus for testing distributed load balancers
US9871712B1 (en) Health checking in a distributed load balancer
US9942153B2 (en) Multiple persistant load balancer system
Cheng et al. Application-aware SDN routing for big data networking
EP3241309B1 (en) Overprovisioning floating ip addresses to provide stateful ecmp for traffic groups
CN107332771B (en) Method for guaranteeing routing consistency, router and routing system
US10567262B1 (en) Dynamic server device monitoring
CN110071872B (en) Service message forwarding method and device, and electronic device
CN109347743B (en) Special line communication method, computer readable storage medium and terminal equipment
US20190391856A1 (en) Synchronization of multiple queues

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