How to improve the reliability of Chord ?

Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
How to improve the reliability of Chord ?
Jacek Cichon´
jacek.cichon@pwr.wroc.pl
Institute of Mathematics and Computer Science
Wrocław University of Technology
Poland
Theoretical Aspects and Models of Large, Complex and
Open Information Networks , November 19th - 21st, 2007
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Contents
1
The classical Chord P2P protocol
Description of the protocol
Basic properties of Chord
2
Improvements of Chord
Binary Chord
Direct Union of Chords
Folded Chord
3
Dynamic of Chord’s
Parameters
Final calculus
4
Summary
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Description of Chord
Hash function
h : Σ∗ → {0, 1}160
New node
1 Calculate x = h(Id(Node))
2
Put Node at position x in {0, 1}1 60
3
Build table of fingers: successor,
predecessor, and nodes in the
positions x + 2160−i (mod 2160 ) for i=
1,2,. . . 160
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Insertion documents in Chord
Hash function
h : Σ∗ → {0, 1}160
New document
1 Calculate x = h(Doc)
2
Put Doc to the node whose
responsible area contains calculated
position x
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Power of Chord
Basic property
1
Chord is fully decentralized P2P system
2
the expected number of hops between nodes required to
find an information is 12 log2 n, where n is the number of
nodes
3
the number of fingers of each node is, in average, log2 (n),
which guarantee (w.h.p.) connectivity after a failure of a
large group of nodes.
4
simple, logical architecture
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Weakness of Chord
Observed problems
1
The distributions of lengths of areas controlled by nodes is
(surprisingly) highly non - uniform
2
Documents putted into real implementation of Chord has
tendency to disappear from the system
3
There are problems with Chord at the small age of the
system
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Chord as a random subset of the interval
Formal model
We may treat the space {0, 1}160 as an interval [0, 1) and
positions of nodes as a subset of [0, 1).
Order statistics
1 take a sequence (Y1 , . . . , Yn ) of independent random
variables uniformly distributed in the interval [0, 1),
2
order each realization of the sequence and consider
Y1:n < Y2:n < . . . < Yn:n
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Classification of nodes in Chord
1
↓
s
s
0
1
n2
√
√
↓
n
↓
↓
1
↓
s
s
s
s
s-
1
n
0.5 ln n
n
ln n+γ
n
1
√
n
n
n2
n
The upper bound is due to L. Devroy. The rest is easy.
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Description of the protocol
Basic properties of Chord
Coefficient of variation
The coefficient of variation of a random variable X is
CV [X ] =
std [X ]
.
E [X ]
Theorem
Let Un be the uniform split of the interval [0, 1). Then
r
n
CV [Un ] =
≈1.
n+1
This explains why we observed such a big variation of the
length of nodes in Chord !
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Binary Chord
Direct Union of Chords
Folded Chord
Binary Chord
Adding a new node
Suppose that nodes are placed at points
0 < a1 < a2 < . . . < an < 1 = an+1 and a new node with the
identifier Id is to be added. Then
1
calculate x = hash(Id) ∈ [0, 1)
2
find i such that ai ≤ x < ai+1
3
put a new node at position 12 (ai + ai+1 )
s
s
s
s
s
s
s
s
ss
@
@
Rs
@
s
Jacek Cichon´
Chord protocol
s
s
c
s
s
c
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Binary Chord
Direct Union of Chords
Folded Chord
Uniformity of Binary Chord
Theorem (Quite difficult)
There are functions ω and η such that
1
1
var [bin] =
− 1 + ω(log2 (n + 1)) + η(n) ,
(n + 1)2 ln 2
ω is periodic and has period 1, |ω(x)| ≤ 1.5 · 10−5 and
|η(x)| ≤ 6 · 10−11 .
r
CV [bin] ≈
Jacek Cichon´
1
− 1 ≈ 0.665
ln 2
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Binary Chord
Direct Union of Chords
Folded Chord
Direct Union of Chords
Work with two circles C1 , C2 .
New node
1 Calculate x1 = h1 (Id(Node))
2
Put Node at position x1 in C1
3
Calculate x2 = h2 (Id(Node))
4
Put Node at position x2 in C2
New document
1 Calculate x = h1 (Doc)
2
Put Doc at position x in C1
3
Put Doc at position x in C2
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Binary Chord
Direct Union of Chords
Folded Chord
Recovery of partially loosed information
With high probability information loosed after unexpected
departure of one node can be recovered.
But this must be done in a relatively short time.
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Binary Chord
Direct Union of Chords
Folded Chord
Basic properties of Chord⊕Chord
Let A = {n1 , . . . , nk } ⊆ {1, . . . , n + 1}. KA,i = the unions of
intervals controlled by nodes from A in the ith circle. The set A
is safe if KA,1 ∩ KA,2 = ∅.
Theorem (Safety bounds for Chord⊕Chord)
q
If |A| < logn n then A is safe with high probability.
Theorem (Uniformity of Chord⊕Chord)
CV [X ] '
√1
2
.
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Binary Chord
Direct Union of Chords
Folded Chord
Folded Chord
Basic idea
Use one circle. Each node controls the space from
[x, succ(succ(x)), where x is the position of the node.
...
...
Theorem (Safety bounds for Folded Chord)
q
If |A| < logn n then A is safe with high probability.
Theorem (Uniformity of Folded Chord)
CV [X ] '
√1
2
.
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Parameters
Final calculus
Dynamic of Chord
Parameters
1 µ - average number of departures from system in a second
2
T - average time a node spend in a system
3
N - average number of nodes in the system
4
u - number of unexpected departures
5
Tr - average time of complementing information
6
Nr - average number of nodes waiting for complementing
7
δ - average numbers of documents in the system per node
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Parameters
Final calculus
Dynamic of Chord
Theorem
In classical Chord the expected time of the information life-time
in e system equals Tu .
Theorem (From the Little’s Law form Queueing Theory)
N =µ·T
Theorem (From the Little’s Law form Queueing Theory)
Nr = uN
Jacek Cichon´
Tr
T
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Parameters
Final calculus
Distributions
Assumption
Life-time t of nodes in the system follows Pareto distribution
Pa(α, β):
!α
1
Pr[t > x] =
x
1 + (α−1)T
Experiments with real systems shows that α ≈ 2.06.
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Parameters
Final calculus
Final calculus
Assumption
N = 105
T = 30min
u = 0.1 δ ≤ 1000
Theorem
1 The average life-time of an information item in Chord is 5
hours.
2
The average life-time of an information item in
Chord⊕Chord is 180 hours.
3
The average life-time of an information item in Folded
Chord is 180 hours.
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Conclusions
Summary
1
Binary split improves statistical properties of Chord
2
Direct unions significantly improve statistical properties of
Chord
3
Folding construction significantly improve statistical
properties of Chord
4
All these modifications are soft
5
THANK YOU
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Conclusions
Summary
1
Binary split improves statistical properties of Chord
2
Direct unions significantly improve statistical properties of
Chord
3
Folding construction significantly improve statistical
properties of Chord
4
All these modifications are soft
5
THANK YOU
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Conclusions
Summary
1
Binary split improves statistical properties of Chord
2
Direct unions significantly improve statistical properties of
Chord
3
Folding construction significantly improve statistical
properties of Chord
4
All these modifications are soft
5
THANK YOU
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Conclusions
Summary
1
Binary split improves statistical properties of Chord
2
Direct unions significantly improve statistical properties of
Chord
3
Folding construction significantly improve statistical
properties of Chord
4
All these modifications are soft
5
THANK YOU
Jacek Cichon´
Chord protocol
Introduction
The classical Chord P2P protocol
Improvements of Chord
Dynamic of Chord’s
Summary
Conclusions
Summary
1
Binary split improves statistical properties of Chord
2
Direct unions significantly improve statistical properties of
Chord
3
Folding construction significantly improve statistical
properties of Chord
4
All these modifications are soft
5
THANK YOU
Jacek Cichon´
Chord protocol