CN110995608A - Method, device and system for multi-link load balancing - Google Patents

Method, device and system for multi-link load balancing Download PDF

Info

Publication number
CN110995608A
CN110995608A CN201911323462.6A CN201911323462A CN110995608A CN 110995608 A CN110995608 A CN 110995608A CN 201911323462 A CN201911323462 A CN 201911323462A CN 110995608 A CN110995608 A CN 110995608A
Authority
CN
China
Prior art keywords
link
packet
load ratio
message
determining
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.)
Pending
Application number
CN201911323462.6A
Other languages
Chinese (zh)
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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201911323462.6A priority Critical patent/CN110995608A/en
Publication of CN110995608A publication Critical patent/CN110995608A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6255Queue scheduling characterised by scheduling criteria for service slots or service orders queue load conditions, e.g. longest queue first

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device and a system for multi-link load balancing, which are used for solving the technical problem that a plurality of links cannot be used in a balanced manner in the prior art. The method comprises the following steps: acquiring a data message and determining a message packet corresponding to the data message; calling a first sample database, and judging whether the message packet has a corresponding link, wherein the first sample database comprises a plurality of groups of message packets and parameter groups formed by corresponding links; if the packet has a corresponding link, determining the corresponding link according to the packet, and transmitting the data packet to a destination network through the link; and if the packet has no corresponding link, determining a link with the lowest load ratio, and transmitting the data packet to a destination network through the link with the lowest load ratio, wherein the load ratio is the ratio of the real-time rate of the link to the bandwidth.

Description

Method, device and system for multi-link load balancing
Technical Field
The present invention relates to the field of data communications, and in particular, to a method, an apparatus, and a system for multilink load balancing.
Background
Wide Area Networks (WAN), also known as extranets and public networks, are remote networks connecting local Area networks or metropolitan Area networks in different areas for computer communications, covering ranges from tens of kilometers to thousands of kilometers, and capable of connecting to a plurality of areas, cities and countries. For an enterprise, if there are north, middle and south branches, even overseas branches, the branches are connected in a private line, which is called enterprise wide area network. The enterprise wide area network has a plurality of exit links with different types and different bandwidths, and most of the exit links are special lines with high cost, so that the exit links are required to be used as uniformly as possible, the bandwidth utilization rate of the exit links is improved, and enterprise resources are saved.
At present, the existing multi-link load balancing methods include: (1) the packet-by-packet load balancing is performed, and the routing device sequentially sends the data packets destined for the same destination network to different equivalent next hop links, so that each equivalent link shares the traffic evenly, but the method cannot effectively support the load balancing of the links with different bandwidths, and has the potential problem of data packet disorder, which may cause retransmission of a Transmission Control Protocol (TCP), and increase problems of bandwidth occupation, delay, jitter, and the like. (2) The flow-by-flow load balancing is realized by checking some fields of received data messages by the routing equipment, taking the contents of the fields as keywords, and sending the data messages of the same type to the same next hop link through a hash function, but the method can not effectively support the load balancing of links with different bandwidths, and because the forwarding link of the data messages depends on the result of the load balancing hash algorithm, the path of a specific message is unchanged under the specific hash algorithm, once the flow model changes, the hash factor needs to be manually adjusted, but the hash factor can be adjusted under all flow models to obtain good load effect, the load balancing can be realized only by adjusting the load weight of each link, and the load balancing can be realized only by static manual adjustment and can not be automatically adjusted, and in addition, if the message types are too concentrated, the problem of traffic sharing imbalance is easily caused.
It can be seen that, in the prior art, there are defects that load balancing of links with different bandwidths cannot be effectively supported, or when a traffic model changes, a scheduling hash factor must be modified or a routing forwarding policy must be modified, so that multiple links cannot be used in a balanced manner.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for multi-link load balancing, which are used for solving the technical problem that a plurality of links cannot be used in a balanced manner in the prior art.
In a first aspect, to solve the foregoing technical problem, an embodiment of the present application provides a method for multi-link load balancing, where a technical scheme of the method is as follows:
acquiring a data message and determining a message packet corresponding to the data message;
calling a first sample database, and judging whether the message packet has a corresponding link, wherein the first sample database comprises a plurality of groups of message packets and parameter groups formed by corresponding links;
if the packet has a corresponding link, determining the corresponding link according to the packet, and transmitting the data packet to a destination network through the link;
and if the packet has no corresponding link, determining a link with the lowest load ratio, and transmitting the data packet to a destination network through the link with the lowest load ratio, wherein the load ratio is the ratio of the real-time rate of the link to the bandwidth.
In this embodiment, after obtaining the data packet, determining a packet corresponding to the data packet, and then calling a first sample database to determine whether the packet has a corresponding link, where the first sample database includes a plurality of sets of parameter sets formed by the packet and the corresponding link, if the packet has a corresponding link, determining the corresponding link according to the packet, and transmitting the data packet to the destination network through the link, and if the packet does not have a corresponding link, determining a link with a lowest load ratio, and transmitting the data packet to the destination network through the link with the lowest load ratio, where the load ratio is a ratio of a real-time rate of the link to a bandwidth, and by obtaining the packet corresponding to the data packet, determining the link for transmitting the data packet to the destination network is facilitated, and when the link load is unbalanced, load balancing can be achieved by scheduling packet on each link without modifying a scheduling hash factor or modifying a routing forwarding strategy, so that a plurality of links can be used in a balanced manner, the link bandwidth utilization rate is improved, and resources are saved.
With reference to the first aspect, in a first optional implementation manner of the first aspect, after transmitting the data packet to a destination network through a link with a lowest load ratio, the method further includes:
and updating the first sample database by taking the packet and the link with the lowest load ratio as a parameter group.
With reference to the first aspect, in a second optional implementation manner of the first aspect, acquiring a data packet, and determining a packet corresponding to the data packet includes:
calling a second sample database, and judging whether the header information of the data message has a corresponding message group, wherein the second sample database comprises the header information or the hash factor of a plurality of groups of data messages and a parameter group formed by the corresponding message group;
if the header information of the data message has a corresponding packet, determining the corresponding packet according to the header information of the data message;
and if the header information of the data message has no corresponding packet, performing hash operation according to the header information of the data message to obtain a hash factor, and determining the corresponding packet according to the hash factor.
With reference to the first optional implementation manner or the second optional implementation manner of the first aspect, in a third optional implementation manner of the first aspect, the header information includes any one of a source internet protocol IP address, a destination IP address, a protocol number, a source port, and a destination port of the datagram.
With reference to the first aspect, in a fourth optional implementation manner of the first aspect, the method further includes:
periodically acquiring the load ratio of each link, and determining the difference value between the highest load ratio and the lowest load ratio;
judging whether the difference value is larger than a first preset threshold value or not;
and if so, transmitting the data message of the message packet needing to be scheduled on the link with the highest load ratio to the destination network through the link with the lowest load ratio so as to enable the difference value of the load ratios of the two links to be smaller than a first preset threshold value.
In the embodiment of the present application, the load ratios of the links may be periodically obtained, a difference between the highest load ratio and the lowest load ratio is determined, whether the difference is greater than a first preset threshold is determined, and if the difference is greater than the first preset threshold, transmitting the data message of the message packet to be scheduled on the link with the highest load ratio to the destination network through the link with the lowest load ratio so as to enable the difference value of the load ratios of the two links to be smaller than a first preset threshold value, then load balancing can be achieved by scheduling packets on each link without modifying the scheduling hash factor or modifying the routing forwarding policy when the link loads are unbalanced, and, in addition, the link bandwidth is not required, and the load balance of links with different bandwidths can be supported, for example, under the combination of one link 100Mbps, one link 200Mbps, one link 1Gbps or other link bandwidth combinations, the load ratio of each link can be the same or within a load error range.
With reference to the fourth optional implementation manner of the first aspect, in a fifth optional implementation manner of the first aspect, the transmitting, to the destination network, the data packet of the packet that needs to be scheduled on the link with the highest load ratio through the link with the lowest load ratio includes:
acquiring the real-time rate of each packet on the link with the highest load ratio and the link with the lowest load ratio;
according to the real-time rate of each packet on the link with the highest load ratio, sequencing each packet on the link with the highest load ratio from low to high;
traversing from a packet with the lowest real-time rate, and determining a packet to be scheduled on a link with the highest load ratio so that the sum of the real-time rates of the packet to be scheduled is smaller than a second preset threshold, wherein the second threshold is one fourth of the difference value of the real-time rates of the two links;
and transmitting the data message of the message packet needing to be scheduled to a destination network through the link with the lowest load ratio.
In a second aspect, an apparatus for multi-link load balancing is provided, including:
the determining module is used for acquiring the data message and determining a message packet corresponding to the data message;
the judging module is used for calling a first sample database and judging whether the message packet has a corresponding link, wherein the first sample database comprises a plurality of groups of message packets and parameter groups formed by the corresponding links;
the first processing module is used for determining a corresponding link according to the packet if the packet has the corresponding link, and transmitting the data message to a destination network through the link;
and the second processing module is used for determining a link with the lowest load ratio if the packet has no corresponding link, and transmitting the data packet to a destination network through the link with the lowest load ratio, wherein the load ratio is the ratio of the real-time rate of the link to the bandwidth.
With reference to the second aspect, in a first optional implementation manner of the second aspect, the apparatus further includes an updating module configured to:
and updating the first sample database by taking the packet and the link with the lowest load ratio as a parameter group.
With reference to the second aspect, in a second optional implementation manner of the second aspect, the determining module is specifically configured to:
calling a second sample database, and judging whether the header information of the data message has a corresponding message group, wherein the second sample database comprises the header information or the hash factor of a plurality of groups of data messages and a parameter group formed by the corresponding message group;
if the header information of the data message has a corresponding packet, determining the corresponding packet according to the header information of the data message;
and if the header information of the data message has no corresponding packet, performing hash operation according to the header information of the data message to obtain a hash factor, and determining the corresponding packet according to the hash factor.
With reference to the second aspect, in a third optional implementation manner of the second aspect, the apparatus further includes a third processing module configured to:
periodically acquiring the load ratio of each link, and determining the difference value between the highest load ratio and the lowest load ratio;
judging whether the difference value is larger than a first preset threshold value or not;
and if so, transmitting the data message of the message packet needing to be scheduled on the link with the highest load ratio to the destination network through the link with the lowest load ratio so as to enable the difference value of the load ratios of the two links to be smaller than a first preset threshold value.
With reference to the third optional implementation manner of the second aspect, in a fourth optional implementation manner of the second aspect, the third processing module is specifically configured to:
acquiring the real-time rate of each packet on the link with the highest load ratio and the link with the lowest load ratio;
according to the real-time rate of each packet on the link with the highest load ratio, sequencing each packet on the link with the highest load ratio from low to high;
traversing from a packet with the lowest real-time rate, and determining a packet to be scheduled on a link with the highest load ratio so that the sum of the real-time rates of the packet to be scheduled is smaller than a second preset threshold, wherein the second threshold is one fourth of the difference value of the real-time rates of the two links;
and transmitting the data message of the message packet needing to be scheduled to a destination network through the link with the lowest load ratio.
In a third aspect, a system for multi-link load balancing is provided, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the steps included in any one of the implementation modes of the first aspect according to the obtained program instructions.
In a fourth aspect, there is provided a storage medium having stored thereon computer-executable instructions for causing a computer to perform the steps included in any one of the embodiments of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings 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 application.
Fig. 1 is a schematic structural diagram of a system for multi-link load balancing in an embodiment of the present application;
FIG. 2 is a flow chart of a method of multi-link load balancing in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a multilink load balancing apparatus in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a system for multi-link load balancing in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described can be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof, which are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In the embodiments of the present application, "at least one" may mean one or at least two, for example, one, two, three, or more, and the embodiments of the present application are not limited.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document generally indicates that the preceding and following related objects are in an "or" relationship unless otherwise specified.
At present, the existing multi-link load balancing methods include: (1) the packet-by-packet load balancing is performed, and the routing device sequentially sends the data packets destined for the same destination network to different equivalent next hop links, so that each equivalent link shares the traffic evenly, but the method cannot effectively support the load balancing of the links with different bandwidths, and has the potential problem of data packet disorder, which may cause retransmission of a Transmission Control Protocol (TCP), and increase problems of bandwidth occupation, delay, jitter, and the like. (2) The flow-by-flow load balancing is realized by checking some fields of received data messages by the routing equipment, taking the contents of the fields as keywords, and sending the data messages of the same type to the same next hop link through a hash function, but the method can not effectively support the load balancing of links with different bandwidths, and because the forwarding link of the data messages depends on the result of the load balancing hash algorithm, the path of a specific message is unchanged under the specific hash algorithm, once the flow model changes, the hash factor needs to be manually adjusted, but the hash factor can be adjusted under all flow models to obtain good load effect, the load balancing can be realized only by adjusting the load weight of each link, and the load balancing can be realized only by static manual adjustment and can not be automatically adjusted, and in addition, if the message types are too concentrated, the problem of traffic sharing imbalance is easily caused. It can be seen that, in the prior art, there are defects that load balancing of links with different bandwidths cannot be effectively supported, or when a traffic model changes, a scheduling hash factor must be modified or a routing forwarding policy must be modified, so that multiple links cannot be used in a balanced manner.
In view of this, an embodiment of the present application provides a multilink load balancing method, which may determine a packet corresponding to a data packet after acquiring the data packet, and then call a first sample database to determine whether the packet has a corresponding link, where the first sample database includes a plurality of sets of parameter sets formed by the packet and the corresponding link, if the packet has the corresponding link, the corresponding link is determined according to the packet, and the data packet is transmitted to a destination network through the link, and if the packet does not have the corresponding link, the link with the lowest load ratio is determined, and the data packet is transmitted to the destination network through the link with the lowest load ratio, where the load ratio is a ratio of a real-time rate of the link to a bandwidth, and by acquiring the packet corresponding to the data packet, the link for transmitting the data packet to the destination network is determined, meanwhile, when the load of the links is unbalanced, the load balance can be achieved by scheduling packet packets on each link without modifying a scheduling hash factor or modifying a routing forwarding strategy, so that a plurality of links can be used in a balanced manner, the bandwidth utilization rate of the links is improved, and resources are saved.
In order to better understand the technical solutions, the technical solutions of the present application are described in detail below through the drawings and the specific embodiments of the specification, and it should be understood that the specific features of the embodiments and examples of the present application are detailed descriptions of the technical solutions of the present application, and are not limitations of the technical solutions of the present application, and the technical features of the embodiments and examples of the present application may be combined with each other without conflict.
Fig. 1 is a structure of a routing device to which the method provided in the embodiment of the present application is applicable, although the method provided in the embodiment of the present application may be applied to a variety of routing devices, it should be understood that the routing device shown in fig. 1 is a simple illustration of a routing device to which the method provided in the embodiment of the present application is applicable, and is not a limitation of a routing device to which the method provided in the embodiment of the present application is applicable.
The routing device shown in fig. 1 is configured to read the destination address in the data packet and then route each data packet to the designated location on the best link according to the selected routing algorithm.
Referring to fig. 2, an embodiment of the present application provides a method for multi-link load balancing, which may be performed by the routing device shown in fig. 1. The specific flow of the method is described below.
Step 201: and acquiring the data message and determining a message packet corresponding to the data message.
In this embodiment of the present application, a data packet is obtained, and a second sample database is called, where the second sample database includes header information or a hash factor of multiple groups of data packets and a parameter group formed by corresponding packet packets, and the header information includes any one of a source internet protocol IP address, a destination IP address, a protocol number, a source port, and a destination port of the data packet. Each parameter set of the second sample database may be preset, or may be dynamically added by a management tool, such as Network management Software, Software Defined Network (SDN) controller Software, and the greater the number of packet in the second sample database, the better the link load balancing effect is, but the greater the overhead of the system is, and the smaller the number of packet is, the poorer the link load balancing effect is, so that the result of the compromise needs to be considered for setting the number of packet, for example, to 100.
It can be seen that the second sample database not only includes the header information of the data packet and the parameter set formed by the corresponding packet, such as the parameter set formed by the source port of the data packet and the corresponding packet, the destination IP address of the data packet and the parameter set formed by the corresponding packet, etc., but also includes the hash factor and the parameter set formed by the corresponding packet, and the packet has the index of the hash factor, such as hash factor 1, hash factor 55, or other numbers, which respectively correspond to different packets, so that the packet corresponding to the data packet can be determined according to the header information of the data packet or according to the hash factor, but because the hash factor is a number obtained by performing hash operation according to the header information of the data packet, the packet corresponding to the data packet is determined according to the hash factor to have more calculation processes than the packet corresponding to the data packet determined according to the header information of the data packet, therefore, after the data packet is obtained, whether the header information of the data packet has a corresponding packet is generally determined according to the second sample database, and if the header information of the data packet has a corresponding packet, the corresponding packet is determined according to the header information of the data packet; and if the header information of the data message does not have the corresponding packet, performing hash operation according to the header information of the data message to obtain a hash factor, and determining the corresponding packet according to the hash factor.
For ease of understanding, the following description is given by way of example:
for example, calling a second sample database, and if the destination IP address of the data message has a corresponding packet, determining the corresponding packet according to the destination IP address of the data message;
if the source IP address, the destination IP address, the protocol number, the source port and the destination port of the data message have no corresponding packet, performing hash operation according to the source IP address, the destination IP address, the protocol number, the source port and the destination port of the data message to obtain a hash factor 36, and determining the corresponding packet according to the hash factor 36.
Step 202: and calling a first sample database, and judging whether the message packet has a corresponding link, wherein the first sample database comprises a plurality of groups of parameter groups formed by the message packet and the corresponding link.
In the embodiment of the present application, after determining a packet corresponding to a data packet, a first sample database is called to determine whether the packet has a corresponding link, where the first sample database includes a plurality of groups of packets and a parameter group formed by the corresponding link. The preset packet is statically assigned and the main and standby links are assigned, so that the purpose of load balancing of the assigned packet on the assigned link and the remaining packets is achieved, for example, an enterprise wide area network has 2 exit links, one link has good quality, and one link has poor quality, so that some key services, such as voice, can be assigned to the link with good quality for forwarding.
Step 203: if the message packet has a corresponding link, determining the corresponding link according to the message packet, and transmitting the data message to a target network through the link; and if the packet has no corresponding link, determining the link with the lowest load ratio, and transmitting the data packet to the destination network through the link with the lowest load ratio.
In the embodiment of the application, a first sample database is called to judge whether a packet has a corresponding link, if the packet has the corresponding link, the corresponding link is determined according to the packet, and the data message is transmitted to a destination network through the link; and if the message packet has no corresponding link, determining the link with the lowest load ratio, transmitting the data message to the destination network through the link with the lowest load ratio, and updating the first sample database by taking the message packet and the link with the lowest load ratio as a parameter group, wherein the load ratio is the ratio of the real-time rate of the link to the bandwidth.
After determining the link for transmitting the data packet to the destination network, there may be a problem of unbalanced load of each link, so that load ratios of each link are periodically obtained, a difference between the highest load ratio and the lowest load ratio is determined, whether the difference is greater than a first preset threshold value is judged, and if the difference is greater than the first preset threshold value, the data packet of the packet to be scheduled on the link with the highest load ratio is transmitted to the destination network through the link with the lowest load ratio, so that the difference between the load ratios of the two links is smaller than the first preset threshold value.
Specifically, the bandwidth and the real-time rate of each link are periodically acquired, and the load ratio of each link is determined according to the bandwidth and the real-time rate of each link. Then obtaining the difference value between the highest load ratio and the lowest load ratio, judging whether the difference value is larger than a first preset threshold value, if the difference value is smaller than the first preset threshold value, determining that the load of each link is balanced, if the difference value is larger than the second preset threshold value, determining that the load of each link is unbalanced, scheduling the data packets of the partial packets on the link with the highest load ratio onto the link with the lowest load ratio, and simultaneously avoiding that the link with the lowest load ratio originally becomes the link with the highest load ratio after scheduling and further making the load unbalanced, when the packets needing scheduling on the link with the highest load ratio are selected, the sum of the flow rates of the packets needing scheduling can be half of the total schedulable flow rate, wherein the total schedulable flow rate is half of the difference value of the flow rates of the two links, and when the next scheduling is carried out, scheduling half of the flows to gradually approach, and finally, achieving the effect of load balancing, for example, obtaining the real-time rate of each packet on the link with the highest load ratio and the link with the lowest load ratio, sorting the packets on the link with the highest load ratio from low to high according to the real-time rate of each packet on the link with the highest load ratio, traversing from the packet with the lowest real-time rate, determining the packet to be scheduled on the link with the highest load ratio so that the sum of the real-time rates of the packets to be scheduled is smaller than a second preset threshold, wherein the second threshold is one fourth of the difference value of the real-time rates of the two links, and transmitting the data packet of the packet to be scheduled to a destination network through the link with the lowest load ratio.
For ease of understanding, the following description is given by way of example:
for example, the bandwidth and the real-time rate of each link are obtained in the first period, the link with the highest load ratio and the link with the lowest load ratio are determined, if the link a with the load ratio of 50% is the link with the highest load ratio, where the bandwidth of the link a is 10Mbps, the real-time rate is 5Mbps, and the link B with the load ratio of 10% is the link with the lowest load ratio, where the bandwidth of the link B is 10Mbps, the real-time rate is 1Mbps, and the first preset threshold is 3%, then the difference between the load ratios of the link a and the link B is 40%, which is greater than the first preset threshold, it is determined that the loads of the links are unbalanced, and a part of data packets of the packet on the link with the highest load ratio needs to be scheduled on the link with the lowest load ratio, so that the difference between the load ratios of the two links is smaller than the first preset threshold, and.
If the link a currently has a first packet, a second packet, and a third packet, which respectively correspond to real-time rates of 1, 3, and 1Mbps, and the link B currently has only a fourth packet, which corresponds to a real-time rate of 1Mbps, then it is necessary to schedule 2Mbps traffic from the link a to the link B, in order to avoid the problem that the link with the lowest load ratio originally becomes the link with the highest load ratio after scheduling 2Mbps traffic to the link B at one time and further cause load imbalance, the scheduling may be divided into multiple times, then according to the real-time rates of the packets on the link a, the packets on the link a are sorted from low to high, traversal is started from the packet with the lowest real-time rate, and the packets on the link a that need to be scheduled are determined, so that the sum of the real-time rates of the packets that need to be scheduled is smaller than a second threshold, wherein, the second threshold is one fourth of the difference between the real-time rates of the two links, that is, the second threshold is 1Mbps, then it is determined that the packet to be scheduled on the link a is the first packet, that is, the first packet is scheduled for the first time, and then scheduling is performed for the second time in the second period, and scheduling is ended until the difference between the load ratios of the link a and the link B is smaller than the first preset threshold, or scheduling is ended until no packet that can be scheduled can be found, where the fact that no schedulable packet can be found means that the real-time rate of any packet is smaller than the second threshold.
Based on the same inventive concept, embodiments of the present application provide a device for multi-link load balancing, where the device for multi-link load balancing can implement a function corresponding to the method for multi-link load balancing. The means for multilink load balancing may be a hardware structure, a software module, or a hardware structure plus a software module. The multi-link load balancing device can be realized by a chip system, and the chip system can be formed by a chip and can also comprise the chip and other discrete devices. Referring to fig. 3, the apparatus for multi-link load balancing includes a determining module 301, a determining module 302, a first processing module 303, and a second processing module 304, where:
a determining module 301, configured to obtain a data packet and determine a packet group corresponding to the data packet;
a determining module 302, configured to invoke a first sample database, and determine whether the packet has a corresponding link, where the first sample database includes a plurality of groups of packets and a parameter group formed by the corresponding link;
a first processing module 303, configured to determine, if the packet has a corresponding link, the corresponding link according to the packet, and transmit the data packet to a destination network through the link;
a second processing module 304, configured to determine, if the packet has no corresponding link, a link with a lowest load ratio, and transmit the data packet to the destination network through the link with the lowest load ratio, where the load ratio is a ratio of a real-time rate of the link to a bandwidth.
In an optional embodiment, the apparatus further comprises an update module configured to:
and updating the first sample database by taking the packet and the link with the lowest load ratio as a parameter group.
In an optional implementation manner, the determining module 301 is specifically configured to:
calling a second sample database, and judging whether the header information of the data message has a corresponding message group, wherein the second sample database comprises the header information or the hash factor of a plurality of groups of data messages and a parameter group formed by the corresponding message group;
if the header information of the data message has a corresponding packet, determining the corresponding packet according to the header information of the data message;
and if the header information of the data message has no corresponding packet, performing hash operation according to the header information of the data message to obtain a hash factor, and determining the corresponding packet according to the hash factor.
In an optional embodiment, the apparatus further comprises a third processing module configured to:
periodically acquiring the load ratio of each link, and determining the difference value between the highest load ratio and the lowest load ratio;
judging whether the difference value is larger than a first preset threshold value or not;
and if so, transmitting the data message of the message packet needing to be scheduled on the link with the highest load ratio to the destination network through the link with the lowest load ratio so as to enable the difference value of the load ratios of the two links to be smaller than a first preset threshold value.
In an optional implementation manner, the third processing module is specifically configured to:
acquiring the real-time rate of each packet on the link with the highest load ratio and the link with the lowest load ratio;
according to the real-time rate of each packet on the link with the highest load ratio, sequencing each packet on the link with the highest load ratio from low to high;
traversing from a packet with the lowest real-time rate, and determining a packet to be scheduled on a link with the highest load ratio so that the sum of the real-time rates of the packet to be scheduled is smaller than a second preset threshold, wherein the second threshold is one fourth of the difference value of the real-time rates of the two links;
and transmitting the data message of the message packet needing to be scheduled to a destination network through the link with the lowest load ratio.
Based on the same inventive concept, an embodiment of the present application provides a system for multi-link load balancing, please refer to fig. 4, where the system for multi-link load balancing includes at least one processor 402 and a memory 401 connected to the at least one processor, a specific connection medium between the processor 402 and the memory 401 is not limited in this embodiment of the present application, fig. 4 is an example where the processor 402 and the memory 401 are connected by a bus 400, the bus 400 is represented by a thick line in fig. 4, and a connection manner between other components is only schematically illustrated and not limited thereto. The bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or type of bus.
In the embodiment of the present application, the memory 401 stores instructions executable by the at least one processor 402, and the at least one processor 402 may execute the steps included in the foregoing method for balancing multilink load by calling the instructions stored in the memory 401.
The processor 402 is a control center of the multilink load balancing system, and may utilize various interfaces and links to connect various parts of the whole multilink load balancing system, and implement various functions of the multilink load balancing system by executing instructions stored in the memory 401. Optionally, the processor 402 may include one or more processing units, and the processor 402 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 402. In some embodiments, processor 402 and memory 401 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
Memory 401, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 401 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 401 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 401 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function for storing program instructions and/or data.
The processor 402 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method for multi-link load balancing disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
By programming the processor 402, the code corresponding to the multilink load balancing method described in the foregoing embodiment may be solidified in the chip, so that the chip can execute the steps of the multilink load balancing method when running.
Based on the same inventive concept, embodiments of the present application further provide a storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the steps of the method for multi-link load balancing as described above.
In some possible embodiments, the various aspects of the method for multi-link load balancing provided by the present application may also be implemented in the form of a program product, which includes program code for causing a multi-link load balancing system to perform the steps in the method for multi-link load balancing according to various exemplary embodiments of the present application described above in this specification, when the program product is run on the multi-link load balancing system.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for multi-link load balancing, comprising:
acquiring a data message and determining a message packet corresponding to the data message;
calling a first sample database, and judging whether the message packet has a corresponding link, wherein the first sample database comprises a plurality of groups of message packets and parameter groups formed by corresponding links;
if the packet has a corresponding link, determining the corresponding link according to the packet, and transmitting the data packet to a destination network through the link;
and if the packet has no corresponding link, determining a link with the lowest load ratio, and transmitting the data packet to a destination network through the link with the lowest load ratio, wherein the load ratio is the ratio of the real-time rate of the link to the bandwidth.
2. The method of claim 1, wherein after transmitting the data packet to a destination network via the link with the lowest load ratio, further comprising:
and updating the first sample database by taking the packet and the link with the lowest load ratio as a parameter group.
3. The method of claim 1, wherein obtaining a data packet and determining a packet corresponding to the data packet comprises:
calling a second sample database, and judging whether the header information of the data message has a corresponding message group, wherein the second sample database comprises the header information or the hash factor of a plurality of groups of data messages and a parameter group formed by the corresponding message group;
if the header information of the data message has a corresponding packet, determining the corresponding packet according to the header information of the data message;
and if the header information of the data message has no corresponding packet, performing hash operation according to the header information of the data message to obtain a hash factor, and determining the corresponding packet according to the hash factor.
4. A method according to claim 2 or 3, wherein the header information comprises any of a source internet protocol, IP, address, protocol number, source port, destination port of the datagram.
5. The method of claim 1, further comprising:
periodically acquiring the load ratio of each link, and determining the difference value between the highest load ratio and the lowest load ratio;
judging whether the difference value is larger than a first preset threshold value or not;
and if so, transmitting the data message of the message packet needing to be scheduled on the link with the highest load ratio to the destination network through the link with the lowest load ratio so as to enable the difference value of the load ratios of the two links to be smaller than a first preset threshold value.
6. The method of claim 5, wherein transmitting the data packets of the packets to be scheduled on the link with the highest load ratio to the destination network via the link with the lowest load ratio comprises:
acquiring the real-time rate of each packet on the link with the highest load ratio and the link with the lowest load ratio;
according to the real-time rate of each packet on the link with the highest load ratio, sequencing each packet on the link with the highest load ratio from low to high;
traversing from a packet with the lowest real-time rate, and determining a packet to be scheduled on a link with the highest load ratio so that the sum of the real-time rates of the packet to be scheduled is smaller than a second preset threshold, wherein the second threshold is one fourth of the difference value of the real-time rates of the two links;
and transmitting the data message of the message packet needing to be scheduled to a destination network through the link with the lowest load ratio.
7. An apparatus for multi-link load balancing, comprising:
the determining module is used for acquiring the data message and determining a message packet corresponding to the data message;
the judging module is used for calling a first sample database and judging whether the message packet has a corresponding link, wherein the first sample database comprises a plurality of groups of message packets and parameter groups formed by the corresponding links;
the first processing module is used for determining a corresponding link according to the packet if the packet has the corresponding link, and transmitting the data message to a destination network through the link;
and the second processing module is used for determining a link with the lowest load ratio if the packet has no corresponding link, and transmitting the data packet to a destination network through the link with the lowest load ratio, wherein the load ratio is the ratio of the real-time rate of the link to the bandwidth.
8. The apparatus of claim 7, further comprising:
and the third processing module is used for periodically acquiring the load ratio of each link, determining the difference value between the highest load ratio and the lowest load ratio, judging whether the difference value is greater than a first preset threshold value, and if the difference value is greater than the first preset threshold value, transmitting the data message of the message packet to be scheduled on the link with the highest load ratio to a destination network through the link with the lowest load ratio so as to enable the difference value between the load ratios of the two links to be smaller than the first preset threshold value.
9. A system for multilink load balancing, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps comprised by the method of any one of claims 1 to 6 in accordance with the obtained program instructions.
10. A storage medium storing computer-executable instructions for causing a computer to perform the steps comprising the method of any one of claims 1-6.
CN201911323462.6A 2019-12-20 2019-12-20 Method, device and system for multi-link load balancing Pending CN110995608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911323462.6A CN110995608A (en) 2019-12-20 2019-12-20 Method, device and system for multi-link load balancing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911323462.6A CN110995608A (en) 2019-12-20 2019-12-20 Method, device and system for multi-link load balancing

Publications (1)

Publication Number Publication Date
CN110995608A true CN110995608A (en) 2020-04-10

Family

ID=70073725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911323462.6A Pending CN110995608A (en) 2019-12-20 2019-12-20 Method, device and system for multi-link load balancing

Country Status (1)

Country Link
CN (1) CN110995608A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595919A (en) * 2020-04-30 2021-11-02 华为技术有限公司 Load sharing method and device
WO2022052882A1 (en) * 2020-09-14 2022-03-17 华为技术有限公司 Data transmission method and apparatus
WO2022088767A1 (en) * 2020-10-30 2022-05-05 成都极米科技股份有限公司 Method and apparatus for reducing electricity consumption of multi-link terminal, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094185A (en) * 2007-07-27 2007-12-26 杭州华三通信技术有限公司 Method and device for forwarding message based on multilink
CN102916898A (en) * 2012-11-02 2013-02-06 杭州迪普科技有限公司 Application keeping method and device of multilink egress
CN103618678A (en) * 2013-11-18 2014-03-05 北京星网锐捷网络技术有限公司 Method, device and system for self-adaptation multiple-link aggregation
CN105592181A (en) * 2015-10-15 2016-05-18 杭州华三通信技术有限公司 Link load balancing method and device
CN107181697A (en) * 2016-03-11 2017-09-19 中兴通讯股份有限公司 A kind of balancing link load method and device
US20190288937A1 (en) * 2018-03-15 2019-09-19 Interdigital Ce Patent Holdings Method and device for sending data packets on a first and a second links

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094185A (en) * 2007-07-27 2007-12-26 杭州华三通信技术有限公司 Method and device for forwarding message based on multilink
CN102916898A (en) * 2012-11-02 2013-02-06 杭州迪普科技有限公司 Application keeping method and device of multilink egress
CN103618678A (en) * 2013-11-18 2014-03-05 北京星网锐捷网络技术有限公司 Method, device and system for self-adaptation multiple-link aggregation
CN105592181A (en) * 2015-10-15 2016-05-18 杭州华三通信技术有限公司 Link load balancing method and device
CN107181697A (en) * 2016-03-11 2017-09-19 中兴通讯股份有限公司 A kind of balancing link load method and device
US20190288937A1 (en) * 2018-03-15 2019-09-19 Interdigital Ce Patent Holdings Method and device for sending data packets on a first and a second links

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595919A (en) * 2020-04-30 2021-11-02 华为技术有限公司 Load sharing method and device
WO2022052882A1 (en) * 2020-09-14 2022-03-17 华为技术有限公司 Data transmission method and apparatus
WO2022088767A1 (en) * 2020-10-30 2022-05-05 成都极米科技股份有限公司 Method and apparatus for reducing electricity consumption of multi-link terminal, and storage medium

Similar Documents

Publication Publication Date Title
CN111770028B (en) Method and network device for computer network
CN110995608A (en) Method, device and system for multi-link load balancing
CN111030835B (en) Task scheduling model of TTFC network and message scheduling table generation method
JP5271876B2 (en) Device having packet distribution function and packet distribution method
CN103297347B (en) A kind of load balance process method and device
CN108401492B (en) Routing method, device and server based on mixed resources
CN110177054B (en) Port queue scheduling method, device, network controller and storage medium
CN101094185A (en) Method and device for forwarding message based on multilink
CN101841487A (en) Configuration method for aggregating link service flow and packet switching device
CN111049752B (en) Load balancing method and device for multiple transmission lines
KR101823346B1 (en) Service function chaining system and the method for thereof
Li et al. Application-driven virtual network embedding for industrial wireless sensor networks
US11929911B2 (en) Shaping outgoing traffic of network packets in a network management system
US20170180244A1 (en) Broadband fallback for router
CN106572009A (en) Method and device for forwarding massages under multi-operator link environment
CN110535697B (en) Method for balancing block chain cross-domain broadcast network load
CN102932268A (en) Data packet transmitting method and device
CN104618253A (en) Dynamically changed transmission message processing method and device
CN103441930B (en) A kind of MPLS TE packet forwards and management method and device
CN109617806B (en) Data traffic scheduling method and device
CN109286563B (en) Data transmission control method and device
EP3629532A1 (en) Load sharing method and apparatus, routing device and storage medium
CN111740922B (en) Data transmission method, device, electronic equipment and medium
CN112702221B (en) BGP abnormal route monitoring method and device
CN109474523B (en) Networking method and system based on SDN

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410

RJ01 Rejection of invention patent application after publication