chord a scalable peer to-peer lookup service for internet applications
TRANSCRIPT
CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET
CSCI-565: DISTRIBUTED COMPUTING
Henri M.B. van den Bulk
1
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”
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
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
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
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
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
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
CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 9
LOOKUP
1
8
42
62
32
21
51
75K(73)
LOOKUP(73)
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
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
CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS 12
REAL WORLD APPLICATIONS
▸ Cooperative File System (CFS)
▸ OverCite
▸ UsenetDHT
QUESTIONS?
Audience
13CHORD: A SCALABLE PEER-TO-PEER LOOKUP SERVICE FOR INTERNET APPLICATIONS