Caching in HTTP Adaptive Streaming: Friend or Foe? Danny Lee Ali C. Begen Constantine Dovrolis
Objectives What happens when a cache lies between a content server and client? What is the simplest scenario that results in bitrate oscillations? How can we prevent bitrate oscillations in the presence of caching? 2
Outline • Overview of adaptive streaming over HTTP • Oscillations due to interaction between cache and client • A traffic shaping solution • Simulation description • Experiments and Results • Conclusions 3
Outline • Overview of adaptive streaming over HTTP • Oscillations due to interaction between cache and client • A traffic shaping solution • Simulation description • Experiments and Results • Conclusions 4
Adaptive Streaming over HTTP 256 Kbps • Media is split into “segments”, 1.0 Mbps Media encoded in multiple bitrates 2.0 Mbps • Clients adaptively request segments 2.0 Mbps based on their Variable estimate of available bandwidth 256 Kbps 5
Outline • Overview of adaptive streaming over HTTP • Oscillations due to interaction between cache and client – How does it cause problems? • A traffic shaping solution • Simulation description • Experiments and Results • Conclusions 6
Caching – A Simple Model Origin Server to Cache Server to Cache Bandwidth Client Bandwidth C S C C Origin Server Cache Server Client • Caches may be deployed to reduce upstream bandwidth usage, and provide better downstream latency and bandwidth to clients • Media segments are transferred over HTTP, and may be cached in the cache server • For a cache in an access network, typically C S < C C 7
Erroneous Bandwidth Estimation due to Cache Hit 5 Mbps 1.6 Mbps Cache Cache 1.6 Mbps Request 1.6 Mbps 5 Mbps Request Request Hit Miss Origin Server Cache Server Client • Clients retrieving cached segments will receive them at C C – Causes an artificially high bandwidth estimation • But faster is better, right? 8
Bitrate Oscillations Origin Cache Client Server Server Problems arise Request Segment • with 1.5 Mbps bitrate when a mid- quality bitrate Cache Hit video is cached Return Segment Increase at 5.0 Mbps Typically, requested • Request Segment bitrate continuous with 2.0 Mbps bitrate segments are cached Cache Miss Request Segment with 2.0 Mbps bitrate Return Segment Clients switch at 1.6 Mbps Return Segment • between high at 1.6 Mbps Decrease and low quality requested Request Segment video every with 1.5 Mbps bitrate bitrate few seconds – annoying! Cache Hit Return Segment 9 at 5.0 Mbps
Outline • Overview of adaptive streaming over HTTP • Oscillations due to interaction between cache and client • A traffic shaping solution • Simulation description • Experiments and Results • Conclusions 10
Video Shaping Intelligent Cache (ViSIC) • Control the bitrates requested by the client by shaping the download speed – Prevent erroneous bandwidth estimates – Smooth fluctuations in available bandwidth • Cache Server Implementation – Independent of client and origin server – Reduce upstream bandwidth usage – Serve cached segments faster than no-cache 11
The Shaping Algorithm – High Level Description • Estimate C S and C C from all traffic passing through cache server • Select a target bitrate we want the client to use – Detect long duration changes in available bandwidth and allow increase/decrease in target bitrate – Otherwise favor bitrates of cached segments • Shape downloads C S , C C 1.5 Mbps plz from the cache – Use higher rate Ok, download than target bitrate at 1.9 Mbps 1.5 Mbps – But lower than what Cache Server segments Client Score! causes clients cached to switch rates 12
Outline • Overview of adaptive streaming over HTTP • Interaction between cache and client • A traffic shaping solution • Simulation description • Setup • Client and Standard Cache • Experiments and Results • Conclusions 13
Simulation Description – Setup Origin Server to Cache Server to Cache Bandwidth Client Bandwidth C S C C Origin Server Cache Server Client • Compare different Cache Server scenarios: ViSIC, Standard Cache and No-cache • We varied C S and C C • Representation Bitrates: 256 Kbps, 768 Kbps, 1.5 Mbps, 2.8 Mbps, 4.5 Mbps 14
Simulation Description – Client and Cache • Client – Simulates a typical adaptive streaming player – Adjusts requested bitrates based on average segment throughput – If video buffer level falls below a low threshold, engage “panic mode” • Standard Cache – Simulates a traditional Web cache – Cache hit: Serve files at maximum speed – Cache miss: Serve files at upstream speed 15
Outline • Overview of adaptive streaming over HTTP • Oscillations due to interaction between cache and client • A traffic shaping solution • Simulation description • Experiments and Results • Constant Bandwidth • Fluctuating Bandwidth • Conclusions 16
Constant Bandwidth 3.0 Requested Representation Bitrate (Mbps) 2.5 2.0 1.5 1.0 Available Bandwidth No-Cache 0.5 Standard Cache ViSIC 0.0 0 50 100 150 200 17 Time (seconds)
Fluctuating Bandwidth - ViSIC 4.5 Available Bandwidth Requested Representation Bitrate (Mbps) 4.0 ViSIC 3.5 3.0 BW Spikes w/ BW Drops w/ uncached 2.5 cached segments segments 2.0 BW Spikes w/ BW Drops 1.5 cached w/ uncached segments segments 1.0 0.5 0.0 0 100 200 300 400 500 18 Time (seconds)
Fluctuating Bandwidth – Stability 1.0 0.9 0.8 0.7 Instability Metric 0.6 No-Cache 0.5 Standard Cache 0.4 ViSIC 0.3 0.2 0.1 0.0 0 50 100 150 200 250 19 Segment Count
Outline • Overview of adaptive streaming over HTTP • Oscillations due to interaction between cache and client • A traffic shaping solution • Simulation description • Experiments and Results • Conclusions 20
Conclusions • A cache server in the path of an HTTP adaptive streaming client can cause problems – Bitrate oscillations, buffer draining • Cause: Cache hits cause erroneous bandwidth estimations – Clients overestimate actual path bandwidth – Clients request segments that are unsustainable • Traffic shaping at the cache can prevent oscillations and buffer drains – Maintains cache benefits over no-cache 21
Acknowledgments Ashok Narayanan Ashok presented the cache-induced instability problem at the Adaptive Media Transport Workshop, organized by Cisco, in June 2012 22
In Memory Of Saamer Akhshabi 1 April 1987 – 6 March 2014 23
Thanks 24
Typical Behavior of a Player • Estimates available bandwidth using running average of per-segment TCP throughput measurements • Adaptive segment bitrate selection – Increase if throughput is high (i.e., can support higher bitrate segments) – Decrease if throughput is lower than current bitrate (i.e., transfer is slower than real time) • Client buffer levels affect the state – “Panic mode” to recover from low buffer situation 25
Selecting the Target Bitrate – More Details (i) • By shaping the download speed, we can cause the client to select specific bitrates – Target Bitrate • Two possibilities: 1. Stay at current segment bitrate • Cache Hit: Avoid erroneous high-bandwidth estimation • Absorb short term C S bandwidth fluctuations • Guard against C S bandwidth decreases when serving cached segments 2. Change to bitrate supported by available path bandwidth • Allow client to adapt to long term bandwidth increases/decreases 26
Selecting the Target Bitrate – More Details (ii) Case I: When C S ≤ C C • For a cache hit – If C S has a long term increase, use current path bw – Else shape at current segment bitrate • For a cache miss – If C S has a long term increase or decrease, use current path bw – Else shape at current segment bitrate Case II: When C S > C C • Whether cache hit or miss – If C C has a long term increase, use current path bw – Else shape at current segment bitrate 27
The Shaping Algorithm - More Details • Make use of higher available bandwidth between cache server and client – Serve a segment at a higher speed than the target bitrate • Solution: 1. Select the next higher representation bitrate 2. Multiply it by a factor β (we used 0.9) • Shape at a higher speed than current bitrate but lower than the next higher representation – Make use of C S < C C – Better performance than No-Cache 28
The Shaping Algorithm - Example We have this much Representation Bitrates: 4.5 • C C bandwidth 256 Kbps, 768 Kbps, 4.0 1.5 Mbps, 2.8 Mbps, 4.5 Mbps 3.5 Client will switch up if we shape beyond this 3.0 C C : 4.0 Mbps • 2.5 We shape at this rate 2.0 Target Bitrate: 1.5 Mbps • 1.5 Shaped Bitrate: 1.0 We want the client • 0.9 * 2.8 Mbps = 2.52 Mbps to stay at this rate 0.5 0.0 Client will continue to request 0 50 100 • 1.5 Mbps segments, but Avail-BW Shaped Rate receive them at a higher rate! Target Bitrate Next Higher BR 29
Recommend
More recommend