Optimal Representations of a Traffic Distribution in Switch Memories

Yaniv Sadeh*, Ori Rottenstreich, Arye Barkan, Yossi Kanizo, Haim Kaplan

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

8 Scopus citations


Traffic splitting is a required functionality in networks, for example for load balancing over multiple paths or among different servers. The capacity of each server or path implies the distribution by which traffic should be split. A recent approach implements traffic splitting within the ternary content addressable memory (TCAM), which is often available in switches. It is important to reduce the amount of memory allocated for this task since TCAMs are power hungry and are often also required for other tasks such as classification and routing. For splitting a universe of ^{W}$ addresses into $k$ pieces of particular sizes, we give a simple algorithm that computes an optimal representation in $O(Wk)$ time. Furthermore, we prove that a recently published load balancer, called Niagara, which runs in $O(Wk\log k)$ time is in fact optimal. That is, both our algorithm and Niagara produce the smallest possible TCAM that splits the traffic exactly to the required pieces, where the only previously known algorithm for computing optimal exact representation has running time exponential in $k$. Finally, we use these optimal algorithms to experimentally study the number of TCAM rules required to split traffic in typical scenarios.

Original languageEnglish
Article number9032315
Pages (from-to)930-943
Number of pages14
JournalIEEE/ACM Transactions on Networking
Issue number2
StatePublished - Apr 2020


FundersFunder number
German Science Foundation
Israel National Cyber Directorate
Taub Family Foundation
Technion Hiroshi Fujiwara Cyber Security Research Center
Deutsche Forschungsgemeinschaft1367
German-Israeli Foundation for Scientific Research and Development
Israel Science Foundation1841-14, 1595-19
Tel Aviv University
Israel National Cyber Directorate
Technion Hiroshi Fujiwara Cyber Security Research Center


    • Computer network management
    • algorithms
    • data structures
    • packet switching


    Dive into the research topics of 'Optimal Representations of a Traffic Distribution in Switch Memories'. Together they form a unique fingerprint.

    Cite this