peer to peer networks
play

Peer-to-Peer Networks Distribution Decentralized control - PowerPoint PPT Presentation

Background Peer-to-Peer Networks Distribution Decentralized control Self-organization Outline Symmetric communication Survey Self-organizing overlay network File system on top of P2P network Contributions from Peter


  1. Background Peer-to-Peer Networks • Distribution • Decentralized control • Self-organization Outline • Symmetric communication Survey Self-organizing overlay network File system on top of P2P network Contributions from Peter Druschel Spring 2005 CS 461 1 Spring 2005 Examples Common Issues • Pioneers • Organize, maintain overlay network – Napster, Gnutella, FreeNet – node arrivals • Academic Prototypes – node failures – Pastry, Chord, CAN,… • Resource allocation/load balancing • Resource location • Locality (network proximity) Idea: generic p2p substrate Spring 2005 Spring 2005 CS 461 4

  2. Architecture Pastry • Self-organizing overlay network Event Network • Consistent hashing ? P2p application layer notification storage • Lookup/insert object in < log 16 N routing steps (expected) self-organizing • O(log N) per-node state overlay network P2P Substrate • Network locality heuristics TCP/IP Internet Spring 2005 CS 461 5 Spring 2005 CS 461 6 Object Distribution Object Insertion/Lookup 2 128 - 1 O 2 128 - 1 O Consistent hashing Msg with key X [ Karger et al. ‘97 ] is routed to live X 128 bit circular id space node with nodeId objId closest to X nodeIds (uniform random) objIds (uniform random) nodeIds Problem: complete routing Invariant: node with numerically closest nodeId table not feasible maintains object Route(X) Spring 2005 CS 461 7 Spring 2005 CS 461 8

  3. Leaf Sets Routing d471f1 d467c4 d462ba d46a1c d4213f Each node maintains IP addresses of the nodes with the L numerically closest larger and smaller nodeIds, respectively. • routing efficiency/robustness Route(d46a1c) d13da3 Properties • fault detection (keep-alive) • log 16 N steps • application-specific local coordination • O( log N ) state 65a1fc Spring 2005 CS 461 9 Spring 2005 Routing Procedure Routing if (destination is within range of our leaf set) forward to numerically closest member Integrity of overlay: else • guaranteed unless L/2 simultaneous failures of let l = length of shared prefix nodes with adjacent nodeIds let d = value of l- th digit in D ’s address if ( R ld exists) forward to R ld Number of routing hops: else • No failures: < log 16 N expected, 128/b + 1 max forward to a known node that • During failure recovery: (a) shares at least as long a prefix (b) is numerically closer than this node – O(N) worst case, average case much better Spring 2005 CS 461 11 Spring 2005 CS 461 12

  4. Node Addition Node Departure (Failure) d471f1 Leaf set members exchange keep-alive messages d467c4 d462ba d46a1c d4213f New node: d46a1c • Leaf set repair (eager): request set from farthest live node in set • Routing table repair (lazy): get table from peers in the same row, then higher rows Route(d46a1c) d13da3 65a1fc Spring 2005 CS 461 13 Spring 2005 CS 461 14 PAST: Cooperative, archival file API storage and distribution • route(M, X): route message M to node with nodeId • Layered on top of Pastry numerically closest to X • Strong persistence • deliver(M): deliver message M to application • High availability • forwarding(M, X): message M is being forwarded • Scalability towards key X • Reduced cost (no backup) • newLeaf(L): report change in leaf set L to • Efficient use of pooled resources application Spring 2005 CS 461 15 Spring 2005

  5. PAST API PAST: File storage • Insert - store replica of a file at k diverse storage nodes • Lookup - retrieve file from a nearby live storage fileId node that holds a copy • Reclaim - free storage associated with a file Insert fileId Files are immutable Spring 2005 CS 461 17 Spring 2005 CS 461 18 PAST: File storage PAST: File Retrieval C k=4 k replicas Storage Invariant : File “replicas” are fileId Lookup stored on k nodes file located in log 16 N fileId with nodeIds steps (expected) closest to fileId Insert fileId usually locates replica (k is bounded by the nearest client C leaf set size) Spring 2005 CS 461 19 Spring 2005 CS 461 20

Recommend


More recommend