📦 CDN Caching: LRU vs LFU Under Real Zipf Traffic
Interactive 3D cache visualization where switching between LRU and LFU eviction policies under a simulated Zipf-distributed request stream compares resulting cache-hit rates live.
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.
🔬 What It Demonstrates
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.
🎮 How to Use
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.
💡 Did You Know?
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.
Interactive 3D edge-server network where feeding Zipf-distributed traffic through LRU versus LFU caching shows how cache hit rate diverges under real-world request patterns.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install