Traffic Load Balancing
This topic briefly describes the traffic load balancing feature and its configuration on the QFX5220, QFX5230, QFX5240, and QFX5241 Switches.
Traffic load balancing distributes network traffic across multiple servers or virtual machines to prevent any single server from experiencing downtime. Load balancing ensures high availability, reliability, and scalability of network resources. The different types of traffic load balancing are discussed in the following sections.
Hash-Based (or Flow-Based) Load Balancing
The QFX Series Switches use hash-based load balancing algorithms to distribute and monitor data traffic across links to avoid any congestion. If a packet arrives out of order, it is dropped and retransmission is requested. You can configure hash-based load balancing through equal-cost multipath (ECMP) for BGP.
To configure hash-based load balancing:
set protocols bgp multipath multiple-as set protocols bgp group group multipath set routing-options forwarding-table export loadbal set policy-options policy-statement loadbal then load-balance consistent-hash
For more information about how to configure hash-based load balancing through ECMP, see Configure IPv4 Static Routing.
Dynamic Load Balancing
In addition to static load balancing, QFX Series Switches also support dynamic load balancing (DLB). DLB is similar to static load balancing, but it also monitors the local ports to know how much buffer each port has. It then redirects the data traffic to the port that has maximum buffer.
To configure DLB on your QFX Series Switches, run the following commands in your CLI at the
[edit] hierarchy level:
set forwarding-options enhanced-hash-key ecmp-dlb flowlet set forwarding-options enhanced-hash-key ecmp-dlb flowlet inactivity-interval value set forwarding-options enhanced-hash-key ecmp-dlb flowlet flowset-table-size value
Run this code block on each device. For more information about how to configure DLB, see Dynamic Load Balancing.
To verify DLB configuration on your switch:
show forwarding-options enhanced-hash-key
Selective Dynamic Load Balancing (Not Supported on QFX5220)
Based on dynamic load balancing, selective when combined with Flexible Match Firewall Filter enables you to apply filters on some of the data flows selected by you.
To configure selective DLB with flexible match firewall filter, run the following commands
in your CLI at the [edit] hierarchy level:
set firewall family inet filter FILTER-NAME term TERM-NAME from flexible-match-range match-start MATCH-START set firewall family inet filter FILTER-NAME term TERM-NAME from flexible-match-range byte-offset BYTE-OFFSET set firewall family inet filter FILTER-NAME term TERM-NAME from flexible-match-range bit-length BIT-LENGTH set firewall family inet filter FILTER-NAME term TERM-NAME from flexible-match-range range RANGE-VALUE set firewall family inet filter FILTER-NAME term TERM-NAME then dynamic-load-balance enable set firewall family inet filter FILTER-NAME term TERM-NAME then count COUNTER-NAME set interfaces INTERFACE-NAME unit UNIT-NUMBER family inet filter input FILTER-NAME
For more information about selective DLB and its configuration, see Selective Dynamic Load Balancing (DLB).
Global Load Balancing
In addition to dynamic load balancing, the QFX5240 and QFX5241 switches also support global load balancing. In case of global load balancing, the spine platform monitors the local port buffers and also sends a signal to the leaf platform with the port buffer status of the platform. The leaf decides the travel path on the basis of its buffer ports but also considers the buffer ports on the next hop, which is the spine platform. So, the global load balancing feature helps the leaf device decide on an end-to-end data travel path within the network fabric only.
To configure global load balancing on QFX5240 and QFX5241 switches:
-
On spine devices, run the following commands in
helper-onlymode.set protocols bgp global-load-balancing helper-only set forwarding-options enhanced-hash-key ecmp-dlb flowlet | per-packet
-
On leaf devices, run the following commands in
load-balancer-onlymode.set protocols bgp global-load-balancing load-balancer-only set forwarding-options enhanced-hash-key ecmp-dlb flowlet | per-packet
For more information about global load balancing and its configuration, see Global Load Balancing.
RDMA-Aware Load Balancing
Even though remote direct memory access (RDMA)-aware load balancing is supported on the QFX5220, QFX5230, QFX5240, and QFX5241 switches, we recommend that you enable this feature on the QFX5240 and QFX5241 switches only. The QFX5240 and QFX5241 switches monitor data traffic from one NIC to another, where the switches assign buffer for each data flow from end to end all the way to the NIC. This feature is known as queue-pair hashing, pinning, or binding. For information about how to configure RDMA-aware load balancing on QFX Series Switches, see Fabric Spine and Leaf Nodes Configuration.
For more information about queue-pair hashing configuration, see Queue-Pair Hashing for RDMA Flows.