PeertoPeer Networks Outline Survey Selforganizing overlay network File

  • Slides: 19
Download presentation
Peer-to-Peer Networks Outline Survey Self-organizing overlay network File system on top of P 2

Peer-to-Peer Networks Outline Survey Self-organizing overlay network File system on top of P 2 P network Contributions from Peter Druschel 1

Background • • Distribution Decentralized control Self-organization Symmetric communication 2

Background • • Distribution Decentralized control Self-organization Symmetric communication 2

Examples • Pioneers – Napster, Gnutella, Free. Net • Academic Prototypes – Pastry, Chord,

Examples • Pioneers – Napster, Gnutella, Free. Net • Academic Prototypes – Pastry, Chord, CAN, … 3

Common Issues • Organize, maintain overlay network – node arrivals – node failures •

Common Issues • Organize, maintain overlay network – node arrivals – node failures • Resource allocation/load balancing • Resource location • Locality (network proximity) Idea: generic p 2 p substrate 4

Architecture Event notification Network storage P 2 P Substrate TCP/IP ? P 2 p

Architecture Event notification Network storage P 2 P Substrate TCP/IP ? P 2 p application layer self-organizing overlay network Internet 5

Object Distribution 2128 - 1 Consistent hashing [Karger et al. ‘ 97] 0 objid

Object Distribution 2128 - 1 Consistent hashing [Karger et al. ‘ 97] 0 objid 128 bit circular id space node. Ids (uniform random) nodeids obj. Ids (uniform random) Invariant: node with numerically closest node. Id maintains object 7

Object Insertion/Lookup 2128 - 1 O X Msg with key X is routed to

Object Insertion/Lookup 2128 - 1 O X Msg with key X is routed to live node with node. Id closest to X Problem: complete routing table not feasible Route(X) 8

Routing Properties • log 16 N steps • O(log N) state 9

Routing Properties • log 16 N steps • O(log N) state 9

Leaf Sets Each node maintains IP addresses of the nodes with the L numerically

Leaf Sets Each node maintains IP addresses of the nodes with the L numerically closest larger and smaller node. Ids, respectively. • routing efficiency/robustness • fault detection (keep-alive) • application-specific local coordination 10

Routing Procedure if (destination is within range of our leaf set) forward to numerically

Routing Procedure if (destination is within range of our leaf set) forward to numerically closest member else let l = length of shared prefix let d = value of l-th digit in D’s address if (Rld exists) forward to Rld else forward to a known node that (a) shares at least as long a prefix (b) is numerically closer than this node 11

Routing Integrity of overlay: • guaranteed unless L/2 simultaneous failures of nodes with adjacent

Routing Integrity of overlay: • guaranteed unless L/2 simultaneous failures of nodes with adjacent node. Ids Number of routing hops: • No failures: < log 16 N expected, 128/b + 1 max • During failure recovery: – O(N) worst case, average case much better 12

Node Addition 13

Node Addition 13

Node Departure (Failure) Leaf set members exchange keep-alive messages • Leaf set repair (eager):

Node Departure (Failure) Leaf set members exchange keep-alive messages • 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 14

API • route(M, X): route message M to node with node. Id numerically closest

API • route(M, X): route message M to node with node. Id numerically closest to X • deliver(M): deliver message M to application • forwarding(M, X): message M is being forwarded towards key X • new. Leaf(L): report change in leaf set L to application 15

PAST: Cooperative, archival file storage and distribution • • • Layered on top of

PAST: Cooperative, archival file storage and distribution • • • Layered on top of Pastry Strong persistence High availability Scalability Reduced cost (no backup) Efficient use of pooled resources 16

PAST API • Insert - store replica of a file at k diverse storage

PAST API • Insert - store replica of a file at k diverse storage nodes • Lookup - retrieve file from a nearby live storage node that holds a copy • Reclaim - free storage associated with a file Files are immutable 17

PAST: File storage file. Id Insert file. Id 18

PAST: File storage file. Id Insert file. Id 18

PAST: File storage k=4 file. Id Storage Invariant: File “replicas” are stored on k

PAST: File storage k=4 file. Id Storage Invariant: File “replicas” are stored on k nodes with node. Ids closest to file. Id Insert file. Id (k is bounded by the leaf set size) 19

PAST: File Retrieval C k replicas Lookup file. Id file located in log 16

PAST: File Retrieval C k replicas Lookup file. Id file located in log 16 N steps (expected) usually locates replica nearest client C 20