Hybrid HASH based load balancing in networks

The hybrid load balancing method addresses hash collisions and network polarization by combining hash-based selection with an offset update, ensuring balanced traffic distribution across paths without requiring network topology awareness.

WO2026082270A1PCT designated stage Publication Date: 2026-04-23HUAWEI TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-10-15
Publication Date
2026-04-23

AI Technical Summary

Technical Problem

Existing hash-based load balancing methods in computer networks suffer from hash collisions, network polarization, and require the packet source to be aware of network topology, leading to inefficient traffic distribution and unequal path utilization.

Method used

A hybrid load balancing method that combines hash-based path selection with an implicit source path offset update, using both packet header and metadata fields to ensure different paths are chosen without requiring network topology awareness.

Benefits of technology

Ensures randomization and avoids network polarization, providing balanced traffic distribution across available paths without topology knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024079025_23042026_PF_FP_ABST
    Figure EP2024079025_23042026_PF_FP_ABST
Patent Text Reader

Abstract

A method for network path selection that utilizes a hash function and an offset update function computed over one or more packet header fields. This approach enables implicit path selection by a source, enhancing overall routing efficiency without requiring the source to have knowledge of the network topology. Specifically, the invention allows the source to vary fields in the packet header in a way that guarantees that different paths are chosen in the network while providing high randomization and avoiding hash polarization.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] HYBRID HASH BASED LOAD BALANCING IN NETWORKS

[0002] TECHNICAL FIELD AND BACKGROUND

[0003] The present invention, optionally, relates to computer networks and, more particularly, but not exclusively, to network load balancing.

[0004] Load balancing is a widely used routing method, wherein a network device routes each packet via one of N available paths such that traffic is balanced between the paths. For example, Equal Cost Multi-Path (ECMP) is a routing strategy that uses load balancing. Load balancing methods presented in the prior art can be categorized into hash-based approaches and source routing approaches.

[0005] In a hash-based approach, a network device selects one of N available paths using a selection mechanism based on a hash function, wherein a hash is computed over a set of fields in the packet header, and the hash result is subsequently used for selecting a path in the range 1..N.

[0006] As used herein, the term "5-tuple" means a set of header fields consisting of Protocol, Source IP, Destination IP, Source Port, and Destination Port.

[0007] As used herein, the term "flow" means a set of packets sharing a plurality of common header fields.

[0008] Source routing approach forwards packets comprising an option header in turn comprising path specified by a source of the packet via the specified path. For example, a path specification may comprise a list of routers along the path.

[0009] Segment routing is a special case of source routing, wherein a path specification comprises a series of segments representing loose instructions or actions to be taken at various points in the network.

[0010] A considerable drawback of the source routing approach is that it requires a packet source to be aware of the network topology to efficiently perform load balancing.

[0011] Hash-based load balancing approach forwards packets within a flow via a same path. For example, the plurality of common header fields of the flow may comprise the 5-tuple.

[0012] As used herein, the term "hash collision" means a situation wherein two distinct hash inputs are mapped to a same hash output. The space size of hash input values is usually much greater than the number of paths, which may cause hash collisions. For example, a collision occurs when two different 5-tuple values in two different flows are used for hashing and are mapped by a hash function to the same path.

[0013] Entropy-based load balancing approach is a special case of the hash-based load balancing approach, wherein an entropy value is calculated by hashing one or more header fields. The entropy -based load balancing approach forwards packets comprising a same entropy value via a same path. For example, for a User Datagram Protocol (UDP) flow the entropy value may be calculated by hashing a UDP source port value.

[0014] A considerable drawback of the hash-based load balancing approach is that packets comprising different values of header fields used for entropy calculation might be forwarded via different paths, or might be forwarded through a same path if a hash collision occurs; specifically, a packet source may change the header fields used for hash computation, however this does not reliably determine whether a different path is chosen or not. In other words, there is no guarantee that two consecutive hash input values or two close hash input values are mapped to different hash outputs, although some hash functions aim to reduce the probability of a hash collision. For example, the folding hash function splits the input into a plurality of segments and performs summation or XOR of the plurality of segments to produce a hash output, aiming for an even distribution of hash outputs across the hash space.

[0015] As used herein, the terms "hash polarization" and "network polarization" may be used interchangeably, and mean a scenario wherein a load balancing hash function disproportionately maps data flows or packets to a subset of network paths, resulting in an unequal distribution of traffic.

[0016] Another considerable drawback of the hash-based load balancing approach is that it may be vulnerable to hash polarization. SUMMARY

[0017] The disclosed invention proposes a method for network path selection that utilizes a hash function and an offset update function computed over one or more packet header fields.

[0018] According to an aspect of some embodiments of the present invention there is provided a processor-implemented method for hybrid load balancing in computer networks, comprising receiving a network packet, comprising at least one of a first plurality of fields and a second plurality of fields, wherein a field is one of a header field or a metadata field, computing an initial path index, based on a configured number of paths and a hash of the first plurality of fields, computing a path offset based on the configured number of paths and the second plurality of fields and computing a final path index based on the initial path index, the path offset, and the configured number of paths.

[0019] According to an aspect of some embodiments of the present invention there is provided a processor-implemented method for a balanced transmission of network packets, comprising reading a configuration, comprising a first plurality of fields and second plurality of fields, wherein a field is one of a header field or a metadata field, responsive to a client request to transmit one or more network packets, assigning values to the second plurality of fields of a first network packet, storing the assigned values in a computer-readable memory, transmitting the first network packet configured for routing via a first network path, incrementing at least one of the stored values and assigning the stored values to the second plurality of fields of a second network packet, and transmitting the second network packet configured for routing via a second network path.

[0020] According to an aspect of some embodiments of the present invention there is provided a network device system, comprising a plurality of network interfaces, each assigned at least one index, a processor configured to execute stored executable instructions, and a non-transitory computer readable medium storing executable instructions that, when executed by a processor, cause the computer system to perform a method of hybrid load balancing, the method comprising receiving a network packet comprising at least one of a first plurality of fields and a second plurality of fields, wherein a field is one of a header field or a metadata field, computing an initial path index, based on a configured number of paths and a hash of the first plurality of fields, computing a path offset based on the configured number of paths and the second plurality of fields, computing a final path index based on the initial path index, the path offset and the configured number of paths, and routing the network packet via a network interface assigned the final path index.

[0021] Unless otherwise defined, all technical and / or scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention pertains. Although methods and materials similar or equivalent to those described herein can be used in the practice or testing of embodiments of the invention, exemplary methods and / or materials are described below. In case of conflict, the patent specification, including definitions, will control. In addition, the materials, methods, and examples are illustrative only and are not intended to be necessarily limiting.

[0022] Implementation of the method and / or system of embodiments of the invention can involve performing or completing selected tasks manually, automatically, or a combination thereof. Moreover, according to actual instrumentation and equipment of embodiments of the method and / or system of the invention, several selected tasks could be implemented by hardware, by software or by firmware or by a combination thereof using an operating system.

[0023] For example, hardware for performing selected tasks according to embodiments of the invention could be implemented as a chip or a circuit. As software, selected tasks according to embodiments of the invention could be implemented as a plurality of software instructions being executed by a computer using any suitable operating system. In an exemplary embodiment of the invention, one or more tasks according to exemplary embodiments of method and / or system as described herein are performed by a data processor, such as a computing platform for executing a plurality of instructions. Optionally, the data processor includes a volatile memory for storing instructions and / or data and / or a non-volatile storage, for example, a magnetic hard-disk and / or removable media, for storing instructions and / or data. Optionally, a network connection is provided as well. A display and / or a user input device such as a keyboard or mouse are optionally provided as well. BRIEF DESCRIPTION

[0024] Some embodiments of the invention are herein described, by way of example only, with reference to the accompanying drawings. With specific reference now to the drawings in detail, it is stressed that the particulars shown are by way of example and for purposes of illustrative discussion of embodiments of the invention. In this regard, the description taken with the drawings makes apparent to those skilled in the art how embodiments of the invention may be practiced.

[0025] In the drawings:

[0026] FIG. 1 is an illustration of source routing load balancing, as found in the prior art;

[0027] FIG. 2 is an illustration of hash-based load balancing, as found in the prior art;

[0028] FIG. 3 is an illustration of hybrid load balancing, according to some embodiments of the invention; and

[0029] FIG. 4 is an illustration of a network polarization phenomenon, as found in the prior art, and network polarization resolution, according to some embodiments of the invention.

[0030] DESCRIPTION OF SPECIFIC EMBODIMENTS OF THE INVENTION

[0031] The present invention, optionally, relates to computer networks and, more particularly, but not exclusively, to network load balancing.

[0032] The present invention discloses a method of hybrid load balancing, combining a hash-based path selection, wherein the hash is computed over a first plurality of packet header fields and metadata, with an implicit source path offset selection, wherein the offset is computed over a second plurality of packet header fields and metadata.

[0033] The method described hereinbelow enables a network packet source to manipulate network packet header fields in a way that guarantees that different paths are chosen in a network, without requiring the packet source to be familiar with the topology of the network.

[0034] The method described hereinbelow is particularly useful for enabling a high degree of randomization and for avoiding network polarization.

[0035] For purposes of better understanding some embodiments of the present invention, as illustrated in Figure 3 of the drawings, reference is first made to source routing load balancing as illustrated in Figure 1, and to hash-based load balancing as illustrated in Figure 2.

[0036] Referring now to Figure 1, a source host (Hl) 101 transmits two packets, 106a and 107a, to a destination host (H2) 102 via a network of routers (Rl, R2, R3, R4) 103. Each of the packets 106a, 107a comprises a plurality of header fields 104 and a plurality of header options 105 that specify the routing path.

[0037] The packet 106a specifies a path through routers R2, R3, and then to the destination host H2. Similarly, the packet 107a specifies a path through routers R4, R3, and then to the destination host H2. Responsive to receiving packet 106a, the router Rl forwards it as packet 106b, comprising the original pay load and header options 105 of the packet 106a, to the router R2. Likewise, responsive to receiving the packet 107a, the router Rl forwards it as packet 107b, comprising the original payload and header options 105 of the packet 106a, to the router R2. Mutatis mutandis, the routers R2, R3, and R4 each execute a same process, forwarding packets along the paths specified in the original header options 105 of the respective packets.

[0038] Referring now to Figure 2, a router 103 implements a hash-based path selection method 201. To operate, the hashbased path selection method 201 receives a plurality of header fields 104 of a network packet and a number of paths N 203 available for routing the network packet, applies a hash function to the plurality of header fields 104, and outputs a path index

[0039] 204 that may take one of N different values via which the network packet shall be forwarded.

[0040] In an example, a router 103 receives from Hl 101 a first packet 205 and a second packet 206, both comprising a same plurality of header fields 104. The packets 205 and 206 comprise different source port 208 values and thus represent different flows; preferably, the packets 205 and 206 shall be routed via two different paths 207. However, in this example a hash collision of a hash function computed at least in part based on the source port value 208 causes the router 103 to forward the two packets

[0041] 205 and 206 via a same path-1 207. Before explaining at least one embodiment of the invention in detail, it is to be understood that the invention is not necessarily limited in its application to the details of construction and the arrangement of the components and / or methods set forth in the following description and / or illustrated in the drawings and / or the Examples. The invention is capable of other embodiments or of being practiced or carried out in various ways.

[0042] Referring now to the drawings, Figure 3 illustrates the hybrid load balancing approach. According to some embodiments of the invention, a hybrid load balancing method 300 comprises a hash-based selection method 201 and a path offset update method 303. The hash-based path selection method 201 receives a number of paths N 203 available for routing the network packet and at least one of a first plurality of header fields 104 and a first plurality of metadata fields 301 of the network packet, applies a hash function to the first plurality of header fields 104 and the first plurality of metadata fields 301, and outputs an initial path index 302 that may take one of N different values. The path offset update method 303 in turn receives an initial path index 302, the number of paths N 203 and a plurality of path offset header fields 304, applies a path offset update function to the plurality of path offset header fields 304, and outputs a path index 305 that may take one of N different values.

[0043] Optionally, the plurality of path offset header fields 304 comprises at least one of a second plurality of header fields 104 and a second plurality of metadata fields 301

[0044] Optionally, the number of paths 203 is configurable on an applicable basis, including on a per-flow basis.

[0045] Optionally, the first and second plurality of headers fields 104 and the first and second plurality of metadata fields 301 are configurable.

[0046] Optionally, the path index 305 comprises an index in an auxiliary table comprising details of the paths 207.

[0047] Optionally, a network device such as a network switch or a router 103 implements the hybrid load balancing method

[0048] 300, and applies the method 300 to at least a part of network packets it receives to determine a respective path 207 to forward each network packet to.

[0049] Optionally, a computer device such as an application server implicitly selects a routing path 207 for a network packet it transmits by manipulating at least one of the second plurality of header fields 104 and the second plurality of metadata fields

[0050] 301. For example, the computer device may assign two or more consecutive values to a header field in two or more packets in a same flow, thereby causing the packets to be routed via different paths.

[0051] Optionally, the first plurality of header fields 104 comprises the 5-tuple of a packet.

[0052] Optionally, the first plurality of metadata fields 301 comprises at least one of a source interface, destination interface, and priority.

[0053] Optionally, the hash function comprises the Cyclic Redundancy Check (CRC) with a configurable seed, and is configured with a different seed value at each network device in a network.

[0054] Optionally, the second plurality of header fields 104 comprises exactly one field, and the second plurality of metadata fields 301 is empty. For example, the field may comprise an IPv6 flow label or a UDP source port.

[0055] Optionally, the path offset update function comprises summation of the initial path index 302 and a path offset header field 304, and a subsequent modulo division of the summation result by the number of paths 203: / ' = ( / + P) mod N. This enables the hybrid load balancing method 300 to produce two different path index values 305 P +j for every j < N, and enables a packet source to implicitly control a routing path 207 of a packet by manipulation of the path offset header field 304.

[0056] In an example illustrated in Figure 3, a source host 101 (Hl) transmits two packets 205 and 206, comprising two consecutive values of a UDP source port path offset header field 304, and identical values of the first plurality of header fields 104. In this example, the router 103 computes a same value of the initial path index 302 corresponding to path-1 207 for the both packets 205 and 206: however, as the UDP source port 304 comprises consecutive values 28 and 29, the path offset update function 303 outputs two consecutive values of path index 305, corresponding to path-2 and path-3 207.

[0057] Reference is now made to Figure 4, which is an illustration of a network polarization phenomenon, as found in the prior art, and network polarization resolution, according to some embodiments of the invention.

[0058] Some hash-based load balancing solutions found in the prior art, such as those comprising the folding hash function, provide a guarantee that when applied to a plurality of header fields 104 comprising a field possessing two consecutive values, the load balancing method outputs two different values corresponding to different paths 207. However, such solutions suffer from the polarization problem as illustrated hereinbelow.

[0059] In the example there are four flows Fl, F2, F3, and F4, originating from four different source hosts 101 and transmitted to four different destination hosts 102. The source hosts 101 use the UDP source port field 208 to select a routing path.

[0060] As illustrated in Figure 400a, if network devices 401 R1 and R2 use a same hash-based load balancing method using UDP source port for path 207 selection, then for all flows 402 reaching R2 the load balancing method at switch R2 outputs the same hash result, thereby forwarding all the flows 402 via a same path to R3, causing network polarization and leaving the path to R3 underutilized. To avoid network polarization, the network devices 401 may use a load balancing method based on a hash function possessing a configurable seed value, and each network device 401 may be configured with a different seed value. However, such a solution of the network polarization problem suffers from the hash collision problem as disclosed hereinabove. As illustrated in Figure 400b, if the network devices 401 use the disclosed hybrid load balancing method based on a hash function possessing a configurable seed value, and each network device 401 is configured with a different seed value, the network polarization problem does not arise.

[0061] The terms "comprises", "comprising", "includes", "including", “having” and their conjugates mean "including but not limited to".

[0062] The term “consisting of’ means “including and limited to”.

[0063] The term "consisting essentially of' means that the composition, method or structure may include additional ingredients, steps and / or parts, but only if the additional ingredients, steps and / or parts do not materially alter the basic and novel characteristics of the claimed composition, method or structure.

[0064] As used herein, the singular form "a", "an" and "the" include plural references unless the context clearly dictates otherwise. For example, the term "a compound" or "at least one compound" may include a plurality of compounds, including mixtures thereof.

[0065] It is appreciated that certain features of the invention, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features of the invention, which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable subcombination or as suitable in any other described embodiment of the invention. Certain features described in the context of various embodiments are not to be considered essential features of those embodiments, unless the embodiment is inoperative without those elements.

Claims

CLAIMS1. A processor-implemented method for hybrid load balancing in computer networks, comprising: receiving a network packet comprising at least one of: a first plurality of fields; and a second plurality of fields, wherein a field is one of a header field or a metadata field; computing an initial path index, based on a configured number of paths and a hash of the first plurality of fields; computing a path offset based on the second plurality of fields; and computing a final path index based on the initial path index, the path offset, and the configured number of paths.

2. The method according to claim 1 , wherein computing the final path index comprises summing the initial path index and the path offset.

3. The method according to claim 1, wherein computing the final path index comprises performing a XOR operation between the initial path index and the path offset.

4. A processor-implemented method for a balanced transmission of network packets, comprising: reading a configuration comprising a first plurality of fields and second plurality of fields, wherein a field is one of a header field or a metadata field; responsive to a client request to transmit one or more network packets, assigning values to the second plurality of fields of a first network packet; storing the assigned values in a computer-readable memory; transmitting the first network packet configured for routing via a first network path; incrementing at least one of the stored values and assigning the stored values to the second plurality of fields of a second network packet; and transmitting the second network packet configured for routing via a second network path.

5. A network device system, comprising: a plurality of network interfaces, each assigned at least one index; a processor configured to execute stored executable instructions; and a non-transitory computer readable medium storing executable instructions that, when executed by a processor, cause the computer system to perform a method of hybrid load balancing, the method comprising: receiving a network packet comprising at least one of: a first plurality of fields; and a second plurality of fields, wherein a field is one of a header field or a metadata field; computing an initial path index, based on a configured number of paths and a hash of the first plurality of fields; computing a path offset based on the configured number of paths and the second plurality of fields; computing a final path index based on the initial path index, the path offset, and the configured number of paths; and routing the network packet via a network interface assigned the final path index.6

Citation Information

Patent Citations

  • Multi-path transmission method, device, equipment, readable storage medium and program product

    CN117135114A

  • Load balancing configuration method and device, switch, storage medium and program product

    CN118158151A

  • Hash computation for network switches

    US10244047B1