680 likes | 692 Views
Pastry Scalable, decentralized object location and routing for large-scale peer-to-peer systems. Peter Druschel, Rice University Antony Rowstron, Microsoft Research Cambridge, UK Modified and Presented by: JinYoung You. Outline. Background Pastry Pastry proximity routing Related Work
E N D
PastryScalable, decentralized object location and routing for large-scale peer-to-peer systems Peter Druschel, Rice University Antony Rowstron, Microsoft Research Cambridge, UK Modified and Presented by: JinYoung You
Outline • Background • Pastry • Pastry proximity routing • Related Work • Conclusions
Background Peer-to-peer systems • distribution • decentralized control • self-organization • symmetry (communication, node roles)
Common issues • Organize, maintain overlay network • node arrivals • node failures • Resource allocation/load balancing • Resource location • Network proximity routing IDea: provide a generic p2p substrate
Architecture Event notification Network storage ? p2p application layer p2p substrate (self-organizing overlay network) Pastry TCP/IP Internet
Structured p2p overlays One primitive: route(M, X): route message M to the live node with nodeID closest to key X • nodeIDs and keys are from a large, sparse id space
Distributed Hash Tables (DHT) nodes k1,v1 k2,v2 k3,v3 P2P overlay network Operations: insert(k,v) lookup(k) k4,v4 k5,v5 k6,v6 • p2p overlay maps keys to nodes • completely decentralized and self-organizing • robust, scalable
Why structured p2p overlays? • Leverage pooled resources (storage, bandwidth, CPU) • Leverage resource diversity (geographic, ownership) • Leverage existing shared infrastructure • Scalability • Robustness • Self-organization
Outline • Background • Pastry • Pastry proximity routing • Related Work • Conclusions
Pastry: Object distribution • Consistent hashing[Karger et al. ‘97] • 128 bit circular id space • nodeIDs(uniform random) • objIDs (uniform random) • Invariant: node with numerically closest nodeID maintains object 2128-1 O objID nodeIDs
Pastry: Object insertion/lookup 2128-1 O Msg with key X is routed to live node with nodeID closest to X Problem: complete routing table not feasible X Route(X)
Pastry: Routing Tradeoff • O(log N) routing table size • O(log N) message forwarding steps
Pastry: Routing table (# 65a1fcx) Row 0 Row 1 Row 2 Row 3 log16 N rows
Pastry: Routing Properties • log16 N steps • O(log N) state d471f1 d467c4 d462ba d46a1c d4213f Route(d46a1c) d13da3 65a1fc
Pastry: Leaf sets • Each node maintains IP addresses of the nodes with the L/2 numerically closest larger and smaller nodeIDs, respectively. • routing efficiency/robustness • fault detection (keep-alive) • application-specific local coordination
Pastry: 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
Pastry: Performance Integrity of overlay/ message delivery: • guaranteed unless L/2 simultaneous failures of nodes with adjacent nodeIDs Number of routing hops: • No failures: < log16N expected, 128/b + 1 max • During failure recovery: • O(N) worst case, average case much better
Pastry: Self-organization Initializing and maintaining routing tables and leaf sets • Node addition • Node departure (failure)
Pastry: Node addition d471f1 d467c4 d462ba d46a1c d4213f New node: d46a1c Route(d46a1c) d13da3 65a1fc
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
Pastry: Experimental results Prototype • implemented in Java • emulated network • deployed testbed (currently ~25 sites worldwide)
Pastry: Average # of hops L=16, 100k random queries
Pastry: # of hops (100k nodes) L=16, 100k random queries
3 2.96 2.95 2.9 2.85 Average hops per lookup 2.8 2.74 2.75 2.73 2.7 2.65 2.6 No Failure Failure After routing table repair Pastry: # routing hops (failures) L=16, 100k random queries, 5k nodes, 500 failures
Outline • Background • Pastry • Pastry proximity routing • Related Work • Conclusions
Pastry: Proximity routing Assumption: scalar proximity metric • e.g. ping delay, # IP hops • a node can probe distance to any other node Proximity invariant: Each routing table entry refers to a node close to the local node (in the proximity space), among all nodes with the appropriate nodeID prefix.
d467c4 d471f1 d467c4 Proximity space d462ba d46a1c d4213f Route(d46a1c) d13da3 d4213f 65a1fc 65a1fc d462ba d13da3 NodeID space Pastry: Routes in proximity space
Pastry: Distance traveled L=16, 100k random queries, Euclidean proximity space
Pastry: Locality properties • Expected distance traveled by a message in the proximity space is within a small constant of the minimum • Routes of messages sent by nearby nodes with same keys converge at a node near the source nodes 3) Among k nodes with nodeIDs closest to the key, message likely to reach the node closest to the source node first
d467c4 d471f1 d467c4 d462ba d46a1c d4213f Proximity space Route(d46a1c) d13da3 65a1fc d4213f New node: d46a1c 65a1fc NodeID space d462ba d13da3 Pastry: Node addition
Pastry delay GATech top., .5M hosts, 60K nodes, 20K random messages
Pastry: API • route(M, X): route message M to node with nodeID numerically closest to X • deliver(M): deliver message M to application • forwarding(M, X):message M is being forwarded towards key X • newLeaf(L): report change in leaf set L to application
Pastry: Security • Secure nodeID assignment • Secure node join protocols • Randomized routing • Byzantine fault-tolerant leaf set membership protocol
Outline • Background • Pastry • Pastry proximity routing • Related Work • Conclusions
Pastry: Related work • Chord [Sigcomm’01] • CAN [Sigcomm’01] • Tapestry [TR UCB/CSD-01-1141] • PAST [SOSP’01] • SCRIBE [NGC’01]
Outline • Background • Pastry • Pastry proximity routing • Related Work • Conclusions
Conclusions • Generic p2p overlay network • Scalable, fault resilient, self-organizing, secure • O(log N) routing steps (expected) • O(log N) routing table size • Network proximity routing • For more information http://www.cs.rice.edu/CS/Systems/Pastry
Thanks • Any Questions?
Outline • PAST • SCRIBE
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
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
PAST: File storage fileID Insert fileID
k=4 fileID Insert fileID PAST: File storage Storage Invariant: File “replicas” are stored on k nodes with nodeIDs closest to fileID (k is bounded by the leaf set size)
PAST: File Retrieval C k replicas Lookup file located in log16 N steps (expected) usually locates replica nearest client C fileID
PAST: Exploiting Pastry • Random, uniformly distributed nodeIDs • replicas stored on diverse nodes • Uniformly distributed fileIDs • e.g. SHA-1(filename,public key, salt) • approximate load balance • Pastry routes to closest live nodeID • availability, fault-tolerance
PAST: Storage management • Maintain storage invariant • Balance free space when global utilization is high • statistical variation in assignment of files to nodes (fileID/nodeID) • file size variations • node storage capacity variations • Local coordination only (leaf sets)
Experimental setup • Web proxy traces from NLANR • 18.7 Gbytes, 10.5K mean, 1.4K median, 0 min, 138MB max • Filesystem • 166.6 Gbytes. 88K mean, 4.5K median, 0 min, 2.7 GB max • 2250 PAST nodes (k = 5) • truncated normal distributions of node storage sizes, mean = 27/270 MB
Need for storage management • No diversion (tpri = 1, tdiv = 0): • max utilization 60.8% • 51.1% inserts failed • Replica/file diversion (tpri = .1, tdiv = .05): • max utilization > 98% • < 1% inserts failed