cdns and peer-to-peerweb.eecs.umich.edu/~zmao/eecs489/lectureslides/cdnp2p_single.pdf · mao f04 2...

67
1 Mao F04 CDNs and Peer-to-Peer EECS 489 Computer Networks http://www.eecs.umich.edu/~zmao/eecs489 Z. Morley Mao Tuesday Nov 9, 2004 Acknowledgement: Some slides taken from Kurose&Ross and Katz&Stoica

Upload: others

Post on 15-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

1Mao F04

CDNs and Peer-to-Peer

EECS 489 Computer Networkshttp://www.eecs.umich.edu/~zmao/eecs489

Z. Morley MaoTuesday Nov 9, 2004

Acknowledgement: Some slides taken from Kurose&Ross and Katz&Stoica

Page 2: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

2Mao F04

This Lecture

§ This will be a “why” lecture, not a “how to” one

§ Emphasis is on why these developments are important, and where the fit into the broader picture

§ TAs will fill in the technical details

Page 3: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

3Mao F04

Outline

§ Motivation: information sharing- what’s the role of peer-to-peer (P2P)?

§ Centralized P2P networks- Napster

§ Decentralized but unstructured P2P networks- Gnutella

§ Decentralized but structured P2P networks- Distributed Hash Tables

§ Implications for the Internet (speculative)

Page 4: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

4Mao F04

Information Sharing in the Internet

§ The Internet contains a vast collection of information (documents, web pages, media, etc.)

§ One goal of the Internet is to make it easy to share this information

§ There are many different ways this can be done...

Page 5: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

5Mao F04

In the beginning...

§ ...there was FTP

§ People put files on a server and allowed anonymous FTP- does anyone here remember anonymous FTP?

§ Only people who were explicitly told about the file would know to retrieve it

§ But it was a painful, command-line interface

Page 6: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

6Mao F04

The Early Web

§ The early web was essentially a GUI for anon ftp- URLs were easily distributed pointers to files- Browsers allowed one to easily retrieve files

§ Web pages could contain pointers to other files- not all downloads were result of being explicitly told

§ But information sharing was still mostly explicitly arranged- someone sent you a URL- and you bookmarked it

Page 7: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

7Mao F04

The Current Web

§ Search engines changed the web- long before your time....

§ Now one can proactively find the desired information, not just wait for someone to tell you about it

§ In the process, it became less important who was hosting the information (because they don’t need to tell you)- the nature of the content is all that matters now

Page 8: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

8Mao F04

Two Transitions

§ From push to pull:- old: people would tell others about information (push)- new: people can find information via google (pull)

§ From hosts to servers- anonymous ftp could run on anyone’s desktop- then migrated to specialized servers- the web almost exclusively uses servers- popular sites have to use big server farms

§ What about “pull” with “hosts”?- that’s peer-to-peer networking!

Page 9: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

9Mao F04

Why Is Pull/Host Relevant?

§ There are many pieces of content that:- are already widely replicated on many machines- people want, but don’t know where it is

§ Setting up a web site for all such content would:- attract huge amount of traffic- require sizable investment in server farm and

bandwidth

§ If we could harness the hosts that already have the content, we wouldn’t need a server farm!

§ But how do users know which host to contact?

Page 10: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

10Mao F04

Peer-to-Peer (P2P) Networking

§ Aims to use the bandwidth and storage of the many hosts- sum of access line speeds and disk space

§ But to use this collection of machines effectively requires coordination on a massive scale- key challenge: who has the content you are looking

for?

§ Moreover, the hosts are very flaky- behind slow links- often connected only a few minutes- so system must be very robust

Page 11: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

11Mao F04

Napster

§ Centralized search engine:- all hosts with songs register them with central site- users do keyword search on site to find desired song- site then lists the hosts that have the song- user then downloads content

§ What makes this work?- central site only has to handle searches: little bandwidth- vast collection of hosts can supply huge aggregate

bandwidth- system is self-scaling: more users means more resources

Page 12: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

12Mao F04

What Happened to Napster?

§ Fastest growing Internet application ever- P2P traffic became, and remains, one of the biggest

sources of traffic on the Internet!

§ But legal issues shut site down

§ Centralized system was vulnerable to legal attacks, and system couldn’t function without central site

§ Can one still do “pull” without central site?- that’s the hard question in peer-to-peer networking!

Page 13: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

13Mao F04

Gnutella

§ An example of an unstructured, decentralized P2P system

§ Context:- many hosts join a system- each offers to share its own content- in return, each can make queries for others content

§ Goal:- enable users to find desired content on other hosts

Page 14: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

14Mao F04

“Basic” Gnutella

§ Step one: form an overlay network- each host, when it joins, “connects” to several existing

Gnutella members- an “overlay” link is merely the fact that the nodes know

each other’s IP address, and thus can send each other packets

Page 15: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

15Mao F04

“Unstructured” Overlay

Gnutella is unstructured in two senses:§ Links between nodes are essentially random§ The content of each node is random (at least

from the perspective of Gnutella)

Implications:§ Can’t route on Gnutella§ Wouldn’t know where to route even if could

Page 16: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

16Mao F04

Querying in Gnutella

§ Queries are typically keyword searches

§ Each query is flooded within some scope- TTL is used to limit scope of flood- flooding means you don’t need any routing

infrastructure

§ All responses to queries are forwarded back along path query came from- path marked with breadcrumbs- gives a degree of privacy to requester

Page 17: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

17Mao F04

Gnutella Performance

§ Tradeoff:- if TTL is small, then searches won’t find desired

content- if TTL is large, network will get overloaded

§ Either Gnutella overloads network, or doesn’t provide good search results

Page 18: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

18Mao F04

Gnutella Enhancements

§ Supernodes:- normal nodes attach to supernodes, who search for them- only flood among well-connected supernodes

§ Random-walk rather than flooding- provides correct TTL automatically

§ Proactive replication- replicate content that is frequently queried, to make it easier

to find

Page 19: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

19Mao F04

In Reality

§ Gnutella++ works well enough- KaZaA, etc.

§ Why?- enhancements (supernodes)- query distribution

§ Most downloads are for widely-replicated content- Gnutella is good at finding the “hay”- But how would you find “needles”?

Page 20: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

20Mao F04

Finding Objects by Name

§ Assume you know the “name” of an object- song title, file name, etc.

§ Assume that there is one copy of this object in the system

§ Is there a way to store this object so that anyone can find it merely by knowing its name?

§ Sound familiar? Hash tables

Page 21: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

21Mao F04

Distributed Hash Tables (DHTs)

§ Hash Table- data structure that maps “keys” to “values”- essential building block in software systems

§ Distributed Hash Table (DHT) - similar, but spread across the Internet

§ Interface - insert(key, value)- lookup(key)

Page 22: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

22Mao F04

Usage

§ key = hash(name)- hash function is a deterministic function that is quasi-

random- gives uniform distribution of keys

§ Store by key

§ Retrieve by key

Page 23: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

23Mao F04

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

Page 24: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

24Mao F04

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

Page 25: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

25Mao F04

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

Operation: take key as input; route messages to node holding key

Page 26: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

26Mao F04

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

insert(K1,V1)

Operation: take key as input; route messages to node holding key

Page 27: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

27Mao F04

insert(K1,V1)

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

Operation: take key as input; route messages to node holding key

Page 28: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

28Mao F04

(K1,V1)

K V

K VK V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

Operation: take key as input; route messages to node holding key

Page 29: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

29Mao F04

retrieve (K1)

K V

K VK V

K V

K V

K V

K V

K V

K V

K V

K V

DHT: basic idea

Operation: take key as input; route messages to node holding key

Page 30: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

30Mao F04

DHT Designs

§ There are many DHT designs - invented in 2000, so they are quite new

§ I will present CAN, readings present others- details will be gone over by your TAs

§ But don’t worry about the details, focus on the general idea

§ In what follows, id or identifier is a key

Page 31: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

31Mao F04

General Approach to DHT Routing

§ Pick an identifier space- ring, tree, hypercube, d-dimensional torus, etc.

§ Assign node ids randomly in space- choose a “structured” set of neighbors

§ Assign objects ids (keys) randomly via hash function in space- Assign an object to node that is “closest” to it

§ When routing to an id, pick neighbor which is closest to id- if neighbor set is wisely chosen, routing will be efficient

Page 32: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

32Mao F04

Content Addressable Network (CAN)

§ Associate to each node and item a unique id in an d-dimensional space

§ Properties - Routing table size O(d)- Guarantees that a file is found in at most d*n1/d steps,

where n is the total number of nodes

Page 33: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

33Mao F04

CAN Example: Two Dimensional Space

§ Space divided between nodes§ All nodes cover the entire space§ Each node covers either a square or a

rectangular area of ratios 1:2 or 2:1§ Example:

- Assume space size (8 x 8)- Node n1:(1, 2) first node that joins à cover

the entire space

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1

Page 34: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

34Mao F04

CAN Example: Two Dimensional Space

§ Node n2:(4, 2) joins à space is divided between n1 and n2

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

Page 35: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

35Mao F04

CAN Example: Two Dimensional Space

§ Node n2:(4, 2) joins à space is divided between n1 and n2

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

n3

Page 36: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

36Mao F04

CAN Example: Two Dimensional Space

§ Nodes n4:(5, 5) and n5:(6,6) join

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

n3 n4n5

Page 37: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

37Mao F04

CAN Example: Two Dimensional Space

§ Nodes: n1:(1, 2); n2:(4,2); n3:(3, 5); n4:(5,5);n5:(6,6)

§ Items: f1:(2,3); f2:(5,1); f3:(2,1); f4:(7,5);

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

n3 n4n5

f1

f2

f3

f4

Page 38: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

38Mao F04

CAN Example: Two Dimensional Space

§ Each item is stored by the node who owns its mapping in the space

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

n3 n4n5

f1

f2

f3

f4

Page 39: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

39Mao F04

CAN: Query Example

§ Each node knows its neighbors in the d-space

§ Forward query to the neighbor that is closest to the query id

§ Example: assume n1 queries f4

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

n3 n4n5

f1

f2

f3

f4

Page 40: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

40Mao F04

Many Other DHT Designs

§ Chord: - id space is circle- routing table includes predecessor node and nodes 2-i

away- routing always halves distance

§ Pastry and Tapestry- id space is tree- routing table includes neighboring subtree of varying

heights- routing always fixes at least one bit on each step

Page 41: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

41Mao F04

Chord Routing Table

1/21/4

1/8

1/161/321/641/128

Page 42: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

42Mao F04

Performance

§ Routing in the overlay network can be more expensive than in the underlying network

§ Because usually there is no correlation between node ids and their locality; a query can repeatedly jump from Europe to North America, though both the initiator and the node that store the item are in Europe!

§ Solution: make neighbor relationships depend on link latency- Can achieve “stretch” of ~1.3

Page 43: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

43Mao F04

Other Issues

§ Data replication

§ Security

§ Resilience to failures, node churn

§ Monitoring

§ .....

Page 44: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

44Mao F04

General DHT Properties

§ Fully decentralized: all nodes equivalent

§ Self-organizing: no need to explicitly arrange routing, algorithm does it automatically

§ Robust: can tolerate node failures

§ Scalable: can grow to immense sizes

§ Flat namespace: does not impose semantics- as opposed to DNS

Page 45: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

45Mao F04

Structured vs Unstructured

§ Unstructured:- can tolerate churn- can find hay- can do searches easily

§ Structured:- designed for needles- have trouble with keyword searches- have some trouble with extreme churn- have different sharing model

Page 46: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

46Mao F04

Other Design Options

§ Centralized?- single point-of-failure- requires infrastructure to scale (business model)

§ Hierarchical?- requires given hierarchical organization- static hierarchy of servers: not robust or flexible- dynamic hierarchy of servers: essentially a DHT

Page 47: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

47Mao F04

Are DHTs Just for File Sharing?

§ Think of DHTs as a new DNS- mapping names to identifiers- identifiers are persistent and general

§ A web based with persistent pointers, not ephemeral URLs

§ Overlay networks based on persistent keys, not changeable IP addresses- send to identifier, translated into current IP address

Page 48: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

48Mao F04

More Generally

§ Hash tables are useful data structures for many programs

§ Distributed hash tables should be generally useful data structures for distributed programs

§ Examples: file systems, event notification, application-layer multicast, mail systems, ....

Page 49: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

49Mao F04

Indexing

? ? ?

HASH(xyz.mp3) = K1

A

Page 50: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

50Mao F04

? ? ?

HASH(xyz.mp3) = K1

A

(xyz.mp3, A)

insert

K1

Indexing

Page 51: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

51Mao F04

? ? ?A

(xyz.mp3, A)K1

HASH(xyz.mp3) = K1

B

lookup

Indexing

Page 52: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

52Mao F04

xyzA

(xyz.mp3, A)K1

Bxyz

Indexing

Page 53: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

53Mao F04

? ? ?A

(xyz.mp3, A)K1

B? ? ?? ? ?

content could as easily have been a web page, disk block, data object, DNS name, …

Indexing

Page 54: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

54Mao F04

A

(xyz.mp3, A)

insert

K1

(xyz.mp3, B)(xyz.mp3, C)

B C

Anycast Communication

Page 55: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

55Mao F04

A

(xyz.mp3, A)K1

(xyz.mp3, B)(xyz.mp3, C)

B C

(xyz.mp3, C)

(xyz.mp3, A)

“anycast” lookup; based on a number of metrics

Anycast Communication

Page 56: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

56Mao F04

(xyz, 20$)

(abc, 35$)

Database Join

(A, 20$)(A, 35$)

Join on $-value

Page 57: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

57Mao F04

(xyz, 20$)

(abc, 35$)

Database Join

(A, 20$)(A, 35$)

Join on $-value

HASH(35$) = K2

HASH(20$) = K1

K1

K2

Page 58: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

58Mao F04

(xyz, 20$)

(abc, 35$)

Database Join

(A, 20$)(A, 35$)

Join on $-value

HASH(35$) = K2

HASH(20$) = K1

K1

K2

Page 59: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

59Mao F04

(xyz, 20$)

(abc, 35$)

Database Join

(A, 20$)(A, 35$)

Join on $-value

HASH(35$) = K2

HASH(20$) = K1

K1

K2

(20$, A, xyz)

(35$, A, abc)

Massively parallel, distributed join on Internet scales!

Page 60: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

60Mao F04

DHTs: Key Insight

§ Many uses for DHTs- Indexing - Multicast, anycast - Database joins, sort, range search- Service composition- Event notification- …

§ DHT namespace essentially provides a level of indirection

- “Any computer systems problem can be solved by adding a level of indirection”

§ How is indirection done today?

Page 61: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

61Mao F04

IP

DNS(by hostname)

Applications

Indirection services

Connectivity

Chat Blogs

Web(Client/Server)

Hierarchical name and service structure

Indirection today

Page 62: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

62Mao F04

IP

DNS(by hostname)

Applications

Indirection services

Connectivity

Chat Blogs

Web(Client/Server)

CDNs(by name)

Ad hoc hacks

Google(by keyword)

manua

l

Hierarchical name and service structure

Indirection today

Page 63: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

63Mao F04

IP

DNS(by hostname)

Applications

Indirection services

Connectivity

Chat Blogs

Web(Client/Server)

CDNs(by name)

Ad hoc hacks

Google(by keyword)

manua

l

EndSystemMcast

KaZaa

Non client-server applications

Hierarchical name and service structure

Indirection today

Mobile IP(by home IP

address)

Home agent

Application specific

Napster

Page 64: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

64Mao F04

Indirection in Today’s Internet

§ No explicit interface that applications can build on- besides DNS

§ Two options- Retrofit over the DNS through a variety of creative hacks - Customized solution designed/implemented anew for each

application

Page 65: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

65Mao F04

IP

DHT

SFR(content)

dGoogle(by keyword)

DNS(by location)

CDN-like(by name)

directory services

pSearch(by interest)

Client/ServerWeb

i3 mcast

commn. services storage services

dhash

File Systems

(Casper, Past CFS, OStore)

rv

dEmail

dChatWbP2P

collaborative apps

CASLIB

A DHT-enabled Internet

content publishing/distribution

ReHash

PHT

computeservices

PIER

Internet distr. systems

Indirection service

blogs

Connectivity

Page 66: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

66Mao F04

Another Pipe-Dream?

§ Will DHTs go the way of QoS, Multicast, etc.?

§ Perhaps, but DHTs don’t need the cooperation of ISPs, so the barriers to adoption are lower

Page 67: CDNs and Peer-to-Peerweb.eecs.umich.edu/~zmao/eecs489/LectureSlides/cdnP2P_single.pdf · Mao F04 2 This Lecture § This will be a “why” lecture, not a “how to” one § Emphasis

67Mao F04

What You Need to Know

§ Napster§ Gnutella§ DHT: basic ideas