Per-Flow and Per-Packet Load Balancing

Load balancing can work in per-flow mode or per-packet mode, irrespective of whether it is route load balancing, tunnel load balancing, or trunk load balancing.

Per-Flow Load Balancing

Per-flow load balancing classifies packets into different flows based on a certain rule, such as the IP 5-tuple (source IP address, destination IP address, protocol number, source port number, and destination port number). Packets of the same flow go over the same link.

On the network shown in Figure 1, R1 sends six packets, P1, P2, P3, P4, P5, and P6 in sequence to R2 over Link A and Link B in load balancing mode. P2, P3, and P5 are destined for R3; P1, P4, and P6 are destined for R4. If per-flow load balancing is used, packets destined for R3 can go over Link A, and packets destined for R4 can go over Link B. Alternatively, packets destined for R3 can go over Link B, and packets destined for R4 can go over Link A.

Figure 1 Per-flow load balancing networking

Symmetric Load Balancing

Symmetric load balancing is a special type of per-flow load balancing.

Symmetric load balancing distinguishes data flows based on the source and destination IP addresses of packets so that data of the same flow is transmitted over the member link with the same serial number on two connected devices.

As shown in Figure 2, router R1 forwards data of a bidirectional flow over link A to router R2. R2 obtains the index of link A by interchanging the source and destination IP addresses carried in the packets. The reverse traffic (traffic from R2 to R1) is hashed over the same link (link A) to R1.

Figure 2 Networking diagram for symmetric load balancing

Symmetric load balancing guarantees the data sequence but not the bandwidth usage.

Per-Packet Load Balancing

Per-packet load-balancing means that the device sends packets in sequence alternately over the links used for load balancing, as shown in Figure 3. Load is evenly distributed over the links.

Figure 3 Per-packet load balancing networking

Comparison Between Per-Flow and Per-Packet Load Balancing

Per-packet load balancing balances traffic more equally than per-flow balancing. Load balancing rules and service flow characteristics determine whether load can be equally balanced in per-flow load balancing. In many practical cases, per-flow load-balancing can have unequal link utilization.

In per-packet load balancing, packets may arrive out of order due to the following causes:

  • Links are of poor transmission quality. Delay, packet loss, or error packets may occur when the link quality is poor.
  • Packets are of varied sizes. When packets of different sizes are transmitted over the same link, under circumstances of a steady transmission rate, small-sized packets may arrive at the peer first even though they are sent later than large-sized packets. Therefore, check whether packet disorder is tolerable and the links have the mechanism of keeping the original transmission sequence on the live network before using per-packet load balancing.

As per-packet load balancing may cause packet disorder, it is not recommended for key services that are sensitive to packet sequence, such as voice and video services.

By default, the load balancing modes of the traffic on control plane and forwarding plane are per-flow.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >