Top Banner
Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel
30

Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Mar 31, 2015

Download

Documents

Beau Winne
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Squirrel: A peer-to-peer web cache

Sitaram Iyer

Joint work with Ant Rowstron (MSRC)

and Peter Druschel

Page 2: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Peer-to-peer Computing

Decentralize a distributed protocol:– Scalable

– Self-organizing

– Fault tolerant

– Load balanced

Not automatic!!

Page 3: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Web Caching

1. Latency, 2. External bandwidth, 3. Server load.

ISPs, Corporate network boundaries, etc.

Cooperative Web Caching: group of web caches tied together and acting as one web cache.

Page 4: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Web Cache

Browser

Browser

Browser

Cache

Browser

Cache

Centralized

Web Cache

Web

Server

Sharing!

LAN Internet

Page 5: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Decentralized Web Cache

Browser

Browser

Browser

Cache

Browser

Cache

Web

Server

LAN Internet

• Why?• How?

Page 6: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Why peer-to-peer ?

1. Cost of dedicated web cache No additional hardware

2. Administrative costsSelf-organizing

3. Scaling needs upgrading Resources grow with clients

4. Single point of failure Fault-tolerant by design

Page 7: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Setting

• Corporate LAN

• 100 - 100,000 desktop machines

• Single physical location

• Each node runs an instance of Squirrel

• Sets it as the browser’s proxy

Page 8: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Pastry

Peer-to-peer object location and routing substrate

Distributed Hash Table:reliably map an object key to a live node

Routes in log2b(N) steps

(e.g. 3-4 steps for 100,000 nodes, with b=16)

Page 9: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Home-store model

client

home

LAN Internet

URL hash

Page 10: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Home-store model

client

home

…that’s how it works!

Page 11: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Directory model

Client nodes always store objects in local caches.

Main difference between the two schemes: whether the home node also stores the object.

In the directory model, it only stores pointers to recent clients, and forwards requests to them.

Page 12: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Directory model

client

home

NetLAN

Page 13: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Directory model

client delegate

homerando

mentry

Page 14: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

(skip) Full directory protocol

dir

server

servere : cGET req

origin

origin

otherother

req

home

req

client

req

2

b : not-modified

3

e3

21c ,e : req

c ,e : object1

4a , d

2a , d : req 1a : no dir, go to origin. Also d2

3

1

not-modifiedobject or

dele-gate

Page 15: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Recap

• Two endpoints of design space, based on the choice of storage location.

• At first sight, both seem to do about as well. (e.g. hit ratio, latency).

Page 16: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Quirk

Consider a– Web page with many images, or– Heavily browsing node

In the Directory scheme,Many home nodes pointing to one

delegate

Home-store: natural load balancing.. evaluation on trace-based workloads ..

Page 17: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Trace characteristics

Redmond Cambridge

Total duration 1 day 31 days

Number of clients 36,782 105

Number of HTTP requests 16.41 million 0.971 million

Peak request rate 606 req/sec 186 req/sec

Number of objects 5.13 million 0.469 million

Number of cacheable objects 2.56 million 0.226 million

Mean cacheable object reuse 5.4 times 3.22 times

Page 18: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Total external bandwidth

85

90

95

100

105

0.001 0.01 0.1 1 10 100

Tot

al e

xter

nal b

andw

idth

(in G

B)

[

low

er is

bet

ter]

Per-node cache size (in MB)

Directory

Home-store

No web cache

Centralized cache

Redm

ond

Page 19: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Total external bandwidth

5.5

5.6

5.7

5.8

5.9

6

6.1

0.001 0.01 0.1 1 10 100

Tot

al e

xter

nal b

andw

idth

(in G

B)

[

low

er is

bet

ter]

Per-node cache size (in MB)

Directory

Home-store

No web cache

Centralized cache

Cam

bri

dg

e

Page 20: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

LAN Hops

0%

20%

40%

60%

80%

100%

0 1 2 3 4 5 6

Fra

ctio

n of

cac

heab

le r

eque

sts

Total hops within the LAN

Centralized Home-store Directory

Redm

ond

Page 21: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

LAN Hops

0%

20%

40%

60%

80%

100%

0 1 2 3 4 5

Fra

ctio

n of

cac

heab

le r

eque

sts

Total hops within the LAN

Centralized Home-store Directory

Cam

bri

dg

e

Page 22: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Load in requests per sec

1

10

100

1000

10000

100000

0 10 20 30 40 50

Num

ber

of s

uch

seco

nds

Max objects served per-node / second

Home-storeDirectory

Redm

ond

Page 23: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Load in requests per sec

1

10

100

1000

10000

100000

1e+06

1e+07

0 10 20 30 40 50

Num

ber

of s

uch

seco

nds

Max objects served per-node / second

Home-storeDirectory

Cam

bri

dg

e

Page 24: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Load in requests per min

1

10

100

0 50 100 150 200 250 300 350

Num

ber

of s

uch

min

utes

Max objects served per-node / minute

Home-storeDirectory

Redm

ond

Page 25: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Load in requests per min

1

10

100

1000

10000

0 20 40 60 80 100 120

Num

ber

of s

uch

min

utes

Max objects served per-node / minute

Home-storeDirectory

Cam

bri

dg

e

Page 26: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

Conclusion

Possible to decentralize web caching

Performance comparable to centralized cache

Is better in terms of cost, administration, scalability and fault tolerance.

Page 27: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

(backup) Storage utilization

Redmond Home-store Directory

Total 97641 MB 61652 MB

Mean per-node 2.6 MB 1.6 MB

Max per-node 1664 MB 1664 MB

Page 28: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

(backup) Fault tolerance

Home-store Directory

EquationsMean H/O

Max Hmax /O

Mean (H+S)/O

Max max(Hmax,Smax)/O

Redmond

Mean 0.0027%

Max 0.0048%

Mean 0.198%

Max 1.5%

Cambridge

Mean 0.95%

Max 3.34%

Mean 1.68%

Max 12.4%

Page 29: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

(backup) Full home-store protocol

server

client

otherother

req

home

req

req

a : object or notmod from home

b : object or notmod from origin3

1

b2

(WAN)(LAN)

origin

b : req

Page 30: Squirrel: A peer-to-peer web cache Sitaram Iyer Joint work with Ant Rowstron (MSRC) and Peter Druschel.

(backup) Full directory protocol

dir

server

servere : cGET req

origin

origin

otherother

req

home

req

client

req

2

b : not-modified

3

e3

21c ,e : req

c ,e : object1

4a , d

2a , d : req 1a : no dir, go to origin. Also d2

3

1

not-modifiedobject or

dele-gate