A CDN edge node can only hold a small fraction of the full content catalog. When a request arrives for an object already in cache, that's a hit — served instantly from the edge. When it isn't, that's a miss — the object must be fetched from origin and something already in the cache is usually evicted to make room. Real-world request traffic for popular content is famously skewed: it follows a Zipf distribution, where a small number of items (viral videos, hot API responses) receive a disproportionate share of all requests.
Because real web and video traffic follows Zipf-like popularity curves, CDN operators often blend LRU with frequency-aware variants (like W-TinyLFU or ARC) specifically to avoid "cache pollution" from one-off crawlers and bots evicting genuinely popular content.
A ring of cache slots sits at the edge of a simulated CDN node. A Zipf-distributed stream of content requests flies in as colored orbs, and you can switch the eviction policy live to compare how LRU and LFU cope with the same skewed traffic.
Real content demand is heavily skewed — a small share of items get most requests. LRU evicts the slot untouched the longest; LFU evicts the slot with the fewest total hits. Under high skew, LFU tends to hold onto "hot" items more reliably.
Toggle LRU/LFU, then adjust cache size, Zipf skew (α), catalog size and request speed. Watch cube colors, hit/miss flashes and the outer popularity histogram respond, and track the live hit-rate bar.
Production CDNs rarely use pure LRU or LFU — hybrids like W-TinyLFU and ARC blend recency and frequency signals specifically to resist cache pollution from one-off crawler traffic.