Web Caching based on: Web Caching , Geoff Huston Web Caching and - - PDF document

web caching
SMART_READER_LITE
LIVE PREVIEW

Web Caching based on: Web Caching , Geoff Huston Web Caching and - - PDF document

Web Caching based on: Web Caching , Geoff Huston Web Caching and Zipf-like Distributions: Evidence and Implications , L. Breslau, P. Cao, L. Fan, G. Phillips, S. Shenker On the scale and performance of cooperative Web proxy caching ,


slide-1
SLIDE 1

Page 1 of 24

Web Caching

Web Caching

based on:

✗ Web Caching, Geoff Huston ✗ Web Caching and Zipf-like Distributions:

Evidence and Implications, L. Breslau, P. Cao, L. Fan, G. Phillips, S. Shenker

✗ On the scale and performance of

cooperative Web proxy caching, A. Wolman, G. Voelker, N. Sharma, N. Cardwell, A. Karlin, H. Levy

slide-2
SLIDE 2

Page 2 of 24

Web Caching

Hypertext Transfer Protocol (HTTP)

based on an end-to-end model (the network is a passive element) Pros:

✗ The server can modify the content; ✗ The server can track all content requests; ✗ The server can differentiate between

different clients;

✗ The server can authenticate the client.

Cons:

✗ Popular servers are under continuous high

stress

✗ high number of simultaneously opened

connections

✗ high load on the surrounding network ✗ The network may not be efficiently utilized

slide-3
SLIDE 3

Page 3 of 24

Web Caching

Why Caching in the Network?

✔ reduce latency by avoiding slow links between

client and origin server

✗ low bandwidth links ✗ congested links ✔ reduce traffic on links ✔ spread load of overloaded origin servers to

caches

slide-4
SLIDE 4

Page 4 of 24

Web Caching

Caching points

✔ content provider (server caching) ✔ ISP ✗ more than 70% of ISP traffic is Web based; ✗ repeated requests at about 50% of the traffic; ✗ ISPs interested in reducing the transmission

costs;

✗ provide high quality of service to the end

users.

✔ end client

slide-5
SLIDE 5

Page 5 of 24

Web Caching

Caching Challenges

✔ Cache consistency ✗ identify if an object is stale or fresh ✔ Dynamic content ✗ caches should not store outputs of CGI

scripts (Active Cache?)

✔ Hit counts and personalization ✔ Privacy concerned user ✗ how do you get a user to point to a cache ✔ Access control ✗ legal and security restrictions ✔ Large multimedia files

slide-6
SLIDE 6

Page 6 of 24

Web Caching

Web cache access pattern - (common

thoughts)

✔ the distribution of page requests follows a

Zipf-like distribution: the relative probability

  • f a request for the i-th most popular page is

proportional to with

✔ for an infinite sized cache, the hit-ratio grows

in a log-like fashion as a function of the client population and of the number of requests

✔ the hit-ratio of a web cache grows in a log-like

fashion as a function of cache size

✔ the probability that a document will be

referenced requests after it was last referenced is roughly proportional to (temporal locality) 1 iα ⁄ α 1 ≤ k 1 k ⁄

slide-7
SLIDE 7

Page 7 of 24

Web Caching

Web cache access pattern - (P. Cao

Observations)

✔ distribution of web requests follow a a Zipf-

like distribution (fig. 1)

✔ the 10/90 rule does not apply to web accesses

(70% of accesses to about 25%-40% of the documents) (fig. 2)

✔ low statistical corellation between the

frequency that a document is accessed and its size (fig. 3)

✔ low statistic correlation between a document’s

access frequency and its average modifications per request.

✔ request distribution to servers does not follow

a Zipf law.; there is no single server contributing to the most popular pages (fig. 5) α 0.64 0.83 , ∈

slide-8
SLIDE 8

Page 8 of 24

Web Caching

Implications of Zipf-like behavior

✔ Model: ✗ A cache that receives a stream of requests ✗ N = total number of pages in the universe ✗

= probability that given the arrival of a page request, it is made for page

✗ Pages ranked in order of their popularity,

page i is the i-th most popular

✗ Zipf-like distribution for the arrivals:

,

✔ ✗ no pages are invalidated in the cache.

PN i ( ) i i 1 N , = ( ) , PN i ( ) Ω iα ⁄ = Ω 1 iα ⁄

i 1 = N

      1

=

slide-9
SLIDE 9

Page 9 of 24

Web Caching

Implications of Zipf-like behavior

infinite cache, finite request stream: finite cache, infinite request stream: page request interarrival time: H(R) = hit ratio d(k) = probability distribution that the next request for page iis followed by k-1 requests for pages other than i H R ( )

Ω 1 α – ( ) ⁄ ( ) RΩ ( )1 α

⁄ 1 –

= α 1 < < ( ) , Ω ΩR ( ) log = α 1 = ( ) ,

H C ( )

C1

α –

= α 1 < < , C log = α 1 = ( ) ,

d k ( ) 1 k N log

  • 1

1 N N log

    k 1 1 N log

    k –     ≈

slide-10
SLIDE 10

Page 10 of 24

Web Caching

Cache Replacement Algorithms (fig. 9)

✔ GD-Size: ✗ performs best for small sizes of cache. ✔ Perfect-LFU ✗ performs comparably with GD-Size in hit-

ratio and much better in byte hit-ratio for large cache sizes.

✗ drawback: increased complexity ✔ In-Cache-LFU ✗ performs the worst

slide-11
SLIDE 11

Page 11 of 24

Web Caching

Web document sharing and proxy caching

✔ What is the best performance one could

achieve with “perfect” cooperative caching?

✔ For what range of client populations can

cooperative caching work effectively?

✔ Does the way in which clients are assigned to

caches matter?

✔ What cache hit rates are necessary to achieve

worthwhile decreases in document access latency?

slide-12
SLIDE 12

Page 12 of 24

Web Caching

For what range of client populations can cooperative caching work effectively?

✔ for smaller populations, hit rate increases

rapidly with population (cooperative caching can be used effectively)

✔ for larger population cooperative caching is

unlikely to bring benefits Conclusion:

✔ use cooperative caching to adapt to proxy

assignments made for political or geographical reasons.

5000 10000 15000 20000 25000 30000

Population

10 20 30 40 50 60 70 80 90

Request Hit Rate (%)

Ideal (UW) Cacheable (UW) Ideal (MS) Cacheable (MS)

slide-13
SLIDE 13

Page 13 of 24

Web Caching

Object Latency vs. Population

✔ Latency stays unchanged when population

increases

✔ Caching will have little effect on mean and

median latency beyond very small client population (?!)

5000 10000 15000 20000

Population

500 1000 1500 2000

Object Latency (ms)

Mean No Cache Mean Cacheable Mean Ideal Median No Cache Median Cacheable Median Ideal

slide-14
SLIDE 14

Page 14 of 24

Web Caching

Byte Hit Rate vs. Population

✔ same knee at about 2500 clients ✔ shared documents are smaller

5000 10000 15000 20000

Population

10 20 30 40 50 60

Byte Hit Rate (%)

Ideal Cacheable

slide-15
SLIDE 15

Page 15 of 24

Web Caching

Bandwith vs. population

✔ while caching reduces bandwidth consumption

there is no benefit to increased client population.

5000 10000 15000 20000

Population

1 2 3 4 5

Mean Bandwidth (Mbits/s)

No Cache Cacheable Ideal

slide-16
SLIDE 16

Page 16 of 24

Web Caching

Proxies and organizations

✔ there is some locality in organizational membership, but the impact is

not significant

978 735 480 425 392 337 251 246 239 228 222 219 213 200 192

15 Largest Organizations

10 20 30 40 50 60 70 80 90 100

Hit Rate (%)

Ideal Cooperative Ideal Local Cacheable Cooperative Cacheable Local 978 735 480 425 392 337 251 246 239 228 222 219 213 200 192

15 Largest Organizations

10 20 30 40 50 60 70

Hit Rate (%)

UW Random

slide-17
SLIDE 17

Page 17 of 24

Web Caching

Impact of larger population size

✔ unpopular documents are universally

unpopular => unlikely that a miss in one large group of population to get a hit in another group.

UW Ideal UW Cacheable MS Ideal MS Cacheable 20 40 60 80 100

Hit Rate (%)

Cooperative Local

slide-18
SLIDE 18

Page 18 of 24

Web Caching

Performance of large scale proxy caching - model

✔ N = clients in population ✔ n = total number of documents ((aprox. 3.2

billions)

✔ pi = fraction of all requests that are for the i-th

most popular document ( , )

✔ exponential distribution of the requests done

by client with parameter , where = 590 reqs/day = average client request rate

✔ exponential distribution of time for document

change, with parameter (unpopular document days, popular documents days)

✔ pc = 0.6 = probability that the documents are

cacheable

✔ E(S) = 7.7KB = avg. document size ✔ E(L) = 1.9 sec = last-byte latency to server

pi 1 iα

α 0.8 = λN λ µ µu 1 186 ⁄ = µp 1 14 ⁄ =

slide-19
SLIDE 19

Page 19 of 24

Web Caching

Hit rate, latency and bandwidth

Hit rate = f(Population) has three areas:

✔ 1. the request rate too low to dominate the rate

  • f change for unpopular documents

✔ 2. marks a significant increase in the hit rate of

the unpopular documents

✔ 3. the request rate is high enough to cope with

the document modifications Latency Bandwidth

10^2 10^3 10^4 10^5 10^6 10^7 10^8

Population (log)

20 40 60 80 100

Cacheable Hit Rate (%)

Slow (14 days, 186 days) Mid Slow (1 day, 186 days) Mid Fast (1 hour, 85 days) Fast (5 mins, 85 days)

latreq 1 HN – ( ) E L ( ) ⋅ HN lathit ⋅ + = BN HN E S ( ) ⋅ =

slide-20
SLIDE 20

Page 20 of 24

Web Caching

Document rate of change

Proxy cache hit is very sensitive to the change rates of both popular and unpopular documents with a decrease on the time scales at which hit rate is sensitive once the size of the population increases.

1 min 2 5 10 30 1 hour 2 6 12 1 day 2 7 14 30 180

Change Interval (log)

20 40 60 80 100

Cacheable Hit Rate (%)

mu_p mu_u A B C

1 min 2 5 10 30 1 hour 2 6 12 1 day 2 7 14 30 180

Change Interval (log)

20 40 60 80 100

Cacheable Hit Rate (%)

mu_p mu_u A B C

slide-21
SLIDE 21

Page 21 of 24

Web Caching

Comparing cooperative caching scheme

Three types of cache schemes: hierarchical, hash based and summary caches; Conclusions:

✔ the achievable benefits in terms of latency are

achieved at the level of city-level cooperative caching;

✔ a flat cooperative scheme is no longer effective

if the served area increases after a limit

✔ in a hierarchical caching scheme the higher

level might be a bottleneck in serving the requests.

slide-22
SLIDE 22

Page 22 of 24

Web Caching

Hierarchical Caching (Squid):

✔ a hierarchy of k levels ✔ a client request is forwarded up in the

hierarchy until a cache hit occurs.

✔ a copy of the requested object is then stored in

all caches of the request path

slide-23
SLIDE 23

Page 23 of 24

Web Caching

Hash-based caching system:

✔ assumes a total of m caches cumulatively

serving a population of size N

✔ upon a request for an URL the client

determines the cache in charge and forwards the request to it.

✔ if the cache has the URL the page is returned

to the client, otherwise the request is forwarded to the server

slide-24
SLIDE 24

Page 24 of 24

Web Caching

Directory based system (Summary cache)

✔ a total of m caches serving cumulatively a

population of size N

✔ the population is partitioned into

subpopulations of size N/m and each population is served by a single cache

✔ each cache maintains a directory that

summarizes the documents stored at each of the other cache in the system

✔ when a client request can not be served by a

local cache, it is randomly forwarded to a cache which is registered to have the

  • document. If no document has the document

the request is forwarded to the original server