DHT (continued)
2019-03-27
DHT (continued) 2019-03-27 Recap 0 N16 N112 Nodes arranged in a - - PowerPoint PPT Presentation
DHT (continued) 2019-03-27 Recap 0 N16 N112 Nodes arranged in a ring with positions labeled 0..2 m -1 N96 m = 128, 160, 256 m=7 A nodes position is based on a hash of its N32 identity P(collision among N nodes) =~ 1-e
2019-03-27
labeled 0..2m-1
identity
0.000000000000000000001469…
2019-03-27
N80 N112 N96 N16 N32 N45
labeled 0..2m-1
its identity
position greater than x on the ring
keys
2019-03-27
N80 N112 N96 N16 N32 N45
File cnn.com/index.html with key K42 stored here
labeled 0..2m-1
its identity
position greater than x on the ring
(mod 2m) for i = 0, ..., m-1
distinct on average
2019-03-27
N80 N112 N96 N16 N32 N45
80 + 21 80 + 22 80 + 23 80 + 24 80 + 25
labeled 0..2m-1
identity
greater than x on the ring
2m) for i = 0, ..., m-1
finger that makes progress towards key
2019-03-27
N80 N112 N96 N16 N32 N45
2019-03-27
Search takes O(log(N)) time
Proof
with-file reduces by a factor of at least 2 (why?) Takes at most m steps: 2m is at most a constant multiplicative factor above N, lookup is O(log(N))
most 2m / N (why?) Number of node identifiers in a range of 2m / N is O(log(N)) with high probability (why?) So using successors in that range will be ok Here Next hop Key
routing to any key)
2019-03-27
2019-03-27
N80 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here
X X Lookup fails (N16 does not know N45) N112 N96 N16 Who has cnn.com/index.html? (hashes to K42)
2019-03-27
N80 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here
One solution: maintain r multiple successor entries In case of failure, use successor entries N112 N96 N16 Who has cnn.com/index.html? (hashes to K42)
2019-03-27
N80 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here
X Lookup fails (N45 is dead) N112 N96 N16 Who has cnn.com/index.html? (hashes to K42)
2019-03-27
N80 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here
One solution: replicate file/key at r successors and predecessors N112 N96 N16 K42 replicated K42 replicated Who has cnn.com/index.html? (hashes to K42)
üPeers fail
à Need to update successors and fingers, and copy keys
2019-03-27
2019-03-27
N80 Say m=7 N32 N45 N112 N96 N16 N40 Introducer directs N40 to N45 (and N32) N32 updates successor to N40 N40 initializes successor to N45, and inits fingers from it
2019-03-27
N80 Say m=7 N32 N45 N112 N96 N16 N40 Introducer directs N40 to N45 (and N32) N32 updates successor to N40 N40 initializes successor to N45, and inits fingers from it N40 periodically talks to its neighbors to update finger table Stabilization Protocol (to allow for “continuous” churn, multiple changes)
2019-03-27
Average Messages per Lookup Number of Nodes
log N, as expected
2019-03-27
2019-03-27