Docsity

Pastry, Pastry Node, Leaf Set - Notes | CMSC 818, Study notes of Computer Science

Partial preview of the text

Download Pastry, Pastry Node, Leaf Set - Notes | CMSC 818 and more Study notes Computer Science in PDF only on Docsity!

Pastry & PASTJeff Odom University of Maryland

(w/minor additions by A. Sussman)

Pastry University of Maryland

z^ Overlay network z^ Decentralized z^ Routing based on prefix matching z^ Uses proximity metric

Leaf Set University of Maryland

z^ Size |L| configurable– Usually 2

b^ b+1or 2 z^ |L| numerically nearest nodeIDs z^ Only numerically near – not necessarilynetwork close

Routing Table University of Maryland

z^ ⎡log^

N⎤^ rows x 2 (^) 2b

b^ – 1 columns

  • N: network size z Rown entries match first

n digits with

current nodeID z Column number follows matched digits z May not be fully populated

Neighborhood Set University of Maryland

z^ Size |M| configurable– Usually 2

b^ b+1or 2 z^ Closest nodes based on proximity metric z^ Not used in routing, but instead forlocality guarantees

Routing University of Maryland

z^ If targetID in range of leaf set,forward to numerically nearest leaf z^ Else forward to node that shares atleast one more digit in its prefix thancurrent nodeID z^ If no such node exists, forward to nodethat shares at least as many digits butnumerically nearer than current nodeID

University of Maryland

Node Joins (cont’d)

z^ X’s Neighborhood Set = A’s NS + A z^ X’s Leaf Set = Z’s LS + Z z^ Row 0 of Routing Table = A’s row 0 z^ Row 1 = B’s row 1 z^ Etc. z^ Last, send state to every node in X’sNS, RT, and LS

Node Departure University of Maryland

z^ Invalid nodes in leaf set detected byheartbeat monitor– Repair by inserting node from another leaf’s LS z^ Heartbeat for neighborhood set– Query all live neighbors for their NS, choosereplacement according to proximity metric z^ Invalid routing entries detected whenattempting to route– Query nodes in row for replacement entry– Query successive rows until success

Route Locality University of Maryland

k-nearest Routing University of Maryland

z^ Recall routing based on prefix z^ Goal is to reach not target nodeID, butany of

k numerically nearest nodes z^ This may fail prefix matching z^ Use heuristic to determine when closetok nearest nodes– Based on density of nodeIDs using local info z^ Switch to numerically closest routing

PAST Files University of Maryland

z^ 160 bit fileID– Hash (SHA1) of filename, owner public key,random salt z^ Stored on

k PAST nodes numerically nearest to 128 msb of fileID– Recall Pastry nodeIDs are 128 bit–k copies are persistent– Choice of

k by owner

  • May be cached on additional nodes z 3 operations: insert, lookup, reclaim

File Insertion University of Maryland

z^ Owner generates fileID z^ Owner issues file certificate signedwith public key– Certificate: fileID, hash(file),

k, salt, creation

date, optionally additional metadata z Routes file and certificate to 128 msbof fileID

University of Maryland

File Lookups/Reclaims

z^ Lookup request routed to fileID z^ First node in

k-set to receive lookup request replies– Node close to requestor by locality propertiesof Pastry z File reclaim similar to delete, but notguaranteed to be removed– Avoids complex agreement protocols

University of Maryland

Storage Management

z^ Assume storage differs by no more than2 orders of magnitude– Too much storage: split into different nodeIDs– Too little: reject node join z^ Want to balance storage as systemapproaches 100% storage utilization z^ Only local decisions z^ Single node full: replica diversion z^ Entire set full: file diversion