Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,

Slides:



Advertisements
Similar presentations
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Advertisements

Peer to Peer and Distributed Hash Tables
CHORD – peer to peer lookup protocol Shankar Karthik Vaithianathan & Aravind Sivaraman University of Central Florida.
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert MorrisDavid, Liben-Nowell, David R. Karger, M. Frans Kaashoek,
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications Prepared by Ali Yildiz (with minor modifications by Dennis Shasha)
Technische Universität Yimei Liao Chemnitz Kurt Tutschku Vertretung - Professur Rechner- netze und verteilte Systeme Chord - A Distributed Hash Table Yimei.
Technische Universität Chemnitz Kurt Tutschku Vertretung - Professur Rechner- netze und verteilte Systeme Chord - A Distributed Hash Table Yimei Liao.
IBM Haifa Research 1 Finding Data in the Cloud using Distributed Hash Tables (Chord) IBM Haifa Research Storage Systems.
Chord: A Scalable Peer-to- Peer Lookup Service for Internet Applications Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
The Chord P2P Network Some slides have been borowed from the original presentation by the authors.
CHORD: A Peer-to-Peer Lookup Service CHORD: A Peer-to-Peer Lookup Service Ion StoicaRobert Morris David R. Karger M. Frans Kaashoek Hari Balakrishnan Presented.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Speaker: Cathrin Weiß 11/23/2004 Proseminar Peer-to-Peer Information Systems.
Ion Stoica, Robert Morris, David Liben-Nowell, David R. Karger, M
Chord: A scalable peer-to- peer lookup service for Internet applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashock, Hari Balakrishnan.
1 1 Chord: A scalable Peer-to-peer Lookup Service for Internet Applications Dariotaki Roula
Chord:A scalable peer-to-peer lookup service for internet applications
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan Presented.
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications
Robert Morris, M. Frans Kaashoek, David Karger, Hari Balakrishnan, Ion Stoica, David Liben-Nowell, Frank Dabek Chord: A scalable peer-to-peer look-up.
Robert Morris, M. Frans Kaashoek, David Karger, Hari Balakrishnan, Ion Stoica, David Liben-Nowell, Frank Dabek Chord: A scalable peer-to-peer look-up protocol.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
Peer-to-Peer Distributed Search. Peer-to-Peer Networks A pure peer-to-peer network is a collection of nodes or peers that: 1.Are autonomous: participants.
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
Topics in Reliable Distributed Systems Lecture 2, Fall Dr. Idit Keidar.
Introduction to Peer-to-Peer (P2P) Systems Gabi Kliot - Computer Science Department, Technion Concurrent and Distributed Computing Course 28/06/2006 The.
Chord: A Scalable Peer-to-Peer Lookup Protocol for Internet Applications Stoica et al. Presented by Tam Chantem March 30, 2007.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Peer-to-Peer.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek and Hari alakrishnan.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
1 CS 194: Distributed Systems Distributed Hash Tables Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications 吳俊興 國立高雄大學 資訊工程學系 Spring 2006 EEF582 – Internet Applications and Services 網路應用與服務.
Peer To Peer Distributed Systems Pete Keleher. Why Distributed Systems? l Aggregate resources! –memory –disk –CPU cycles l Proximity to physical stuff.
Peer-to-Peer Networks Slides largely adopted from Ion Stoica’s lecture at UCB.
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications Lecture 3 1.
Effizientes Routing in P2P Netzwerken Chord: A Scalable Peer-to- peer Lookup Protocol for Internet Applications Dennis Schade.
Content Overlays (Nick Feamster). 2 Content Overlays Distributed content storage and retrieval Two primary approaches: –Structured overlay –Unstructured.
Chord & CFS Presenter: Gang ZhouNov. 11th, University of Virginia.
1 Reading Report 5 Yin Chen 2 Mar 2004 Reference: Chord: A Scalable Peer-To-Peer Lookup Service for Internet Applications, Ion Stoica, Robert Morris, david.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
1 Peer-to-Peer Systems. 2 Introduction What is peer One that of equal standing with another Peer-to-peer A way of structure distributed applications Each.
Presentation 1 By: Hitesh Chheda 2/2/2010. Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT Laboratory for Computer Science.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Presented by: Tianyu Li
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan Presented.
SIGCOMM 2001 Lecture slides by Dr. Yingwu Zhu Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park
Structured P2P Overlays. Consistent Hashing – the Basis of Structured P2P Intuition: –We want to build a distributed hash table where the number of buckets.
Chord Advanced issues. Analysis Theorem. Search takes O (log N) time (Note that in general, 2 m may be much larger than N) Proof. After log N forwarding.
Chord Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, Robert E. Gruber Google,
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
Chord Advanced issues. Analysis Search takes O(log(N)) time –Proof 1 (intuition): At each step, distance between query and peer hosting the object reduces.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
CS694 - DHT1 Distributed Hash Table Systems Hui Zhang University of Southern California.
Chapter 5 Naming (I) Speaker : Jyun-Yao Huang 1 Application and Practice of Distributed Systems.
1 Distributed Hash tables. 2 Overview r Objective  A distributed lookup service  Data items are distributed among n parties  Anyone in the network.
The Chord P2P Network Some slides taken from the original presentation by the authors.
Peer-to-Peer Information Systems Week 12: Naming
Ion Stoica, Robert Morris, David Liben-Nowell, David R. Karger, M
CS 268: Lecture 22 (Peer-to-Peer Networks)
The Chord P2P Network Some slides have been borrowed from the original presentation by the authors.
A Scalable Peer-to-peer Lookup Service for Internet Applications
(slides by Nick Feamster)
Improving and Generalizing Chord
EE 122: Peer-to-Peer (P2P) Networks
DHT Routing Geometries and Chord
Chord Advanced issues.
Chord Advanced issues.
MIT LCS Proceedings of the 2001 ACM SIGCOMM Conference
A Scalable Peer-to-peer Lookup Service for Internet Applications
Peer-to-Peer Information Systems Week 12: Naming
Presentation transcript:

Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica, et al., published in SIGCOMM’01

Freenet Highlights Each file is identified by a binary key Each node maintains a routing table, a list of item (host, key) Query is sent to the neighbor with the nearest key Files are replication over their retrieval path Problems Host transience Keyword search No guarantee on when a file can be found Awful in requesting for a file that does not exist AB C D E

Research challenge Given a file, can we find the node that stores the file immediately? If there is not such file, the query should be answered within a limited steps

Motivation example N0N0 N2N2 N4N4 N6N6 N7N7 N1N1 N3N3 N5N5 Example 1.Assume there are 8 nodes and we can arrange them into a ring 2.Given a file, we can hash it and store it in the node whose id is equal to the hash value

Motivation example N0N0 N2N2 N4N4 N6N6 N7N7 N1N1 N3N3 N5N5 Example 1.Assume there are 8 nodes and we can arrange them into a ring 2.Given a file, we can hash it and store it in the node whose id is equal to the hash value Problems 1.The number of nodes is not known ahead Dynamically changed 2.Different files must have different hash values The hash domain should be large enough

Chord at 30,000 feet high Hash node and file Each node can be identified by a hash value, e.g., H(IP)  This value is called the node’s identifier Each file can be identified by a hash value, e.g., H(file)  This value is called the file’s key Node identifier and file key have the same domain space  Both are m bits Mapping between nodes and files A file with key K is stored in the node identified by successor(k)  If node K exists, this is node K  If node K does not exist, this is the next available node

Chord Ring N0N0 N6N6 N1N1 N3N3 N5N5 Each node is identified by a hash value These nodes can be organized into a ring, although some positions may be empty

Chord Ring N0N0 N6N6 N1N1 N3N3 N5N5 Each node is identified by a hash value These nodes can be organized into a ring, although some positions may be empty Node-File mapping K is stored on node whose identifier is successor(K)  successor(K) = K if node K exists  Otherwise, it is the next available node

Chord Ring N0N0 N6N6 N1N1 N3N3 N5N5 Each node is identified by a hash value These nodes can be organized into a ring, although some positions may be empty Node-File mapping K is stored on node whose identifier is successor(K)  successor(K) = K if node K exists  Otherwise, it is the next available node Every node knows its successors N0 knows successor(0), successor(7) N1 knows successor(1) N3 knows successor(3), successor(2) N5 knows successor(5), successor(4) N6 knows successor(6) successor(3) successor(4)

Resolving successor(K) N0N0 N6N6 N1N1 N3N3 N5N5 Naïve Solution 1 Search the ring until Successor(K) is found LookupCost=O(N), where N is the number of nodes  All nodes may have to be searched successor(3) successor(4)

Resolving successor(K) N0N0 N6N6 N1N1 N3N3 N5N5 Naïve Solution 2 Every node keeps a table containing the all mapping of K and successor(K) LookupCost=O(1), but table maintenance cost is high  whenever a host joins or leaves the ring, all other nodes need to update their table! successor(3) successor(4)

Resolving successor(K) N0N0 N6N6 N1N1 N3N3 N5N5 Solution 1 and 2 are two extremes: Solution 1 does not need table update, but need to search entire set of nodes to answer a query Solution 2 can resolve a query immediately, but each host needs to know all other nodes successor(3) successor(4) Challenge: Can a host know only a small portion of other nodes, while each query can still be resolved in a limited number of steps? Which nodes should be known to a node?

Resolving successor(K) N0N0 N6N6 N1N1 N3N3 N5N5 Finger Table Each node maintains m entries The ith entry at node n contains the identity of the first node, s, that succeeds n by at least 2^(i-1), on the ring  S = successor(n+2^(i-1)) N5N5 N3N3 N3N3 Finger Table for N 1 finger [i] = first node that succeeds (n+2 i-1 ) mod 2 m finger0, 1 finger[1] finger[2] successor(N 1 +1) successor(N 1 +2) successor(N 1 +4) finger2 finger[0]

Another Example m=6 N1 N8 N14 N21 N32 N38 N42 N48 N51 N56 N 8 +1N 14 N 8 +2N 14 N 8 +4N 14 N 8 +8N 21 N 8 +16N 32 N 8 +32N 42 Finger Table for N 8 finger 1,2,3 finger 4 finger 6 Finger [k] = first node that succeeds (n+2 k-1 )mod2 m finger 5

Properties of Finger Table Each node stores information only (log 2 N) other nodes A node’s finger table generally does not contain enough information to determine the successor of an arbitrary key K Each node knows more that nodes closely following it on the identifier circle that about nodes farther away 1, 2, 4, 8 …

Key Lookup: find_successor(K) // ask node n to find the successor of id n.find_successor(id) if (id belongs to (n, successor]) return successor; else n0 = closest preceding node(id); return n0.find_successor(id); // search the local table for the highest // predecessor of id n.closest_preceding_node(id) for i = m downto 1 if (finger[i] belongs to (n, id)) return finger[i]; return n; N 8 +1N 14 N 8 +2N 14 N 8 +4N 14 N 8 +8N 21 N 8 +16N 32 N 8 +32N 42 Finger Table for N 8

Lookup Using Finger Table N1 N8 N14 N21 N32 N38 N42 N51 N56 N48 lookup(54) N 8 +1N 14 N 8 +2N 14 N 8 +4N 14 N 8 +8N 21 N 8 +16N 32 N 8 +32N 42 Finger Table for N 8

Lookup Using Finger Table N1 N8 N14 N21 N32 N38 N42 N51 N56 N48 lookup(54) N 8 +1N 14 N 8 +2N 14 N 8 +4N 14 N 8 +8N 21 N 8 +16N 32 N 8 +32N 42 Finger Table for N 8 Lookup can be iterative recursive

Scalable Lookup Scheme Each node forwards query at least halfway along distance remaining to the target Theorem: With high probability, the number of nodes that must be contacted to find a successor in a N-node network is O(log N)

Create() Creates a new Chord ring n.create() predecessor = nil; successor = n;

Join() Assumptions Each node maintains a finger table and knows its predecessor correctly Node n follows three steps to join Initialize the predecessor and figures of node n  Node n learn its predecessor and fingers by asking n’ to look them up O(log 2 N) Update the fingers of existing nodes  Node n becomes the ith finger of node p if and only if p precedes n by at least 2^(i-1), and The ith finger of node p succeeds n Transfer all keys (or files) that node n is now responsible for  These keys must be from the immediate follower of node n N0N0 N2N2 N6N6 N1N1 N3N3 N5N5 Z Y X Finger Table for N 2 finger[1] finger[2] successor(N 2 +1) successor(N 2 +2) successor(N 2 +4) finger[0]

Stabilization: Dealing with Concurrent Node Joins and Fails Periodically ask n’s immediate successor about successor’s predecessor p Checks whether p should be n’s successor instead Also notifies n’s successor about n’s existence, so that successor may change its predecessor to n, if necessary Periodically check whether finger table entries are correct New nodes initialize their finger tables Existing nodes incorporate new nodes into their finger tables Periodically check whether predecessor has failed If yes, it clears the predecessor pointer N0N0 N2N2 N6N6 N1N1 N3N3 N5N5

Impact of Node Joins on Lookups Correctness If finger table entries are reasonably current  Lookup finds the correct successor in O(log N) steps If successor pointers are correct but finger tables are incorrect  Correct lookup but slower If incorrect successor pointers  Lookup may fail

Problem of Stabilization Stabilization won’t correct a Chord system that has split into multiple disjoint cycles, or a single cycle that loops multiple times around the identifier space

Failure and Replication Correctness of the protocol relies on the fact of knowing correct successor To improve robustness Each node maintains a successor list of ‘r’ nodes Each node replicates its data to its immediate successor

Voluntary Node Departures Can be treated as node failures Two possible enhancements Leaving node may transfers all its keys to its successor Leaving node may notify its predecessor and successor about each other so that they can update their links

Advantage of Chord Load Balance: Distributed hash function spreads keys evenly over the nodes Decentralization: Fully distributed Scalability: Lookup grows as a log of number of nodes Availability: Automatically adjusts internal tables to reflect changes. Flexible Naming: No constraints on key structure.

Conclusion Efficient location of the node that stores a desired data item is a fundamental problem in P2P networks Chord protocol solves it in a efficient decentralized manner Routing information: O(log N) nodes Lookup: O(log N) nodes Update: O(log 2 N) messages It also adapts dynamically to the topology changes introduced during the run

Critiques Maintaining Chord ring and up-to-date finger table may be expensive or impossible Especially when nodes join and leave frequently Malicious set of Chord participants could present an incorrect view of the Chord ring Node n periodically asks other nodes to do a lookup for n