1 Koorde: A Simple Degree Optimal DHT Frans Kaashoek, David Karger MIT Brought to you by the IRIS project.

Slides:



Advertisements
Similar presentations
P2P data retrieval DHT (Distributed Hash Tables) Partially based on Hellerstein’s presentation at VLDB2004.
Advertisements

Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Peer to Peer and Distributed Hash Tables
Pastry Peter Druschel, Rice University Antony Rowstron, Microsoft Research UK Some slides are borrowed from the original presentation by the authors.
P2P Systems and Distributed Hash Tables Section COS 461: Computer Networks Spring 2011 Mike Freedman
CHORD – peer to peer lookup protocol Shankar Karthik Vaithianathan & Aravind Sivaraman University of Central Florida.
Chord: A Scalable Peer-to- Peer Lookup Service for Internet Applications Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
The Chord P2P Network Some slides have been borowed from the original presentation by the authors.
CHORD: A Peer-to-Peer Lookup Service CHORD: A Peer-to-Peer Lookup Service Ion StoicaRobert Morris David R. Karger M. Frans Kaashoek Hari Balakrishnan Presented.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Speaker: Cathrin Weiß 11/23/2004 Proseminar Peer-to-Peer Information Systems.
Ion Stoica, Robert Morris, David Liben-Nowell, David R. Karger, M
Chord: A scalable peer-to- peer lookup service for Internet applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashock, Hari Balakrishnan.
1 1 Chord: A scalable Peer-to-peer Lookup Service for Internet Applications Dariotaki Roula
P2P Network Structured Networks: Distributed Hash Tables Pedro García López Universitat Rovira I Virgili
Robert Morris, M. Frans Kaashoek, David Karger, Hari Balakrishnan, Ion Stoica, David Liben-Nowell, Frank Dabek Chord: A scalable peer-to-peer look-up.
Robert Morris, M. Frans Kaashoek, David Karger, Hari Balakrishnan, Ion Stoica, David Liben-Nowell, Frank Dabek Chord: A scalable peer-to-peer look-up protocol.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
Common approach 1. Define space: assign random ID (160-bit) to each node and key 2. Define a metric topology in this space,  that is, the space of keys.
Small-world Overlay P2P Network
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
1 Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan.
Distributed Lookup Systems
University of Oregon Slides from Gotz and Wehrle + Chord paper
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Peer-to-Peer.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek and Hari alakrishnan.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
Peer To Peer Distributed Systems Pete Keleher. Why Distributed Systems? l Aggregate resources! –memory –disk –CPU cycles l Proximity to physical stuff.
File Sharing : Hash/Lookup Yossi Shasho (HW in last slide) Based on Chord: A Scalable Peer-to-peer Lookup Service for Internet ApplicationsChord: A Scalable.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Chord & CFS Presenter: Gang ZhouNov. 11th, University of Virginia.
1 Reading Report 5 Yin Chen 2 Mar 2004 Reference: Chord: A Scalable Peer-To-Peer Lookup Service for Internet Applications, Ion Stoica, Robert Morris, david.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa.
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
David Luebke 1 10/25/2015 CS 332: Algorithms Skip Lists Hash Tables.
Presentation 1 By: Hitesh Chheda 2/2/2010. Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT Laboratory for Computer Science.
Node Lookup in P2P Networks. Node lookup in p2p networks In a p2p network, each node may provide some kind of service for other nodes and also will ask.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan Presented.
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
Chord Advanced issues. Analysis Theorem. Search takes O (log N) time (Note that in general, 2 m may be much larger than N) Proof. After log N forwarding.
Lecture 12 Distributed Hash Tables CPE 401/601 Computer Network Systems slides are modified from Jennifer Rexford.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
Two Peer-to-Peer Networking Approaches Ken Calvert Net Seminar, 23 October 2001 Note: Many slides “borrowed” from S. Ratnasamy’s Qualifying Exam talk.
CS694 - DHT1 Distributed Hash Table Systems Hui Zhang University of Southern California.
CSE 486/586 Distributed Systems Distributed Hash Tables
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
1 Distributed Hash tables. 2 Overview r Objective  A distributed lookup service  Data items are distributed among n parties  Anyone in the network.
The Chord P2P Network Some slides taken from the original presentation by the authors.
Peer-to-Peer Networks 07 Degree Optimal Networks
Ion Stoica, Robert Morris, David Liben-Nowell, David R. Karger, M
CSE 486/586 Distributed Systems Distributed Hash Tables
The Chord P2P Network Some slides have been borrowed from the original presentation by the authors.
Distributed Hash Tables
(slides by Nick Feamster)
Peer-to-Peer Networks 07 Degree Optimal Networks
Know thy Neighbor’s Neighbor Better Routing for Skip Graphs and Small Worlds Moni Naor Udi Wieder.
DHT Routing Geometries and Chord
Chord Advanced issues.
Koorde: A simple degree optimal DHT
Building Peer-to-Peer Systems with Chord, a Distributed Lookup Service
P2P Systems and Distributed Hash Tables
Chord Advanced issues.
Koorde: A Simple Degree Optimal DHT
P2P: Distributed Hash Tables
CSE 486/586 Distributed Systems Distributed Hash Tables
A Scalable Peer-to-peer Lookup Service for Internet Applications
Presentation transcript:

1 Koorde: A Simple Degree Optimal DHT Frans Kaashoek, David Karger MIT Brought to you by the IRIS project

2 DHT Routing Distributed hash tables Implement hash table interface Map any ID to the machine responsible for that ID (in a consistent fashion) Standard primitive for P2P Machines not all aware of each other Each tracks small set of “neighbors” Route to responsible node via sequence of “hops” to neighbors

3 Performance Measures Degree How many neighbors nodes have Hop count How long to reach any destination node Fault tolerance How many nodes can fail Maintenance overhead E.g., making sure neighbors are up Load balance How evenly keys distribute among nodes

4 Tradeoffs With larger degree, hope to achieve Smaller hop count Better fault tolerance But higher degree implies More routing table state per node Higher maintenance overhead to keep routing tables up to date Load balance “orthogonal issue”

5 Current Systems Chord, Kademlia, Pastry, Tapestry O(log n) degree O(log n) hop count O(log n) ratio load balance Chord: O(1) load balance with O(log n) “virtual nodes” per real node Multiplies degree to O(log 2 n)

6 Outliers CAN Degree d O(dn 1/d ) hops Viceroy O(log n) hop count Constant average degree But some nodes have degree log n

7 Lower Bounds to Shoot For Theorem: if max degree is d, then hop count is at least log d n Proof: < d h nodes at distance h Allows degree O(1) and O(log n) hops Or deg. O(log n) and O(log n / loglog n) hops Theorem: to tolerate half nodes failing, (e.g. net partition) need degree  (log n) Pf: if less, some node loses all neighbors Might as well take O(log n / loglog n) hops!

8 Koorde New routing protocol Shares almost all aspects with Chord But, meets (to within constant factor) all lower bounds just mentioned: Degree 2 and O(log n) hops Or degree log n and O(log n / loglog n) hops and fault tolerant Like Chord, O(log n) load balance or constant with O(log n) times degree

9 Chord Review Chord consists of Consistent hashing to assign IDs to nodes Good load balance Efficient routing protocol to find right node Fast join/leave protocol Few data items shifted Fault tolerance to half of nodes failing Efficient maintenance over time ■ Koorde routing protocol to find right node

10 Consistent Hashing Assign ID to “successor” node on ring 49 Assign doc with hash 49 to node 51

11 Chord Routing Each node keeps successor pointer Also keeps power- of-two “fingers” neighbors providing shortcuts So log n fingers

12 Chord Lookups

13 Koorde Idea Chord acts like a hypercube Fingers flip one bit Degree log n (log n different flips) Diameter log n Koorde uses a deBruijn network Fingers shift in one bit Degree 2 (2 possible bits to shift in) Diameter log n

14 De Bruijn Graph Nodes are b -bit integers ( b = log n ) Node u has 2 neighbors (bit shifts): 2u mod 2 b and 2u+1 mod 2 b

15 De Bruijn Routing Shift in destination bits one by one b hops complete route Route from 000 to 110:

16 Routing Code Procedure u.LOOKUP( k, toShift ) /* u is machine, k is target key toShift is target bits not yet shifted in */ if k  u then Return u /* as owner for k */ else /* do de Bruijn hop */ t = u ° topBit ( toShift ) Return t.lookup(k, toshift  1) Initially call self.LOOKUP( k,k )

17 Summary Each node has 2 outgoing neighbors Also two incoming Can show good routing load balance Need b = log n bits for n distinct nodes So log n hops to route

18 Problems to Solve Want b -bit ring, b >> log n, to avoid colliding identifiers as nodes join Implies use b >> log n hops Worse, most nodes not present to route! Solutions Imaginary routing: present nodes simulate routing actions of absent nodes Short cuts: use gaps to start route with most of destination bits already shifted in

19 Imaginary routing Node u holds two pointers Successor on ring One finger: predecessor of 2u (mod 2 b ) On sparse ring, is also predecessor of 2u+1 So handles both de Bruijn edges Node u “owns” all imaginary nodes between self and (real) successor Simulates de Bruijn routing from those imaginary nodes to others by forwarding to the others’ real owners

20 Code Procedure u.LOOKUP( k, toShift, i ) if k  ( u,u.successor ] then return u.successor /* as bucket for k */ else if i  ( u,u.successor ] then /* i belongs to u; do de Bruijn hop */ return u.finger.LOOKUP ( k, toshift  1, i ° topBit ( toShift )) else /* i doesn’t belong to u; forward it */ return u.successor.LOOKUP ( k, toShift, i ) Initially call self.LOOKUP( k,k,self )

21 True route tracks imaginary start target successor finger (< double) imaginary (double)

22 Correctness Once b de Bruijn steps happen, done At this point, i = k Will follow successors to bucket for k Successor steps delay de Bruijn steps, but not forever After finite number of successor steps, reach predecessor of i Conclude: all necessary de Bruijn steps happen in finite time. So correct.

23 How long? Only b de Bruijn steps Just bound (expected) number of successor steps per de Bruijn step Nodes randomly distributed on ring So node expects to own size 1/n interval So distance to imaginary node on de Bruijn step is 1/n De Bruijn step doubles everything, makes distance 2/n Expect 2 nodes in interval of that size

24 Few Successor Steps start target 1/n < 2/n

25 Summary Each de Bruijn hop followed by 2 successor hops (in expectation) b de Bruijn hops Conclude 2b successor hops so 3b hops in total Expectation argument extends to “with high probability” argument (same bounds) Remaining problem: b>>log n, too big

26 Exploit Address Blocks Only n real nodes Each owns ~ 1/n “block” of keyspace Within that block, only top log n bits “significant”; low bits arbitrary So set low bits to high bits of target Then just have to shift out log n most significant bits So log n de Bruijn hops, So O(log n) hops in total

27 Example Start at u = … Successor …. u “owns” imaginary 00101****** Target …. Set imaginary start … Only need to shift out hops, independent of b

28 Summary Koorde uses 2 neighbors per node (one successor, one finger) And requires O(log n) routing hops with high probability

29 Variant: Koorde- K We used a binary de Bruijn Network Generalizes to other base K:

30 Analysis To represent n distinct node ids need log K n base- K digits Suggests log K n hops to route Same problem as Koorde: b >> log K n Same solution: imaginary routing Node u points at predecessor( Ku ) Same analysis: K de Bruijn hops interspersed with successor hops

31 Successor Hops Now de Bruijn hop multiplies ids by K So expect K nodes between finger and next imaginary node Implies K successor hops per de Bruijn hop Gives K log K n hops---no good To avoid successor hops, u fingers predecessor( Ku ) and following K nodes Allows K successor hops by one finger Gives O(log K n) hops as desired

32 Summary Using K fingers per node, can achieve O(log K n) = O(log n / log K) routing hops As discussed earlier, degree log n is necessary (and sufficient) for fault tolerance (and is degree of most previous systems) So, O(log n / log log n ) hops

33 Summary: What do we Gain? Lower degree for same number of hops Storage isn’t really an issue But lower degree should translate into lower maintenance traffic Lower hop count for same degree And tunable Other systems also have tunable hop count But at low hop counts (high degree) their extra log factor in degree does matter

34 What do we lose? Chord is “self stabilizing” From successors, can build entire routing system quickly by “pointer jumping” to find fingers Koorde is not Given only successor pointers, no clear fast way to find fingers Not a problem for joins, because joiner can use lookup to find its finger But could be a problem if massive changes

35 More Info