CSE 461 University of Washington1 Topic Peer-to-peer content delivery – Runs without dedicated infrastructure – BitTorrent as an example Peer.

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 Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
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.
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.
Xiaowei Yang CompSci 356: Computer Network Architectures Lecture 22: Overlay Networks Xiaowei Yang
Distributed Hash Tables CPE 401 / 601 Computer Network Systems Modified from Ashwin Bharambe and Robert Morris.
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.
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.
Distributed Hash Tables: Chord Brad Karp (with many slides contributed by Robert Morris) UCL Computer Science CS M038 / GZ06 27 th January, 2009.
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 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.
Distributed Lookup Systems
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.
Structure Overlay Networks and Chord Presentation by Todd Gardner Figures from: Ion Stoica, Robert Morris, David Liben- Nowell, David R. Karger, M. Frans.
Chord-over-Chord Overlay Sudhindra Rao Ph.D Qualifier Exam Department of ECECS.
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.
Wide-area cooperative storage with CFS
Lecture 10 Naming services for flat namespaces. EECE 411: Design of Distributed Software Applications Logistics / reminders Project Send Samer and me.
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington.
Wide-Area Cooperative Storage with CFS Robert Morris Frank Dabek, M. Frans Kaashoek, David Karger, Ion Stoica MIT and Berkeley.
Content Overlays (Nick Feamster). 2 Content Overlays Distributed content storage and retrieval Two primary approaches: –Structured overlay –Unstructured.
Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
1 Distributed Hash Tables (DHTs) Lars Jørgen Lillehovde Jo Grimstad Bang Distributed Hash Tables (DHTs)
Vincent Matossian September 21st 2001 ECE 579 An Overview of Decentralized Discovery mechanisms.
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
1 Slides from Richard Yang with minor modification Peer-to-Peer Systems: DHT and Swarming.
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 Dr. Yingwu Zhu.
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.
1 Peer-to-Peer Technologies Seminar by: Kunal Goswami (05IT6006) School of Information Technology Guided by: Prof. C.R.Mandal, School of Information Technology.
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Distributed Hash Tables Steve Ko Computer Sciences and Engineering University at Buffalo.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
CS 347Notes081 CS 347: Parallel and Distributed Data Management Notes 08: P2P Systems.
P2P Search COP6731 Advanced Database Systems. P2P Computing  Powerful personal computer Share computing resources P2P Computing  Advantages: Shared.
P2P Search COP P2P Search Techniques Centralized P2P systems  e.g. Napster, Decentralized & unstructured P2P systems  e.g. Gnutella.
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
Nick McKeown CS244 Lecture 17 Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications [Stoica et al 2001]
CSE 486/586 Distributed Systems Distributed Hash Tables
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
Ion Stoica, Robert Morris, David Liben-Nowell, David R. Karger, M
Magdalena Balazinska, Hari Balakrishnan, and David Karger
BitTorrent Vs Gnutella.
(slides by Nick Feamster)
DHT Routing Geometries and Chord
Building Peer-to-Peer Systems with Chord, a Distributed Lookup Service
MIT LCS Proceedings of the 2001 ACM SIGCOMM Conference
Consistent Hashing and Distributed Hash Table
P2P: Distributed Hash Tables
#02 Peer to Peer Networking
Presentation transcript:

CSE 461 University of Washington1 Topic Peer-to-peer content delivery – Runs without dedicated infrastructure – BitTorrent as an example Peer

CSE 461 University of Washington2 Context Delivery with client/server CDNs: – Efficient, scales up for popular content – Reliable, managed for good service … but some disadvantages too: – Need for dedicated infrastructure – Centralized control/oversight

CSE 461 University of Washington3 P2P (Peer-to-Peer) Goal is delivery without dedicated infrastructure or centralized control – Still efficient at scale, and reliable Key idea is to have participants (or peers) help themselves – Initially Napster ‘99 for music (gone) – Now BitTorrent ‘01 onwards (popular!)

CSE 461 University of Washington4 P2P Challenges No servers on which to rely – Communication must be peer-to-peer and self-organizing, not client-server – Leads to several issues at scale … Peer

CSE 461 University of Washington5 P2P Challenges (2) 1.Limited capabilities – How can one peer deliver content to all other peers? 2.Participation incentives – Why will peers help each other? 3.Decentralization – How will peers find content?

CSE 461 University of Washington6 Overcoming Limited Capabilities Peer can send content to all other peers using a distribution tree – Typically done with replicas over time – Self-scaling capacity Source

CSE 461 University of Washington7 Overcoming Limited Capabilities (2) Peer can send content to all other peers using a distribution tree – Typically done with replicas over time – Self-scaling capacity Source

CSE 461 University of Washington 8 Providing Participation Incentives Peer play two roles: – Download ( ) to help themselves, and upload ( ) to help others Source

CSE 461 University of Washington9 Providing Participation Incentives (2) Couple the two roles: – I’ll upload for you if you upload for me – Encourages cooperation Source

CSE 461 University of Washington10 Enabling Decentralization Peer must learn where to get content – Use DHTs (Distributed Hash Tables) DHTs are fully-decentralized, efficient algorithms for a distributed index – Index is spread across all peers – Index lists peers to contact for content – Any peer can lookup the index – Started as academic work in 2001

CSE 461 University of Washington11 BitTorrent Main P2P system in use today – Developed by Cohen in ‘01 – Very rapid growth, large transfers – Much of the Internet traffic today! – Used for legal and illegal content Delivers data using “torrents”: – Transfers files in pieces for parallelism – Notable for treatment of incentives – Tracker or decentralized index (DHT) By Jacob Appelbaum, CC-BY-SA-2.0, from Wikimedia Commons Bram Cohen (1975—)

CSE 461 University of Washington12 BitTorrent Protocol Steps to download a torrent: 1.Start with torrent description 2.Contact tracker to join and get list of peers (with at least seed peer) 2.Or, use DHT index for peers 3.Trade pieces with different peers 4.Favor peers that upload to you rapidly; “choke” peers that don’t by slowing your upload to them

BitTorrent Protocol (2) All peers (except seed) retrieve torrent at the same time CSE 461 University of Washington13

BitTorrent Protocol (3) Dividing file into pieces gives parallelism for speed CSE 461 University of Washington14

BitTorrent Protocol (4) Choking unhelpful peers encourages participation CSE 461 University of Washington15 STOP XXX

BitTorrent Protocol (5) DHT index (spread over peers) is fully decentralized CSE 461 University of Washington16 DHT

CSE 461 University of Washington17 P2P Outlook Alternative to CDN-style client- server content distribution – With potential advantages P2P and DHT technologies finding more widespread use over time – E.g., part of skype, Amazon – Expect hybrid systems in the future

Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley

A peer-to-peer storage problem 1000 scattered music enthusiasts Willing to store and serve replicas How do you find the data?

The lookup problem Internet N1N1 N2N2 N3N3 N6N6 N5N5 N4N4 Publisher Key= “ title ” Value=MP3 data… Client Lookup( “ title ” ) ?

Centralized lookup (Napster) Client Lookup( “ title ” ) N6N6 N9N9 N7N7 DB N8N8 N3N3 N2N2 N1N1 SetLoc( “ title ”, N4) Simple, but O( N ) state and a single point of failure Key= “ title ” Value=MP3 data… N4N4

Flooded queries (Gnutella) N4N4 Client N6N6 N9N9 N7N7 N8N8 N3N3 N2N2 N1N1 Robust, but worst case O( N ) messages per lookup Key= “ title ” Value=MP3 data… Lookup( “ title ” )

Routed queries (Freenet, Chord, etc.) N4N4 Publisher Client N6N6 N9N9 N7N7 N8N8 N3N3 N2N2 N1N1 Lookup( “ title ” ) Key= “ title ” Value=MP3 data…

Routing challenges Define a useful key nearness metric Keep the hop count small Keep the tables small Stay robust despite rapid change Freenet: emphasizes anonymity Chord: emphasizes efficiency and simplicity

Chord properties Efficient: O( log(N) ) messages per lookup – N is the total number of servers Scalable: O( log(N) ) state per node Robust: survives massive failures Proofs are in paper / tech report – Assuming no malicious participants

Chord overview Provides peer-to-peer hash lookup: – Lookup(key)  IP address – Chord does not store the data How does Chord route lookups? How does Chord maintain routing tables?

Chord IDs Key identifier = SHA-1(key) Node identifier = SHA-1(IP address) Both are uniformly distributed Both exist in the same ID space How to map key IDs to node IDs?

Consistent hashing [Karger 97] N32 N90 N105 K80 K20 K5 Circular 7-bit ID space Key 5 Node 105 A key is stored at its successor: node with next higher ID

Consistent hashing [Karger 97] Theorem: For any set of N nodes and K keys, with “high probability” 1)Each node is responsible for at most (1+ eps) K/N keys 2)When the (N+1)th node joins or leaves the network, responsibility for O(K/N) keys changes hands

Basic lookup N32 N90 N105 N60 N10 N120 K80 “ Where is key 80? ” “ N90 has K80 ”

Simple lookup algorithm Lookup(my-id, key-id) n = my successor if my-id < n < key-id call Lookup(id) on node n // next hop else return my successor // done Correctness depends only on successors

“ Finger table ” allows log(N)-time lookups N80 ½ ¼ 1/8 1/16 1/32 1/64 1/128

Finger i points to successor of n+2 i N80 ½ ¼ 1/8 1/16 1/32 1/64 1/ N120

Lookup with fingers Lookup(my-id, key-id) look in local finger table for highest node n s.t. my-id < n < key-id if n exists call Lookup(id) on node n // next hop else return my successor // done

Lookups take O( log(N) ) hops N32 N10 N5 N20 N110 N99 N80 N60 Lookup(K19) K19

Failures might cause incorrect lookup N120 N113 N102 N80 N85 N80 doesn ’ t know correct successor, so incorrect lookup N10 Lookup(90)

Solution: successor lists Each node knows r immediate successors After failure, will know first live successor Correct successors guarantee correct lookups Guarantee is with some probability

Choosing the successor list length Assume 1/2 of nodes fail P(successor list all dead) = (1/2) r – I.e. P(this node breaks the Chord ring) – Depends on independent failure P(no broken nodes) = (1 – (1/2) r ) N – r = 2log(N) makes prob. = 1 – 1/N