Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Degree–Optimal Routing for P2P
Systems
Giovanni Chiola, Gennaro Cordasco, Luisa Gargano, Mikael
Hammar, Alberto Negro, and Vittorio Scarano
Meeting WEBMINDS 2006Genova, 27/28 ottobre
Università di Salerno - GL7
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
OutlineOutline
• Peer-to-Peer• Distribute Hash Table• Overlay Network• Uniform Networks vs. Randomized Networks• Greedy Routing vs. Neighbor of Neighbor Routing
• Our Proposals• F-Chord (2004) ----> Generalize Base-k (2006)• H-Networks (2005) ----> Overlay network with class
(2006)
• Conclusions
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Distributed version of a hash table data structure• Stores (key, value) pairs
• The key is like a filename• The value can be file contents
• Goal: Efficiently insert/lookup/delete (key, value) pairs
• Each peer stores a subset of (key, value) pairs in the system
• Core operation: Find node responsible for a key• Map key to node• Efficiently route insert/lookup/delete requests to this
node
Distributed Hash Table (DHT)Distributed Hash Table (DHT)
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay networkOverlay network
• [I. Stoica] “An overlay network is a virtual network of nodes and logical links that is built on top of an existing network with the purpose to implement a network service that is not available in the existing network.In particular an overlay network:• adds an additional layer of
indirection/virtualization• changes properties in one or more areas of
underlying network”
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network: PerformanceOverlay Network: Performance
• Routing table size (degree)• Storage cost• Measure the cost of self-stabilization for
adapting to node joins/leaves • Diameter and Average path length
• Time cost• Fault tolerance
• Congestion• Clustering
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Chord Chord • Chord uses a one-dimensional circular key space (ring) of
N=2m identifiers• The node responsible for the key is the node whose identifier
most closely follows the key• Chord maintains two sets of neighbors:
• A successor list of r nodes that immediately follows it in the key space
• A finger list of m = log N nodes spaced exponentially around the key space
• Routing consists in forwarding to the node closest, but not past, the key
• Performance:• Diameter: log N (O(log n) whp) where n denote the number of
nodes present in the network• Routing table size: log N (O(log n) whp)• Average path length: ½ log N
Routing correctness
Routing efficiency
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
An Example: Chord An Example: Chord
ID Resp.
8+1=9 14
8+2=11 14
8+8=16 21
8+16=24 24
8+32=40 42
8+4=12 14
m=6
indice Nodo
1 14
2 21
4 32
5 38
6 42
3 24
Successors
Predecessor
Nodo 1
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Uniform Routing AlgorithmUniform Routing Algorithm• We consider a ring of N identifiers labeled from 0
to N-1• A routing algorithm is uniform if for each identifier
v, v is connected to u iff v+w is connected to u+w (i.e. : all the connection are symmetric).Advantages
+Easy to implement+Greedy algorithm
+ Simple – to understand and implement+ Local – routing occurs inside the portion of ring that is
delimited by source and destination+ In some cases – (Hypercube, Chord) – the best we can do
+No node congestion+Quick Bootstrap
Drawback– Less powerful (De Bruijn Graph and Neighbor of
Neighbor Greedy routing are more powerful)
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
t
Greedy Routing: move to the neighbor that minimizes the distance to the target.
s
Greedy Routing Greedy Routing
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Fib-Chord (2004)Fib-Chord (2004)
• FormallyLet N (Fib(m-1), Fib(m)]. The scheme uses m-2 jumps of size Fib(i) for i = 2,3, … , m-1
• Fib-Chord• Diameter :
• Degree :
123 5 8 13 21 34 55 89
Fib-ChordFib-Chord
1log 0.72021 log
2N N
log 1.44042 logN N
618.12
51
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
F-Chord(F-Chord() (2004)) (2004)
• F-Chord()Fib(2i), for i = 1,2, …,(1-)(m-2)Fib(i), for i = 2 (1-)(m-2) +2, …, m-1
• F-Chord() uses (m-2) jumps
2 5 13 34 89
Fib-ChordFib-Chord
1 3 8 21 55
even index jumps
all jumps
[1/2,1]
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Property of F-ChordProperty of F-Chord• Diameter:
Theorem [CGHSN04] For any value of , the diameter of F-
Chord() is m/2 0.72021 log n
• Average Path Length:Theorem [CGHSN04] The average path length of the F-Chord()
scheme is bounded by 0.39812 log n + (1-)0.24805 log n
• Degree: F-Chord() use (m-2) jumps
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
0.00
0.20
0.40
0.60
0.80
1.00
1.20
1.40
1.60
Degree
Diameter
Average Path Length
Chord APL
Chord Degree &Diameter
hops
x
log
n
F-Chord (2004)F-Chord (2004)
Lower is
better
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Generalized Base-Generalized Base-kk• We generalize the property of F-Chord(1/2)
to bases greater than 2• Let R(d) the size of the greatest ring with
diameter d (using Greedy routing).• Generalized Base-k:
J(0)=1, R(0)=1,for each l 0
for each i=1,…,k-1J((k-1)l+i)=J((k-1)l)+iR(l)R(l+1)= J((k-1)l)+kR(l)
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Generalized Base-Generalized Base-k: An Examplek: An Example• Generalized Base-k: J(0)=1, R(0)=1,
for each l 0 for each i=1,…,k-1 J((k-1)l+i)=J((k-1)l)+iR(l) R(l+1)= J((k-1)l)+kR(l)
Example k=3 and n=R(2)=15 J(0)=1, R(0)=1 J(1)=2, J(2)=3,R(1)=4 J(3)=7, J(4)=11,
Generalized Base-3Generalized Base-3
1 2 3 7 11
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Generalized Base-Generalized Base-kk• For k=2 the sequence of jump is
1,2,5,13,34,… (F-Chord(1/2) jumps)
Generalized Base-2 = F-Chord(1/2)
Generalized Base-k is the proper generalization of F-
Chord(1/2) to base k
12 5 13 34 89
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Property of Property of Generalized Base-Generalized Base-kk
• Diameter:Let d the diameter of Generalized Base-k scheme
with n=R(d) nodes, d<logk+((k-1)/k)(n+1)
• Average Path Length: The average path length of Generalized Base-k scheme
with n=R(d) nodes is bounded by ((k+2)/(k+3))d
• Degree:Let the node degree of Generalized Base-k scheme with n=R(d) nodes, = (k-1)d+1
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Simulation Results: DegreeSimulation Results: DegreeB-k: Base-kB-k: Base-k
G-k: Gen. Base-kG-k: Gen. Base-k
Fib: F-Chord Fib: F-Chord
F-k: Ext. Fib.F-k: Ext. Fib.
G-(k+1)B-k
B-3B-3
G-3G-3
B-2B-2
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Simulation Results: APLSimulation Results: APLB-k: Base-kB-k: Base-k
G-k: Gen. Base-kG-k: Gen. Base-k
Fib: F-Chord Fib: F-Chord
F-k: Ext. Fib.F-k: Ext. Fib.
G-kB-k for k>2
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Randomized NetworksRandomized Networks
Networks whose nodes are connected to each other randomly+ Small Average Path Length (APL) Small Clustering The global structure of the network cannot be a global information Routing is not local Optimal trade-off can be reached only through a estimation of the
number of participants in the system The optimal trade-off will only occur for a range of n ?Quick Bootstrap? ?Congestion?
• Examples:• Viceroy Network
• Degree: O(1)• APL: O(log N)
• Mariposa • Degree: O()• APL: O(log N)
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
t
NoN Greedy routing NoN Greedy routing
s
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Benefits• Efficient• Local Routing• Estimation of n not required
• Drawbacks• Neighbor lists should be maintained• No quick bootstrap
Neighbor of Neighbor RoutingNeighbor of Neighbor Routing
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Consider a deterministic network U having n nodes and degree
• Let j1, j2, . . . , j all the jumps of U (ordered by their size). (i.e.: For each node v and for each i=1,…, ,
v is connected with v+ji mod n)
• Let H() denote a good hash function, that maps an id on the interval [0,1)
• The network H-U is obtained from U as follows:• For each i=1,…, , node v is connected to the nodes
v+ji+(ji+1− ji)H(v) mod n (where j+1 = n)
H-Networks (2005)H-Networks (2005)
jiiji+1i+1
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
0
1
2
3
4
5
6
7
8
9
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
log N
hops
Chord
R-ChordGreedyR-Chord NoN
R-Chord SP
H-ChordGreedyH-Chord NoN
H-Chord SP
ChordChordLower is
better
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
H-F-ChordH-F-Chord vsvs. . H-ChordH-Chord
3.5
4
4.5
5
5.5
6
6.5
7
7.5
8
8.5
0 50000 100000 150000 200000 250000 300000 350000n
hops
H-F-Chord(1/ 2) H-Chord H-F-Chord(0.69424) H-F-Chord(1)
Lower is better
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network with classOverlay Network with class• Uniform Networks
• Greedy routing is optimal: log N hops with log N fingers per node
• Greedy routing is easy to program• Uniformity allows quick bootstrap for new peers joining
an already established DHT• Congstion-free and high Clustered
• Non-Uniform Networks• Greedy routing is not optimal: other strategies such as
“Neighbor of Neighbor” (NoN) yield log N / log log N hops with log N degree per node
• NoN routing is similar to Greedy routing in terms of implementation
• Non-Uniformity prevents quick bootstrap for new peers joining an already established DHT
• ?Congestion and Clustering?
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Split nodes into a c classes• Routing tables are uniform within the same class• Different classes follow different patterns
• Each peer chooses its class pseudo-randomly (based on Hash digest of its identifier)
• Quick bootstrap is obtained when finding a neighbor belonging to the same class
Overlay Network with classOverlay Network with class
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Let U be uniform overlay network having N nodes and degree .
• Let j1, j2, . . . , j all the jumps of D (ordered by their size).
• Let c be any given positive integer in the interval [1, 2m] and H() be a cryptographic hash function that maps an id on the interval [0, 1).
• Consider c real numbers 0, 1,…, c-1 in the interval
[0, 1) such that 0 = 0<1<…< c-1 < 1• The network Hc-U is obtained from U as follows:
• For each i = 0,…, -1, node v is connected by an edge to the nodes
v + ji + cv(ji+1- ji),
where cv = cH(v).
Overlay Network with classOverlay Network with class
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• TheoremTheorem Let 1 < c Let 1 < c log n/ log log n, the average path log n/ log log n, the average path
length is O(loglength is O(logcc n) hops for the NoN Greedy n) hops for the NoN Greedy algorithm on Halgorithm on Hcc-Chord with n = 2-Chord with n = 2mm peers peers
• CorollaryCorollary When c = log n/ log log n, the average path When c = log n/ log log n, the average path
length islength is
O(log n/ log log n) hops and the number of hops O(log n/ log log n) hops and the number of hops for the completion of the join operation are for the completion of the join operation are O(log n log log n) (w.h.p.) O(log n log log n) (w.h.p.)
n<2m
Chernoff Bound
Overlay Network with classOverlay Network with class
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• TheoremTheorem Both the diameter and the average Both the diameter and the average
(shortest) path length of an (shortest) path length of an Hc-Network with degree O(log n) and c classes are with degree O(log n) and c classes are (log(logcc n) n)
Hc-Chord is
asymptotically optimal
Overlay Network with classOverlay Network with class
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Extension to other networks:• Symphony −> Hc-Symphony
• Hypercube −> Hc-Hypercube
• Small-world -> …
How Much Independent Should
Individual Contacts be to Form a Small-
World?
Overlay Network with classOverlay Network with class
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Simulation ResultsSimulation Results
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
• Hc-Networks:• NoN routing on few Classes gives almost
the same performance as NoN routing on truly randomized systems
• Few Classes guarantee a quick bootstrap with very high probability
• 2 Classes are sufficient for DHTs with up to hundred thousand peers
• 4 Classes are sufficient for DHTs with billions of peers
• The result applies to other network topologies
Overlay Network with classOverlay Network with class
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
ReferencesReferences• G. Cordasco, L. Gargano, M.Hammar, A. Negro and V. Scarano,
“F-Chord: Improved Uniform Routing on Chord”. In Proc. of 11th Colloquium on Structural Information and Communication Complexity (Sirocco) Smolenice Castle, Slovakia June 21-23, 2004.
• G. Cordasco, L. Gargano, M.Hammar and V. Scarano, “Degree-Optimal Deterministic Routing for P2P Systems”. In Proc. of 10th IEEE Symposium on computers and communications (ISCC 2005) La Manga del Mar Menor, Cartagena, SPAIN June 27-30, 2005. (see also Twenty-Third Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC 2004) (Brief Announcement) St. John's, Newfoundland, Canada July 25-28, 2004.)
• G. Cordasco, L. Gargano, M.Hammar, A. Negro and V. Scarano, “Non-uniform deterministic routing on F-Chord(α)”. In Proc. of First International Workshop on Hot Topics in Peer-to-Peer Systems (Hot-P2P04) Volendam (The Netherland) October 08, 2004.
• G. Chiola, G. Cordasco, L. Gargano, A. Negro and V. Scarano, “Overlay networks with class”. In Proc. of 8th International Symposium on Parallel Architectures, Algorithms, and Networks (I-SPAN 2005) Las Vegas, Nevada, USA. December 7-9, 2005.
• G. Chiola, G. Cordasco, L. Gargano, A. Negro and V. Scarano, “Optimizing the finger table in Chord-like DHTs”. In Proc. of Third International Workshop on Hot Topics in Peer-to-Peer Systems (HotP2P 2006) (Co-Located with IPDPS 2006) Rhodes Island, Greece. April 29, 2006.
• G. Cordasco and L. Gargano, “How Much Independent Should Individual Contacts be to Form a Small-World?”. In Proc. of The 17th International Symposium on Algorithms and Computation (ISAAC 2006) December 18-20, 2006 - Kolkata, India. (To Appear)
Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Thanks for your attention
Questions?
Top Related