CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG.

Slides:



Advertisements
Similar presentations
P2P data retrieval DHT (Distributed Hash Tables) Partially based on Hellerstein’s presentation at VLDB2004.
Advertisements

Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Peer to Peer and Distributed Hash Tables
CHORD – peer to peer lookup protocol Shankar Karthik Vaithianathan & Aravind Sivaraman University of Central Florida.
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.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan Presented.
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 Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT.
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.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 9-10: Peer-to-peer Systems All slides © IG.
Common approach 1. Define space: assign random ID (160-bit) to each node and key 2. Define a metric topology in this space,  that is, the space of keys.
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.
1 Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan.
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.
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.
CS 525 Advanced Distributed Systems Spring 2015 Indranil Gupta (Indy) Lecture 4, 5 Peer to Peer Systems January 29, 2015 All slides © IG 1.
Lecture 13 Peer-to-Peer systems (Part II) CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009)
Chord & CFS Presenter: Gang ZhouNov. 11th, University of Virginia.
Introduction of P2P systems
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.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Sep 15-17, 2015 Lecture 7-8: Peer-to-peer Systems All slides © IG.
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
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.
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.
Lecture 2 Distributed Hash Table
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park
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.
1 CS 525 Advanced Distributed Systems Spring 2014 Indranil Gupta (Indy) Lecture 5 Peer to Peer Systems II February 4, 2014 All Slides © IG.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
Indranil Gupta (Indy) September 27, 2012 Lecture 10 Peer-to-peer Systems II Reading: Chord paper on website (Sec 1-4, 6-7)  2012, I. Gupta Computer Science.
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.
Peer-to-peer systems (part I) Slides by Indranil Gupta (modified by N. Vaidya)
Algorithms and Techniques in Structured Scalable Peer-to-Peer Networks
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt.
CS 347Notes081 CS 347: Parallel and Distributed Data Management Notes 08: P2P Systems.
CS694 - DHT1 Distributed Hash Table Systems Hui Zhang University of Southern California.
CS 525 Advanced Distributed Systems Spring 2016 Indranil Gupta (Indy) Lecture 4, 5 Peer to Peer Systems January 28, 2016 All slides © IG 1.
Computer Science 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) Lecture 20 Self-Stabilization Reading: Chapter from Prof. Gosh’s book Klara Nahrstedt.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
The Chord P2P Network Some slides taken from the original presentation by the authors.
Lecture 7: Peer-to-peer Systems I
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
Lecture 7: Peer-to-peer Systems I
CS 525 Advanced Distributed Systems Spring 2017
CS 525 Advanced Distributed Systems Spring 2018
EE 122: Peer-to-Peer (P2P) Networks
Chord Advanced issues.
Chord Advanced issues.
Chord Advanced issues.
Lecture 7: Peer-to-peer Systems I
MIT LCS Proceedings of the 2001 ACM SIGCOMM Conference
Consistent Hashing and Distributed Hash Table
A Scalable Peer-to-peer Lookup Service for Internet Applications
Presentation transcript:

CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG

Napster Structure S S S P P P P P Client machines (“Peers”) napster.com Servers Store their own files Store a directory, i.e., filenames with peer pointers Filename Info about PennyLane.mp :1006 ….. P

Napster Search Client machines (“Peers”) napster.com Servers Store their own files Store peer pointers for all files 2. All servers search their lists (ternary tree algorithm) 5. download from best host 4. ping candidates 3. Response 1. Query S S S P P P P P P

Gnutella P P P P P P Servents (“Peers”) P Connected in an overlay graph (== each link is an implicit Internet path) Store their own files Also store “peer pointers”

Gnutella Search P P P P P P P Who has PennyLane.mp3? Query’s flooded out, ttl-restricted, forwarded only once TTL=2

Gnutella Search P P P P P P P Who has PennyLane.mp3? Successful results QueryHit’s routed on reverse path

Chord Developers: I. Stoica, D. Karger, F. Kaashoek, H. Balakrishnan, R. Morris, Berkeley and MIT Intelligent choice of neighbors to reduce latency and message cost of routing (lookups/inserts) Uses Consistent Hashing on node’s (peer’s) address SHA-1(ip_address,port)  160 bit string Truncated to m bits Called peer id (number between 0 and ) Not unique but id conflicts very unlikely Can then map peers to one of logical points on a circle

Ring of peers N80 N112 N96 N16 0 Say m=7 N32 N45 6 nodes

Peer pointers (1): successors N80 0 Say m=7 N32 N45 N112 N96 N16 (similarly predecessors)

Peer pointers (2): finger tables

What about the files? Filenames also mapped using same consistent hash function SHA-1(filename)  160 bit string (key) File is stored at first peer with id greater than or equal to its key (mod ) File cnn.com/index.html that maps to key K42 is stored at first peer with id greater than 42 Note that we are considering a different file-sharing application here : cooperative web caching The same discussion applies to any other file sharing application, including that of mp3 files. Consistent Hashing => with K keys and N peers, each peer stores O(K/N) keys. (i.e., < c.K/N, for some constant c)

Mapping Files N80 0 Say m=7 N32 N45 File with key K42 stored here N112 N96 N16

Search N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here Who has cnn.com/index.html ? (hashes to K42) N112 N96 N16

Search N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here At node n, send query for key k to largest successor/finger entry <= k if none exist, send query to successor(n) N112 N96 N16 Who has cnn.com/index.html ? (hashes to K42) At or to the anti-clockwise of k (it wraps around the ring)

Search N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here At node n, send query for key k to largest successor/finger entry <= k if none exist, send query to successor(n) All “arrows” are RPCs (remote procedure calls) N112 N96 N16 Who has cnn.com/index.html ? (hashes to K42)

Analysis Search takes O(log(N)) time Proof (intuition): at each step, distance between query and peer-with-file reduces by a factor of at least 2 (intuition): after log(N) forwardings, distance to key is at most Number of node identifiers in a range of is O(log(N)) with high probability (why? SHA-1! and “Balls and Bins”) So using successors in that range will be ok, using another O(log(N)) hops Next hop Key Here

Analysis (contd.) O(log(N)) search time holds for file insertions too (in general for routing to any key) “Routing” can thus be used as a building block for All operations: insert, lookup, delete O(log(N)) time true only if finger and successor entries correct When might these entries be wrong? When you have failures

Rest of the slides are for optional reading

Search under peer failures N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here X X X Lookup fails (N16 does not know N45) N112 N96 N16 Who has cnn.com/index.html ? (hashes to K42)

Search under peer failures N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here X One solution: maintain r multiple successor entries In case of failure, use successor entries N112 N96 N16 Who has cnn.com/index.html ? (hashes to K42)

Search under peer failures Choosing r=2log(N) suffices to maintain lookup correctness w.h.p.(i.e., ring connected) Say 50% of nodes fail Pr(at given node, at least one successor alive)= Pr(above is true at all alive nodes)=

Search under peer failures (2) N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here X X Lookup fails (N45 is dead) N112 N96 N16 Who has cnn.com/index.html ? (hashes to K42)

Search under peer failures (2) N80 0 Say m=7 N32 N45 File cnn.com/index.html with key K42 stored here X One solution: replicate file/key at r successors and predecessors N112 N96 N16 K42 replicated Who has cnn.com/index.html ? (hashes to K42)

Need to deal with dynamic changes Peers fail New peers join Peers leave P2P systems have a high rate of churn (node join, leave and failure) 25% per hour in Overnet (eDonkey) 100% per hour in Gnutella Lower in managed clusters Common feature in all distributed systems, including wide-area (e.g., PlanetLab), clusters (e.g., Emulab), clouds (e.g., AWS), etc. So, all the time, need to:  Need to update successors and fingers, and copy keys

New peers joining N80 0 Say m=7 N32 N45 N112 N96 N16 N40 Introducer directs N40 to N45 (and N32) N32 updates successor to N40 N40 initializes successor to N45, and inits fingers from it N40 periodically talks to neighbors to update finger table Stabilization Protocol (followed by all nodes)

New peers joining (2) N80 0 Say m=7 N32 N45 N112 N96 N16 N40 N40 may need to copy some files/keys from N45 (files with fileid between 32 and 40) K34,K38

New peers joining (3) A new peer affects O(log(N)) other finger entries in the system, on average [Why?] Number of messages per peer join= O(log(N)*log(N)) Similar set of operations for dealing with peers leaving For dealing with failures, also need failure detectors (you’ve seen them!)

Stabilization Protocol Concurrent peer joins, leaves, failures might cause loopiness of pointers, and failure of lookups Chord peers periodically run a stabilization algorithm that checks and updates pointers and keys Ensures non-loopiness of fingers, eventual success of lookups and O(log(N)) lookups w.h.p. Each stabilization round at a peer involves a constant number of messages Strong stability takes stabilization rounds For more see [TechReport on Chord webpage]