Fast Flow Volume Estimation

Ran Ben-Basat, Gil Einziger, Roy Friedman

TL;DR

This paper introduces FAST, a novel family of algorithms for estimating network traffic volume in real-time. By utilizing a "semi-ordered" data structure, the authors achieve constant-time updates for weighted streams—a significant leap over previous logarithmic-time solutions—resulting in up to a 7X speedup and 100X memory reduction for complex monitoring tasks.

What Problem Does This Paper Address?

In modern networking, "packet counting" is no longer a reliable proxy for bandwidth usage. The rise of jumbo frames and variable-sized TCP packets means that a tiny fraction of packets (less than 1%) can account for over 25% of total traffic. To manage congestion, detect DDoS attacks, or implement fair routing, network tools must track flow volume (total bytes) rather than just the number of packets.

The technical challenge lies in speed. Traditional "heavy hitter" algorithms (like Space Saving) maintain a sorted list of flows. In an unweighted scenario (counting packets), an update only changes a flow's position by one, which is easy to manage in constant time. However, in a weighted scenario (counting bytes), a large packet can jump a flow's rank by thousands of positions. Maintaining a sorted order under these conditions typically requires logarithmic time (using heaps), which is too slow for the blistering line rates of modern data centers.

Methods

The authors propose three primary algorithms based on a new data structure called a Semi-Ordered Summary (SOS):

  1. FAST (Frequent items Algorithm with a Semi-structured Table): Instead of a perfectly sorted list, SOS groups flows into "volume groups" at a coarse granularity. Each flow entry stores a base volume ($C$) from its group and a small "Remainder" ($R$). This allows the algorithm to process updates in worst-case $O(1)$ time because a flow only needs to move a few groups at most, even with large weights.
  2. WFAST (Windowed FAST): This extends the approach to sliding windows, ensuring data freshness by "aging out" old traffic. It partitions the stream into frames and blocks, using a FAST instance for the current frame and a clever "overflow queue" to track heavy flows across the window.
  3. HFAST (Hierarchical FAST): This applies the FAST logic to Hierarchical Heavy Hitters (HHH), which aggregates traffic by IP prefixes (e.g., tracking an entire subnet rather than just one IP).

Datasets

The algorithms were evaluated using several diverse, real-world packet traces:

  • CAIDA Backbone Traces: Internet traffic from links in Chicago and San Jose (2013–2016).
  • University Datacenter (DC1): A trace from a large university network.
  • YouTube Access Trace: A dataset of 436,000 YouTube video accesses, where "weight" corresponds to video length.
  • Synthetic Traces: Used to test specific edge cases and performance bounds.

Key Insights and Ideas

  • The Power of "Good Enough" Ordering: The core "aha moment" is that you don't need a perfectly sorted list to identify heavy hitters. By relaxing the ordering constraint into coarse groups, you trade a tiny, bounded amount of accuracy for a massive gain in update speed.
  • Constant Time is King: By ensuring $O(1)$ update complexity, the authors make volume estimation viable for software-defined networking (SDN) and Network Function Virtualization (NFV) where CPU cycles are at a premium.
  • De-amortization for Smooth Performance: In the sliding window version (WFAST), the authors use de-amortized updates to ensure that no single packet arrival causes a massive "cleanup" spike, keeping latency consistent.

Key Results

  • Stream Processing: FAST demonstrated a 2.4X runtime improvement over the previous state-of-the-art (Space Saving with heaps).
  • Sliding Windows: WFAST achieved a staggering 100X reduction in memory compared to previous weighted window algorithms while improving runtime from logarithmic to constant.
  • Hierarchical Monitoring: HFAST provided an empirical 2.4X to 7X speedup in detecting hierarchical heavy hitters.
  • Optimality: The authors formally proved that FAST uses asymptotically optimal space for the error guarantees it provides.

Limitations and Future Work

While FAST is highly efficient, its accuracy and speed are tuned by a parameter ($\phi$). While the paper shows that increasing $\phi$ beyond a certain point has diminishing returns on speed, finding the "sweet spot" for a specific network's traffic distribution still requires some configuration.

The authors suggest that future work could involve deploying these algorithms in live anomaly detection systems and exploring their utility in mitigating sophisticated DDoS attacks where attackers hide within common IP prefixes. The source code has been released as open-source to encourage further community adoption.

Summary updated

BibTeX
@inproceedings{benbasat2018fast,
  author = {Ran Ben-Basat and Gil Einziger and Roy Friedman},
  title = {{Fast Flow Volume Estimation}},
  booktitle = {ICDCN},
  year = {2018},
  doi = {10.1145/3154273.3154332},
}
Figure