20
Effizientes Routing in P2P Netzwerken Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Dennis Schade

Effizientes Routing in P2P Netzwerken Chord: A Scalable Peer-to- peer Lookup Protocol for Internet Applications Dennis Schade

Embed Size (px)

Citation preview

Effizientes Routing in P2P Netzwerken

Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications

Dennis Schade

Outline

Short introduction to P2P systems Chord System Model Chord Algorithm Simulation Results Future Work

Introduction to P2P Systems

Basic principles sharing ressources decentralization self-organization

Main advantages no Single Point of Failure load balancing scalability

Main problems load balancing decentralization

self-organization availability

scalability efficient node localization

Addressing dataData addressed by a Hashtable calculating hashvalues for keys storing reference to data identified by

hashvalues

In P2P systems the hashtable is partitioned distributed over peers

Such a hashtable is called distributed hashtable(DHT)

Chord: A Scalable Peer-to-peer Lookup Protocol Efficient node localization Distributed lookup protocol Only one operation: given a key, Chord

maps the key onto a node Simplicity, provable performance, proven

correctness

The Chord System Model

Every node has an unique identifier

Identifiers are arranged on a identifier circle modulo 2m

m is called exponent of the ring

Nodes know their successor and predecessor

The Chord System Model

key k is assigned to the node whose identifier is equal to or greater than k this node is called

successor(k) it is the first node clockwise

from k. lookup(k) returns

responsible peer

The Chord algorithm -Simple node localization

// ask node n to find the successor of idn.lookup(id) if (id (n; successor]) return successor; else // forward query around the circle return successor.lookup(id);

Number of messages linear in number of nodes

The Chord algorithm –Scalable node localization Each node holds additional routing

information to accelerate lookupsnodes have a so called finger table with up to

m entries ith finger table entry at node x points to the first

node y that succeds x‘s ID by at least 2i-1

y = lookup(x.ID + 2i-1)

Example: Scalable node localizationfinger[i] = lookup(x.ID + 2i-1)

Finger table for N8 (m=6)

N8+1 K9 N14

N8+2 K10 N14

N8+4 K12 N14

N8+8 K16 N21

N8+16 K24 N32

N8+32 K40 N42

The Chord algorithm –Scalable node localization

search in finger table for the node n which most immediatly precedes key k

n.lookup(k)

Number of messages:

O(log N)

The Chord algorithm –Node joins and stabilization

(1) (2) (3)

?

The Chord algorithm –Node joins and stabilization

Stabilization protocol for a node x: x.stabilize():

ask successor y for its predecessor p if p (x; y] then p is x‘s new successor

x.notify(): notify x‘s successor p of x‘s existence notified node may change predecessor to x

The Chord algorithm –Node joins and stabilization

(1) (2) (3)

Implementation Overview

N56

clients

serverstabilizer

lookupftableupdate

fingertable

Mediator

Implementation Demonstration

Simulation & test results

Test conditions fully populated chord ring of size 8, 16 and

32 correct fingertables no node joins no node departure communication over loopback device

Test results number of forwardings in O(log N) bandwidth usage (TCP) ≤ 1 KB/s bandwidth usage (UDP) ≤ 2.5 KB/s average lookup time is ≤ 50 ms

Simulation & test results

Future work

Impact on lookups random node joins and departures incorrect finger tables

improvements in communication protocol support of node distances S-Chord

Questions & Discussion

Thank you for attention!

Questions?