Skip to content

An Autonomous Power-of-Two-Choices Layer-4 Load Balancer for Programmable Switching ASICs

Ting-Ching Hung, Chien Chen, Jyh-Cheng Chen

cs.NI

Abstract

Switch-based Layer-4 load balancers achieve line rate by hashing the five-tuple to a backend, but a hash cannot observe how long a flow lives or how many sessions a server already carries. Under the heavy-tailed flow sizes of datacenters this produces persistent imbalance. Least-connection-first selection removes it, but a fixed-function match-action pipeline cannot scan n counters in one pass, so published P4 designs such as LCF and DPPLCF delegate the choice to a controller and inherit its throughput ceiling. This paper presents Po2C, a family of power-of-two-choices Layer-4 load balancers performing least-connection-style selection inside an Intel Tofino-1 pipeline: hardware random number generators draw backend indices, the pipeline reads their live session counters from parallel register arrays, and commits the connection to the lighter one in constant time; no packet on the forwarding path reaches the control plane. Po2C applies the textbook two-choice rule; two variants are measured against it. Across a prolonged hardware stress test driving web-search traffic from 100 to 10,000 connections per second, all three hold handshake success above 99.98 percent and per-connection consistency at 100.000 percent, and reach a peak-to-mean server load ratio of 1.010 against 1.145 for stateful hashing on the same switch. Relative to Po2C, the two variants move in opposite directions: Po2C-H (adding a memoized best to two samples) gains 0.0276 in Jain's Fairness Index (JFI) at 5.7 standard deviations above Po2C, whereas H-Best (replacing the second sample with the memoized best) loses 0.0301 in JFI at 6.2 standard deviations below Po2C. Sampling breadth, not retained state, does most of the fairness work; H-Best trades part of that margin for twice the connection-table depth, a choice worth making when capacity rather than fairness is the binding constraint.

Create a lesson

Metadata

Categories
cs.NI, cs.DC
Comments
15 pages, 9 figures. Submitted to IEEE Access