Docsity

Decentralized Hash Tables: CAN, Chord, and Pastry Implementations, Study notes of Computer Science

Partial preview of the text

Download Decentralized Hash Tables: CAN, Chord, and Pastry Implementations and more Study notes Computer Science in PDF only on Docsity!

i

Ken

Birman

Cornell

University.

CS

Fall^ 2008.

What

is^ a^

Distributed

Hash

Table

(DHT)?

y^ Exactly

that^ ☺ y^ A^ service,

distributed

over^ multiple

machines,

with

h^ h^

bl^

i

hash^ table

semantics y^ Put (key,

value),^

Value^ =^

Get (key)

y^ Designed

to^ work

in^ a^ peer

‐to‐peer

(P2P)^ environment

Designed

to^ work

in^ a^ peer

to^ peer

(P2P)^ environment

y^ No^ central

control y^ Nodes

under^ different

administrative

control

B^ f^

i^ “i f

”

y^ But^ of

course

can^ operate

in^ an^ “infrastructure”

sense

P2P

“environment”

y^ Nodes

come and^ go

at^ will

(possibly

quite^

frequently

a^ few^ minutes)N d^

h^ h

i i

y^ Nodes

have^ heterogeneous

capacities

y^ Bandwidth,

processing,

and^ storage

y^ N d

b h^

b dl

y^ Nodes

may^ behave

badly

y^ Promise

to^ do^ something

(store

a^ file)^

and^ not

do^ it

(free‐loaders)(^

) y^ Attack

the^ system

Several

flavors,

each

with

variants

y^ Tapestry

(Berkeley) y^ Based

on^ Plaxton trees

‐‐‐similar

to^ hypercube

routing

y^ The^ first^ DHT y^ The^ first^ DHT y^ Complex

and^ hard

to^ maintain

(hard^

to^ understand

too!) y CAN^ (ACIRI),

Chord

(MIT),

and^ Pastry

(Rice/MSR

Cambridge)^ y^ Second

wave^ of

DHTs

(contemporary

with^ and

y^ Second

wave^ of

DHTs

(contemporary

with^ and

independent

of^ each

other) * Landmark Routing, 1988, used a form of DHTcalled Assured Destination Binding (ADB)

Simple

example

(doesn’t

scale)

y^ Circular

number

space

0 to^127

y^ Routing

rule^ is

to^ move

counter

l^ k^

i^

il^

d^ ID^

≥^ k

13 (^127111)

clockwise

until^ current

node^

ID^ ≥^ key,

and^ last

hop^ node

ID^ <^ key

33 97

y^ Example:

key^ =

y^ Obviously

you^ will

route to^ node

58 81

y^ Obviously

you^ will

route to^ node

from^ no

matter

where

you^ start

Building

any

DHT

y^ Newcomer

always

starts

with^ at

least

one^ known

member

13 (^127111)

33 97 81

(^5824)

Building

any

DHT

y^ Newcomer

always

starts

with^ at

least

one^ known

member N^

h^ f^

“^ lf”^ i^ h

13 (^127111)

y^ Newcomer

searches

for^ “self”

in^ the

network^ y^ hash

key^ =^ newcomer’s

node^ ID

33 97

24 y

hash^ key

=^ newcomer s

node^ ID

y^ Search

results

in^ a^ node

in^ the

vicinity

where^

newcomer

needs

to^ be

81

58

y^ Links

are^ added/removed

to^ satisfy

properties

of^ network

Building

any

DHT

y^ Newcomer

always

starts

with^ at

least

one^ known

member y^ Newcomer

searches

for^ “self”

in^ the

13 (^127111)

y^ Newcomer

searches

for^ self

in^ the

network^ y^ hash

key^ =^ newcomer’s

node^ ID

33 97

24 y^ Search

results

in^ a^ node

in^ the

vicinity

where

newcomer

needs

to^ be

y^ Links

are^ added/removed

to^ satisfy

81

58

y^ Links

are^ added/removed

to^ satisfy

properties

of^ network y^ Objects

that^ now

hash^ to^ new

node^

are

transferred

to^ new

node

Properties

of^ most

DHTs

y^ Memory

requirements

grow^

(something

like)

logarithmically

with^ N R^ i^

h^ l^

h^

(^

hi^ lik )

y^ Routing

path^ length

grows

(something

like)

logarithmically

with^ N y^ Cost

of^ adding

or^ removing

a^ node

grows

(something

y^ Cost

of^ adding

or^ removing

a^ node

grows

(something

like)^ logarithmically

with^ N

y^ Has caching,

replication,

etc…

Has^ caching,

replication,

etc…

DHT

Issues

y^ Resilience

to^ failures y^ Load

BalanceH t^

it y^ Heterogeneity y^ Number

of^ objects

at^ each

node

y^ Routing

hot^ spotsg p y^ Lookup

hot^ spots y^ Locality

(performance

issue)

y^ Churn

(performance

and^ correctness

issue)

y^ Security

Things

we’re

going

to^

look

at

y^ What

is^ the

structure? y^ How

does^ routing

work^

in^ the structure?

H^ d

it^ d^ l^

ith^

d^ d^

t^?

y^ How

does^ it

deal^ with

node^

departures?

y^ How

does^ it

scale? y^ How

does^ it

deal^ with

locality?

y^ How

does^ it

deal^ with

locality?

y^ What

are^ the

security

issues?

CAN structure is a

cartesian

coordinate

CAN

structure

is^ a^

cartesian

coordinate

space

in^ a

D^ dimensional

torus

1 CAN graphics care of Santashil PalChaudhuri, Rice Univ

N t^

t^

“t^

”^

d “ id

Note:

torus

wraps

on^ “t

op”^

and^

“sides”

3 1

2

Each node in CAN network occupiesEach

node

in^ CAN

network

occupies

a^ “square”

in^ the

space

3 1

2

4