chord a scalable peer to-peer lookup service for internet applications

13
CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET CSCI-565: DISTRIBUTED COMPUTING Henri M.B. van den Bulk 1

Upload: henri-van-den-bulk

Post on 09-Jan-2017

197 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET

CSCI-565: DISTRIBUTED COMPUTING

Henri M.B. van den Bulk

1

Page 2: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 2

ABOUT CHORD

▸ node = lookup(key), IP address

▸ Variant of Distributed “consistent” Hashing Table (DHT)

▸ It’s a protocol and algorithm

“Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, and Hari Balakrishnan — ACM SIGCOMM 2001, San Deigo, CA, August 2001”

Page 3: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 3

WHAT’S DIFFERENT ABOUT CHORD?

▸ Nodes don’t know all other nodes, only routing info about a few nodes

▸ In a steady state only maintain O(log N) other nodes (routing table), but its table is dynamic

▸ P (join/leave messages) = High => O(log2 N) messages (lookup)

▸ Simplicity = O(log N), counting to other nodes

▸ Provable Correctness, Provable Performance - Degrades gracefully when topology changes

▸ No need for dedicated nodes or hierarchy, e.g. like DNS

Page 4: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 4

CORE PROPERTIES

▸ The distributed hash function spreads keys evenly, which provides natural load balancing

▸ There are no specific roles for nodes which makes it decentralized

▸ When the number (N) of nodes grow it’s scalable as the cost is O(log N)

▸ The dynamic nature of adjusting the the internal tables causes an increased availability of the system.

▸ The key-space is flat and does not impose a naming scheme, which provides for a flexible naming approach

Page 5: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 5

HASH TABLE

GENERAL HUX

FINN

BB-8

LUKE SKYWALKER

HAN SOLO

Hash = f(key)Keys

COROLLIA

ARTORIAS

JAKKU

STARKILLER BASE

19 BBY

Values

Page 6: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 6

DISTRIBUTED HASH TABLE

key mod n, n: number of buckets

identifies the bucket

KEY SPACE

BUCKET 1 BUCKET 2 BUCKET 3

K1 KnKn/3 K2n/3value = hash(key)

1

2

Costly when we change the buckets

Page 7: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 7

CHORD’S CONSISTENT HASHING ALGORITHM

0

1

2

3module 2m

m=20-(2m - 1)

HASH(IP)

SUCCESSOR(3)=0

K(1)

SUCCESSOR(1)=1

SUCCESSOR(2)=3

K(2)

K(3)

ID: M-BIT INTEGER

KEY DOMAIN

Page 8: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 8

FINGER TABLE

0

1

4

6

3

2

5

7

ID IP Interval

succ

2 1.2.3.4 [2,3) 3

3 2.3.4.5 [3,5) 3

5 6.7.8.9 [5,1) 0

0 6.9.1.1 1

A

AB

C

D

B

C

D

Page 9: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 9

LOOKUP

1

8

42

62

32

21

51

75K(73)

LOOKUP(73)

Page 10: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 10

NODE JOINING & STABILIZING

0

1

4

6

3

2

5

7

N

1

2

1

2

3

34

4

5

5

Page 11: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 11

CHALLENGES

▸ Stabilization rate is critical and can be an issue when there is a significant amount of churn in joining/leaving

▸ Network latency and topology are not taking into account, e.g. distance between nodes

Page 12: Chord a scalable peer to-peer lookup service for internet applications

CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 12

REAL WORLD APPLICATIONS

▸ Cooperative File System (CFS)

▸ OverCite

▸ UsenetDHT

Page 13: Chord a scalable peer to-peer lookup service for internet applications

QUESTIONS?

Audience

13CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS