Chor d: A Scalable Peer-t o-peer Lookup Chor d: A Scalable Peer-t - - PowerPoint PPT Presentation

chor d a scalable peer t o peer lookup chor d a scalable
SMART_READER_LITE
LIVE PREVIEW

Chor d: A Scalable Peer-t o-peer Lookup Chor d: A Scalable Peer-t - - PowerPoint PPT Presentation

Chor d: A Scalable Peer-t o-peer Lookup Chor d: A Scalable Peer-t o-peer Lookup Ser vice f or I nt er net Applicat ions Ser vice f or I nt er net Applicat ions Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan


slide-1
SLIDE 1

Ion Stoica, Robert Morris, David Karger,

  • M. Frans Kaashoek, Hari Balakrishnan

MIT and Berkeley present ed by Daniel Figueiredo

Chor d: A Scalable Peer-t o-peer Lookup Ser vice f or I nt er net Applicat ions Chor d: A Scalable Peer-t o-peer Lookup Ser vice f or I nt er net Applicat ions

pr esent at ion based on slides by Rober t Mor r is (SI GCOMM’01)

slide-2
SLIDE 2

Out line Out line

Mot ivat ion and background Consist ency caching Chord Perf ormance evaluat ion Conclusion and discussion

slide-3
SLIDE 3

Mot ivat ion Mot ivat ion

How t o f ind dat a in a dist ribut ed f ile sharing syst em?

Lookup is t he key problem

Internet

Publisher Key= “LetItBe” Value= MP3 data Lookup(“LetItBe”)

N1 N2 N3 N5 N4

Client ?

slide-4
SLIDE 4

Cent ralized Solut ion Cent ralized Solut ion

Requires O(M) st at e Single point of f ailure

Internet

Publisher Key= “LetItBe” Value= MP3 data Lookup(“LetItBe”)

N1 N2 N3 N5 N4

Client

DB

Cent ral server (Napst er)

slide-5
SLIDE 5

Dist ribut ed Solut ion (1) Dist ribut ed Solut ion (1)

Worst case O(N) messages per lookup

Internet

Publisher Key= “LetItBe” Value= MP3 data Lookup(“LetItBe”)

N1 N2 N3 N5 N4

Client

Flooding (Gnut ella, Morpheus, et c.)

slide-6
SLIDE 6

Dist ribut ed Solut ion (2) Dist ribut ed Solut ion (2)

Rout ed messages (Freenet , Tapest ry, Chord, CAN, et c.)

Internet

Publisher Key= “LetItBe” Value= MP3 data Lookup(“LetItBe”)

N1 N2 N3 N5 N4

Client

Only exact mat ches

slide-7
SLIDE 7

Rout ing Challenges Rout ing Challenges

Def ine a usef ul key nearness met ric Keep t he hop count small Keep t he rout ing t ables “ right size” St ay robust despit e rapid changes in membership

Aut hors claim:

Chord: emphasizes ef f iciency and

simplicit y

slide-8
SLIDE 8

Chord Overview Chord Overview

Provides peer-t o-peer hash lookup service:

Lookup(key) → I P address Chord does not st ore t he dat a

How does Chord locat e a node? How does Chord maint ain rout ing t ables? How does Chord cope wit h changes in membership?

slide-9
SLIDE 9

Chord propert ies Chord propert ies

Ef f icient : O(Log N) messages per lookup N is t he t ot al number of servers Scalable: O(Log N) st at e per node Robust : survives massive changes in membership Proof s are in paper / t ech report Assuming no malicious part icipant s

slide-10
SLIDE 10

Chord I Ds Chord I Ds

m bit ident if ier space f or bot h keys and nodes Key ident if ier = SHA-1(key)

Key= “LetItBe” ID= 60

SHA-1

IP= “ 198.10.10.1” ID= 123

SHA-1

Node ident if ier = SHA-1(I P

address)

Bot h are unif ormly dist ribut ed How t o map key I Ds t o node I Ds?

slide-11
SLIDE 11

Consist ent Hashing [Karger 97] Consist ent Hashing [Karger 97]

A key is st or ed at it s successor : node wit h next higher I D

N32 N90 N123 K20 K5

Circular 7-bit ID space

IP= “ 198.10.10.1”

K101 K60

Key= “LetItBe”

slide-12
SLIDE 12

Consist ent Hashing Consist ent Hashing

Ever y node knows of ever y ot her node requires global inf ormat ion Rout ing t ables ar e lar ge O(N) Lookups are f ast O(1)

N32 N90 N123

Hash(“LetItBe” ) = K60

N10 N55 Where is “LetItBe”?

“ N90 has K60”

K60

slide-13
SLIDE 13

Chord: Basic Lookup Chord: Basic Lookup

N32 N90 N123

Hash(“LetItBe” ) = K60

N10 N55 Where is “LetItBe”?

“ N90 has K60”

K60

Every node knows it s successor in t he ring requires O(N) t ime

slide-14
SLIDE 14

“ Finger Tables” “ Finger Tables”

Every node knows m ot her nodes in t he ring I ncrease dist ance exponent ially

N80

80 + 20

N112 N96 N16

80 + 21 80 + 22 80 + 23 80 + 24 80 + 25 80 + 26

slide-15
SLIDE 15

“ Finger Tables” “ Finger Tables”

Finger i point s t o successor of n+2i

N120 N80

80 + 20

N112 N96 N16

80 + 21 80 + 22 80 + 23 80 + 24 80 + 25 80 + 26

slide-16
SLIDE 16

Lookups are Fast er Lookups are Fast er

Lookups t ake O(Log N) hops

N32 N10 N5 N20 N110 N99 N80 N60

Lookup(K19) K19

slide-17
SLIDE 17

J oining t he Ring J oining t he Ring

Three st ep process:

I nit ialize all f ingers of new node Updat e f inger s of exist ing nodes Tr ansf er keys f r om successor t o new node

Less aggressive mechanism (lazy f inger updat e):

I nit ialize only t he f inger t o successor node Periodically verif y immediat e successor, predecessor Per iodically r ef r esh f inger t able ent r ies

slide-18
SLIDE 18

J oining t he Ring - St ep 1 J oining t he Ring - St ep 1

I nit ialize t he new node f inger t able

Locat e any node p in t he r ing Ask node p t o lookup f inger s of new node N36 Ret urn result s t o new node

N36

  • 1. Lookup(37,38,40,…,100,164)

N60 N40 N5 N20 N99 N80

slide-19
SLIDE 19

J oining t he Ring - St ep 2 J oining t he Ring - St ep 2

Updat ing f ingers of exist ing nodes

new node calls updat e f unct ion on exist ing nodes exist ing nodes can r ecur sively updat e f inger s of ot her

nodes

N36 N60 N40 N5 N20 N99 N80

slide-20
SLIDE 20

J oining t he Ring - St ep 3 J oining t he Ring - St ep 3

Transf er keys f rom successor node t o new node

  • nly keys in t he r ange ar e t r ansf er r ed

Copy keys 21..36 from N40 to N36 K30 K38

N36 N60 N40 N5 N20 N99 N80

K30 K38

slide-21
SLIDE 21

Handing Failures Handing Failures

Failure of nodes might cause incorrect lookup

N120 N113 N102 N80 N85 N10

Lookup(90)

N80 doesn’t know cor r ect successor , so lookup f ails Successor f inger s ar e enough f or cor r ect ness

slide-22
SLIDE 22

Handling Failures Handling Failures

Use successor list

Each node knows r immediat e successor s Af t er f ailur e, will know f ir st live successor Cor r ect successor s guar ant ee cor r ect lookups

Guarant ee is wit h some probabilit y

Can choose r t o make pr obabilit y of lookup f ailur e

arbit rarily small

slide-23
SLIDE 23

Evaluat ion Overview Evaluat ion Overview

Quick lookup in large syst ems Low variat ion in lookup cost s Robust despit e massive f ailure Experiment s conf irm t heoret ical result s

slide-24
SLIDE 24

Cost of lookup Cost of lookup

Cost is O(Log N) as predict ed by t heory

const ant is 1/ 2

Number of Nodes Average Messages per Lookup

slide-25
SLIDE 25

Robust ness Robust ness

Simulat ion r esult s: st at ic scenar io Failed lookup means or iginal node wit h key f ailed (no r eplica of keys) Result implies good balance of keys among nodes!

slide-26
SLIDE 26

Robust ness Robust ness

Simulat ion r esult s: dynamic scenar io Failed lookup means f inger pat h has a f ailed node 500 nodes init ially average st abilize( ) call 30s 1 lookup per second (Poisson) x j oin/ f ail per second (Poisson)

slide-27
SLIDE 27

Current implement at ion Current implement at ion

Chord library: 3,000 lines of C++ Deployed in small I nt ernet t est bed I ncludes: Correct concurrent j oin/ f ail Proximit y-based rout ing f or low delay (?) Load cont rol f or het erogeneous nodes (?) Resist ance t o spoof ed node I Ds (?)

slide-28
SLIDE 28

St rengt hs St rengt hs

Based on t heoret ical work (consist ent hashing) Proven perf ormance in many dif f erent aspect s

“ wit h high probabilit y” proof s

Robust (I s it ?)

slide-29
SLIDE 29

Weakness Weakness

NOT t hat simple (compared t o CAN) Member j oining is complicat ed

aggr essive mechanisms r equir es t oo many messages and updat es no analysis of conver gence in lazy f inger mechanism

Key management mechanism mixed bet ween layers

upper layer does inser t ion and handle node f ailur es Chor d t r ansf er keys when node j oins (no leave mechanism!)

Rout ing t able grows wit h # of members in group Worst case lookup can be slow

slide-30
SLIDE 30

Discussions Discussions

Net work proximit y (consider lat ency?) Prot ocol securit y

Malicious dat a inser t ion Malicious Chor d t able inf or mat ion

Keyword search and indexing ...