860 likes | 891 Views
Cache Me If You Can. Encoder. Decoder. Middlebox. Receiver. Sender. Network. You Are Here. Cache Proxies for Web. A. Hierarchical Caching. B. A. Cooperative Caching. A. B. Distributed Caching. A. B. Streaming Media vs. Web Pages. Video Access Pattern.
E N D
Encoder Decoder Middlebox Receiver Sender Network You Are Here NUS.SOC.CS5248 OOI WEI TSANG
Cache Proxies for Web A NUS.SOC.CS5248 OOI WEI TSANG
Hierarchical Caching B A NUS.SOC.CS5248 OOI WEI TSANG
Cooperative Caching A B NUS.SOC.CS5248 OOI WEI TSANG
Distributed Caching A B NUS.SOC.CS5248 OOI WEI TSANG
Streaming Media vs. Web Pages NUS.SOC.CS5248 OOI WEI TSANG
Video Access Pattern • by S. Acharya and B. Smith • Study at Lulea University, Sweden • 55% complete, 45% stop very early • High temporal locality NUS.SOC.CS5248 OOI WEI TSANG
Bimodal Distribution NUS.SOC.CS5248 OOI WEI TSANG
Zipf Distribution log (Frequency) Frequency = C/rankm log (rank) NUS.SOC.CS5248 OOI WEI TSANG
Zipf Law • Frequency of English Words “the” “of” “to” “a” • City size NUS.SOC.CS5248 OOI WEI TSANG
Reduce Access Latency :) :( NUS.SOC.CS5248 OOI WEI TSANG
Reduce Server Load NUS.SOC.CS5248 OOI WEI TSANG
Buy Some Time NUS.SOC.CS5248 OOI WEI TSANG
Reduce Client Buffer Size NUS.SOC.CS5248 OOI WEI TSANG
Types of Cache • Static caching • Dynamic caching • patching buffer NUS.SOC.CS5248 OOI WEI TSANG
Static Caching • Cache “all or nothing” is bad • Split video into segments of size S NUS.SOC.CS5248 OOI WEI TSANG
If I am writing a survey • Introduction • Differences between web and media caching • Video access pattern • Benefits of caching • Different type of cache • Proxy caching architecture NUS.SOC.CS5248 OOI WEI TSANG
Other Caching Issues • How to segment? • Which segments to cache? • When to fetch data? • Who to fetch from? • When cache is full, who to kick out? • How to measure popularity? • Can cache adapt to popularity? NUS.SOC.CS5248 OOI WEI TSANG
Rest of the Lecture • Soccer – cooperative caching proxy • Silo, rainbow and cache token – distributed caching proxy • Mocha – with congestion control NUS.SOC.CS5248 OOI WEI TSANG
SOCCER Self-organizing cooperative caching architecture
How to segment? NUS.SOC.CS5248 OOI WEI TSANG
Effects of Size S • Large S : Low utilization • Small S : Lots of gaps NUS.SOC.CS5248 OOI WEI TSANG
Prefix Caching Policy • 1 Chunk = k segments NUS.SOC.CS5248 OOI WEI TSANG
Fetching Cache Data Server B A Client 1 Client 2 NUS.SOC.CS5248 OOI WEI TSANG
Option 2 Server B A Client 1 Client 2 NUS.SOC.CS5248 OOI WEI TSANG
Option 3 Server B A Client 1 Client 2 NUS.SOC.CS5248 OOI WEI TSANG
Issues • How to advertise? • How to choose helper? NUS.SOC.CS5248 OOI WEI TSANG
How to Advertise? • Balance between • network load • freshness of information NUS.SOC.CS5248 OOI WEI TSANG
Scalable Advertisement • Expanding Ring Advertisement 16 32 64 128 NUS.SOC.CS5248 OOI WEI TSANG
How to Choose Helper? • Consideration for Static Cache • network distance (1,2,3,4) • number of streams being served NUS.SOC.CS5248 OOI WEI TSANG
Static Cache • Cost for retrieving data from node X to node Y = NUS.SOC.CS5248 OOI WEI TSANG
Dynamic Caching • Need to consider the size of patching buffer S NUS.SOC.CS5248 OOI WEI TSANG
Dynamic Caching • Nused • Nfetched = min(s, Nused + Δ) S NUS.SOC.CS5248 OOI WEI TSANG
Dynamic Cache • Potential Waste = Nfetched/Nused • Integrate into overall cost NUS.SOC.CS5248 OOI WEI TSANG
Helper Selection • Helper ask other helpers to help if segments not found on local cache • Pick lowest cost helper NUS.SOC.CS5248 OOI WEI TSANG
If Static Cache • Retrieve to fill current gap • May pick different helpers for different gaps • Should avoid frequent switching NUS.SOC.CS5248 OOI WEI TSANG
If Dynamic Cache • Stick to one helper NUS.SOC.CS5248 OOI WEI TSANG
Evaluations Single Proxy Hierarchical Proxies SOCCER NUS.SOC.CS5248 OOI WEI TSANG
Distributed Caching Server B A new clip! NUS.SOC.CS5248 OOI WEI TSANG
Distributed Caching Server B A NUS.SOC.CS5248 OOI WEI TSANG
Distributed Caching Server B A NUS.SOC.CS5248 OOI WEI TSANG
Distributed Caching Server B A NUS.SOC.CS5248 OOI WEI TSANG
Cooperative vs Distributed • Cooperative caching caches independently • Distributed caching caches as a team NUS.SOC.CS5248 OOI WEI TSANG
Problems • Who should cache what? • Which segment to kick out? • How to redistribute data? NUS.SOC.CS5248 OOI WEI TSANG
RCache • Np proxies • video of length Lv • divide into Ns equal segments • Each proxy caches each segment with a/Np probability NUS.SOC.CS5248 OOI WEI TSANG
Analysis • Probability that whole video is cached • Storage requirement aL NUS.SOC.CS5248 OOI WEI TSANG