350 likes | 479 Views
Meeting WEBMINDS 2006 Genova, 27/28 ottobre Università di Salerno - GL7. Degree–Optimal Routing for P2P Systems. Giovanni Chiola, Gennaro Cordasco , Luisa Gargano, Mikael Hammar, Alberto Negro, and Vittorio Scarano. Outline. Peer-to-Peer Distribute Hash Table Overlay Network
E N D
Meeting WEBMINDS 2006 Genova, 27/28 ottobre Università di Salerno - GL7 Degree–Optimal Routing for P2P Systems Giovanni Chiola, Gennaro Cordasco, Luisa Gargano, Mikael Hammar, Alberto Negro, and Vittorio Scarano Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Outline • 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 Hash Table (DHT) • 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 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay 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: 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 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
ID indice Resp. Nodo 8+1=9 1 14 14 2 8+2=11 21 14 8+4=12 3 24 14 4 8+8=16 21 32 8+16=24 5 24 38 8+32=40 6 42 42 An Example: Chord Successors Predecessor Nodo 1 m=6 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Uniform 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 s Greedy Routing: move to the neighbor that minimizes the distance to the target. Greedy Routing Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Fib-Chord (2004) Fib-Chord • Formally Let 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 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
2 5 13 34 89 F-Chord() (2004) Fib-Chord 1 3 8 21 55 • 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 [1/2,1] even index jumps all jumps Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Property 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
F-Chord (2004) Lower is better hops x log n Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Generalized Base-k • 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-1 J((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-k: 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-3 1 2 3 7 11 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
12 5 13 34 89 Generalized Base-k • For k=2 the sequence of jump is 1,2,5,13,34,… (F-Chord(1/2) jumps) Generalized Base-k is the proper generalization of F-Chord(1/2) to base k Generalized Base-2 = F-Chord(1/2) Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Property of Generalized Base-k • 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: Degree B-k: Base-k G-k: Gen. Base-k Fib: F-Chord F-k: Ext. Fib. G-(k+1)B-k B-3 G-3 B-2 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Simulation Results: APL B-k: Base-k G-k: Gen. Base-k Fib: F-Chord F-k: Ext. Fib. G-kB-k for k>2 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Randomized 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 s NoN Greedy routing Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Neighbor of Neighbor Routing • Benefits • Efficient • Local Routing • Estimation of n not required • Drawbacks • Neighbor lists should be maintained • No quick bootstrap Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
H-Networks (2005) • Consider a deterministic network U having n nodes and degree • Letj1, 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) ji+1 ji Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Chord Lower is better Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
H-F-Chordvs. H-Chord Lower is better Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay 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
Overlay Network with class • 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 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network with class • Let U be uniform overlay network having N nodes and degree . • Letj1, 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). Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network with class • Theorem Let 1 < c log n/ log log n, the average path length is O(logc n) hops for the NoN Greedy algorithm on Hc-Chord with n = 2m peers • Corollary When c = log n/ log log n, the average path length is O(log n/ log log n) hops and the number of hops for the completion of the join operation are O(log n log log n) (w.h.p.) n<2m Chernoff Bound Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network with class • Theorem Both the diameter and the average (shortest) path length of an Hc-Network with degree O(log n) and c classes are (logc n) Hc-Chord isasymptotically optimal Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network with class • Extension to other networks: • Symphony −> Hc-Symphony • Hypercube −> Hc-Hypercube • Small-world -> … How Much Independent Should Individual Contacts be to Form a Small-World? Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Simulation Results Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
Overlay Network with class • 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 Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006
References • 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? Gennaro Cordasco - Degree–Optimal Routing for P2P Systems - 28/10/2006