Proxy Caching for Streaming Media - PowerPoint PPT Presentation

About This Presentation
Title:

Proxy Caching for Streaming Media

Description:

Np proxies. video of length Lv. divide into Ns equal segments. Each proxy caches each segment with a/Np ... Cache segments in proxy do not changed over time ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 87
Provided by: compN
Category:

less

Transcript and Presenter's Notes

Title: Proxy Caching for Streaming Media


1
Proxy Caching for Streaming Media
2
You Are Here
3
Cache Proxies for Web
A
4
Hierarchical Caching
B
A
5
Cooperative Caching
A
B
6
Distributed Caching
A
B
7
Streaming Media vs. Webpage
8
Video Access Pattern
  • by S. Acharya and B. Smith in 1999
  • Study at Lulea University, Sweden
  • 55 complete, 45 stop very early
  • High temporal locality

9
Prefix Access Distribution
10
Video Popularity
  • Assume Zipf Law
  • Probability of access to i-th most popular video
    is

11
Benefits of Caching
12
Reduce Access Latency
)
(
13
Reduce Server Load
14
Reduce Start-up Latency
15
Hide Network Congestion
16
Other Issues
  • What to cache?
  • Who to fetch from?
  • When cache is full, who to kick out?
  • How to measure popularity?
  • Can cache adapt to popularity?

17
What to Cache?
18
Segmentation
  • Cache all or none is bad
  • Divide media file into segments and consider each
    segment individually

19
Effects of Size S
  • Large S Low utilization
  • Small S Lots of gaps

20
Prefix Caching Policy
  • 1 Chunk k segments

21
Caching Policy
  • Basic unit of caching segment
  • Cache prefix in chunk
  • Replace suffix in chunk
  • Never replace segments in curr chunk

22
Where To Fetch From?
23
Cooperative Caching
A
B
24
Fetch from server
Server
B
A
Client 2
Client 1
25
Fetch from fellow proxy
Server
B
A
Client 2
Client 1
26
Issues
  • How to advertise?
  • How to choose helper?

27
How to Advertise?
  • Balance between
  • network load
  • freshness of information

28
Scalable Advertisement
  • Expanding Ring Advertisement

TTL PERIOD
16 1 32 2 64 4 128 8
29
How to Choose Helper?
  • Consideration for Static Cache
  • network distance (1,2,3,4)
  • number of streams being served
  • avoid frequent switches
  • Build a cost function, integrating the metrics

30
Cost Function
  • Cost for retrieving a segment from node X to node
    Y

31
Algorithm
  • Consider the next gap in local caches
  • Find the next helper with minimum cost, and can
    fill in at least k segments in gaps

32
Distributed Caching
  • Y. Chae et. al.
  • JSAC 2000

33
Cooperative vs Distributed
  • Cooperative caching caches independently
  • Distributed caching caches as a team

34
Cold Start
Server
B
A
new clip!
35
Segment Map
  • Local segment map
  • Which segment I should cache?
  • Global segment map
  • Who is suppose to cache what?

36
Cache Hit
Server
B
A
37
Cache Miss
Server
B
A
38
Distributed Caching
Server
B
A
39
Problems
  • Who should cache what?
  • Which segment to kick out?
  • How to adapt segment distribution?

40
Who should cache what?
  • RCache scheme
  • Segment video into equal size segments
  • A proxy will cache each segment with some
    probability

41
RCache
  • Np proxies
  • video of length Lv
  • divide into Ns equal segments
  • Each proxy caches each segment with a/Np
    probability

42
Analysis
  • Probability that whole video is cached is

Ns num of segments Np num of
proxies a/Np prob of caching 1 segment
43
RCaches Segmentation
  • Video is divided into segments of equal length
  • Can we do better?

44
Bimodal Distribution
45
Silo
probability of storage
segment size
46
Further Improvement
probability of storage
segment size
47
Problems
  • Who should cache what?
  • Which segment to kick out?
  • How to redistribute data?

48
Segment Popularity
  • For each video i
  • For each segment j
  • F(i,j) Prob(i is accessed)Prob(j is accessed)

49
Rainbow Algorithm
less popular
50
Rainbow Algorithm
  • Problem
  • Many large video too many segments
  • computationally expensive to sort
  • Solution
  • Just approximate by quantizing popularity

51
Rainbow Algorithm
less popular
52
Problems
  • Who should cache what?
  • Which segment to kick out?
  • How to redistribute data?

53
Data Redistribution
  • When popularity changes, need to redistribute.
  • Redistribute on-demand (lazy)

54
Cache Token
  • Each segment have two bits
  • (T,C)
  • T I am suppose to have the segment
  • C I have the segment

55
Data Redistribution
  • (T1,C1)
  • (T0,C0)
  • (T1,C0)
  • (T0,C1)

56
Example
T0,C1
T0,C1
I
J
old
A
C
B
D
new
T1,C0
T1,C0
T1,C0
T1,C0
57
Example
T1,C1
T0,C1
I
J
old
A
C
B
D
new
T0,C0
T1,C0
T1,C0
T1,C0
58
Example
T1,C1
T1,C1
I
J
old
A
C
B
D
new
T0,C0
T1,C0
T1,C0
T0,C0
59
Example
T1,C1
T1,C1
I
J
old
A
C
B
D
new
T0,C0
T1,C1
T1,C0
T0,C0
60
Quality Adaptive Caching
  • Reza Rajaie et. al.
  • INFOCOM 2000

61
Scenario (10am)
Server
A
Client 2
62
Scenario (1am)
Server
A
Client 2
63
  • Problem
  • Cache interfere with congestion control algorithm
  • Solution
  • Make cache aware of quality adaptation

64
Solutions
  • Making cache quality-aware
  • Prefetch
  • Replacement Algorithm

65
Cache Miss
Server
A
Client 2
66
Cache Hit
Server
repair prefetch
A
Client 2
67
Peeking Inside the Cache
68
Cache Hit Repair
69
Cache Hit Prefetch
70
Prefetch Algorithm
playback point
prefetch window
71
Proxy Request to Server
  • Multiple requests (for different clients) are
    batched.

72
Server Response
  • Missing segments are sent in decreasing priority

3
4
2
1
73
Server Response
  • Send as many segments as possible until next
    prefetch request

74
Trade-offs
  • How far in the future should we prefetch?

75
Solutions
  • Making cache quality-aware
  • Prefetch
  • Replacement Algorithm

76
Goal of Replacement
  • Goal converge to efficient state
  • if a stream is popular
  • average quality is high
  • variation in quality is low

77
The Algorithm
78
Trashing and Locking
79
Choosing Victim
  • whit (weighted hit)
  • Tplay/Ttotal
  • Calculate whit for each layer in a stream over a
    popularity window

80
Example
81
Static Cache
  • Cache segments in proxy do not changed over time
  • Can we exploit further properties of streaming
    media?

82
Dynamic Caching
83
Motivating Scenario
  • t 0, R1 requests for stream M
  • t ?, R2 requests for stream M
  • Ideally, R1 and R2 should share a multicast of M

84

needs to be patched
share with R1 from cache
85
Using Dynamic Cache
  • R2 request stream M
  • Proxy allocate a ring buffer
  • Cache the most recent ?-seconds of M sent to R1
  • R2 get prefix of M from other places, and rest
    from proxy

86
Extending to N Receivers
Write a Comment
User Comments (0)
About PowerShow.com