Towards Latency Awareness for Content Delivery Network Caching

Gang Yan, Jian LiUSENIX ATC 2022 · OpenReview

TL;DR

This paper introduces LA-Cache, a novel latency-aware caching algorithm for Content Delivery Networks (CDNs) that specifically addresses the problem of "delayed hits." By modeling and accounting for the latency incurred by requests arriving while a content is being fetched, LA-Cache significantly reduces overall request latency, outperforming existing state-of-the-art methods.

What Problem Does This Paper Address?

Content Delivery Networks (CDNs) are crucial for delivering internet content efficiently by caching popular items closer to users, thereby reducing access latency. Traditional caching algorithms primarily focus on maximizing cache hits (i.e., finding content already in the cache). However, these algorithms often make a simplifying assumption: that all cache hits are instantaneous. This assumption breaks down in high-throughput systems where multiple requests for the same content can arrive in quick succession, even before the initial request has been fully served from the origin server. These are known as "delayed hits."

When a cache miss occurs, the content is fetched from the origin server, which takes a certain amount of time (fetching latency). If subsequent requests for the same content arrive during this fetching period, they are considered delayed hits. These requests don't experience the full latency of a cache miss, but they also don't get the zero latency of a true cache hit. Instead, they experience a latency somewhere in between, depending on when they arrived relative to the initial miss and the completion of the fetch. Existing caching algorithms, by ignoring this intermediate latency, can lead to suboptimal performance and higher overall user-perceived latency, especially in modern systems with high throughput and significant network latencies. This paper aims to bridge this gap by designing a caching strategy that is explicitly aware of and optimizes for these delayed hits.

Methods

The core of LA-Cache lies in a novel timer-based model designed to capture the impact of delayed hits. This model associates a timer with each content item, representing its fetching latency from the origin server. When a cache miss occurs for a content, a timer starts. Any requests for that content arriving before the timer expires are treated as delayed hits.

Based on this model, the authors derive a theoretical framework to calculate the expected mean latency for each content, considering both cache misses and delayed hits. This theoretical understanding leads to a simple ranking function that prioritizes content for caching. The ranking function balances the aggregated latency (latency from a miss plus any delayed hits) and the mean latency per request.

The proposed algorithm, LA-Cache, uses this ranking function to decide which content to keep in the cache. When the cache is full and a new item needs to be admitted, LA-Cache evicts the content with the lowest ranking score. To handle real-world scenarios where content sizes vary, the ranking function is further refined to incorporate content size. The authors also address the challenge of unknown content arrival rates by using a sliding window approach to estimate these rates.

Datasets

The authors evaluated their LA-Cache prototype using four real-world production traces from different Content Delivery Networks (CDNs):

  • CDN-A: A mix of web and video traffic.
  • CDN-B: Mobile video traffic from a live streaming system.
  • Bilibili: A Video-on-Demand (VoD) provider trace.
  • Wikipedia (Wiki): A trace from a node serving photos and media content.

These traces varied in size, content popularity distribution, and inter-arrival times, providing a robust testbed for evaluating the caching algorithms. The authors also generated synthetic traces with Poisson arrivals to compare against their theoretical model.

Key Insights and Ideas

  • Delayed hits are a significant performance bottleneck: The paper convincingly demonstrates that ignoring delayed hits leads to suboptimal caching performance, especially in modern high-latency, high-throughput systems.
  • Latency and hit rate are not always aligned: Optimizing for cache hits doesn't automatically translate to minimizing latency when delayed hits are present. LA-Cache prioritizes latency reduction, which can sometimes come at the cost of a slightly lower hit rate, but with a much better overall user experience.
  • A simple timer-based model is effective: The proposed timer-based model provides a theoretically sound and practical way to quantify the impact of delayed hits, forming the basis for an effective latency-aware caching strategy.
  • Burstiness matters: Content requests that arrive in bursts contribute disproportionately to latency. LA-Cache's ranking function implicitly prioritizes these bursty contents, leading to better latency performance.

Key Results

  • Significant Latency Reduction: LA-Cache consistently reduced average latency by 5%-15% compared to state-of-the-art algorithms across various traces and cache sizes. In their implementation with Apache Traffic Server, LA-Cache reduced overall average latency by 10% compared to unmodified ATS.
  • Robustness: LA-Cache showed consistent latency reduction across all tested traces, unlike some other algorithms that performed well only on specific datasets.
  • Model Accuracy: The theoretical model, even with the simplifying assumption of Poisson arrivals, showed good agreement with empirical results from real-world traces.
  • Low Overhead: The LA-Cache prototype introduced minimal implementation overhead, with no measurable throughput impact and only a slight increase in CPU utilization.
  • Improved True Hit Ratio: While primarily focused on latency, LA-Cache also showed improvements in the true hit ratio, up to 7%, and total hit ratio (true + delayed) up to 9%.

Limitations and Future Work

  • Poisson Arrival Assumption: While the model performs well in practice, it relies on the assumption of Poisson arrivals for theoretical analysis. The paper acknowledges that real-world traces do not strictly adhere to this. Future work could explore more sophisticated models for non-Poisson arrival processes.
  • Content Size Handling: The paper refines the ranking function to account for content size, but the initial model assumed equal content sizes. While addressed, further exploration into how varying content sizes interact with fetching latencies could be beneficial.
  • Strict Poisson Arrivals: The paper mentions that real-world traces do not have strict Poisson arrivals. While the model's empirical performance is good, further investigation into the impact of deviations from Poisson arrivals on the model's accuracy could be valuable.
  • Future Work: The authors suggest that their timer-based model and LA-Cache algorithm provide a strong foundation for designing future latency-aware caching systems. Further research could explore more complex network conditions and caching hierarchies.

Summary updated

BibTeX
@inproceedings{yan2022towards,
  author = {Gang Yan and Jian Li},
  title = {{Towards Latency Awareness for Content Delivery Network Caching}},
  booktitle = {USENIX ATC},
  year = {2022},
  url = {https://openreview.net/forum?id=qn5M3d7jgf},
}
Figure