CSCI-1680 P2P Based partly on lecture notes by Ion Stoica, Scott Shenker, Joe Hellerstein Rodrigo Fonseca.

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
Clayton Sullivan PEER-TO-PEER NETWORKS. INTRODUCTION What is a Peer-To-Peer Network A Peer Application Overlay Network Network Architecture and System.
P2P Systems and Distributed Hash Tables Section COS 461: Computer Networks Spring 2011 Mike Freedman
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Speaker: Cathrin Weiß 11/23/2004 Proseminar Peer-to-Peer Information Systems.
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
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
An Overview of Peer-to-Peer Networking CPSC 441 (with thanks to Sami Rollins, UCSB)
Application Layer Overlays IS250 Spring 2010 John Chuang.
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 Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek and Hari alakrishnan.
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.
CS 268: Overlay Networks: Distributed Hash Tables Kevin Lai May 1, 2001.
1 EE 122: Overlay Networks and p2p Networks Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks.
EE 122: A Note On Joining Operation in Chord Ion Stoica October 20, 2002.
Peer-to-Peer Networks Slides largely adopted from Ion Stoica’s lecture at UCB.
File Sharing : Hash/Lookup Yossi Shasho (HW in last slide) Based on Chord: A Scalable Peer-to-peer Lookup Service for Internet ApplicationsChord: A Scalable.
CSE 461 University of Washington1 Topic Peer-to-peer content delivery – Runs without dedicated infrastructure – BitTorrent as an example Peer.
Introduction to Peer-to-Peer Networks. What is a P2P network Uses the vast resource of the machines at the edge of the Internet to build a network that.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Application Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)
Peer-to-Peer Overlay Networks. Outline Overview of P2P overlay networks Applications of overlay networks Classification of overlay networks – Structured.
Content Overlays (Nick Feamster). 2 Content Overlays Distributed content storage and retrieval Two primary approaches: –Structured overlay –Unstructured.
Introduction of P2P systems
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
CSCI-1680 Web Performance, Content Distribution P2P Based partly on lecture notes by Scott Shenker and John Jannotti Rodrigo Fonseca.
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)
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
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.
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
Lecture 12 Distributed Hash Tables CPE 401/601 Computer Network Systems slides are modified from Jennifer Rexford.
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.
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.
Two Peer-to-Peer Networking Approaches Ken Calvert Net Seminar, 23 October 2001 Note: Many slides “borrowed” from S. Ratnasamy’s Qualifying Exam talk.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
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.
© 2016 A. Haeberlen, Z. Ives CIS 455/555: Internet and Web Systems 1 University of Pennsylvania Decentralized systems February 15, 2016.
CS694 - DHT1 Distributed Hash Table Systems Hui Zhang University of Southern California.
CSE 486/586 Distributed Systems Distributed Hash Tables
Distributed Hash Tables (DHT) Jukka K. Nurminen *Adapted from slides provided by Stefan Götz and Klaus Wehrle (University of Tübingen)
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)
Distributed Web Systems Peer-to-Peer Systems Lecturer Department University.
Introduction to BitTorrent
CS 268: Lecture 22 (Peer-to-Peer Networks)
CSE 486/586 Distributed Systems Distributed Hash Tables
Distributed Hash Tables
EE 122: Peer-to-Peer (P2P) Networks
CS 268: Peer-to-Peer Networks and Distributed Hash Tables
DHT Routing Geometries and Chord
CS 162: P2P Networks Computer Science Division
P2P Systems and Distributed Hash Tables
CSCI-1680 Web Performance, Content Distribution P2P
Consistent Hashing and Distributed Hash Table
P2P: Distributed Hash Tables
CSE 486/586 Distributed Systems Distributed Hash Tables
Presentation transcript:

CSCI-1680 P2P Based partly on lecture notes by Ion Stoica, Scott Shenker, Joe Hellerstein Rodrigo Fonseca

Today Overlay networks and Peer-to-Peer

Motivation Suppose you want to write a routing protocol to replace IP –But your network administrator prevents you from writing arbitrary data on your network What can you do? –You have a network that can send packets between arbitrary hosts (IP) You could… –Pretend that the point-to-point paths in the network are links in an overlay network…

Overlay Networks Users want innovation Change is very slow on the Internet (e.g. IPv6!) –Require consensus (IETF) –Lots of money sunk in existing infrastructure Solution: don’t require change in the network! –Use IP paths, deploy your own processing among nodes

Why would you want that anyway? Doesn’t the network provide you with what you want? –What if you want to teach a class on how to implement IP? (IP on top of UDP… sounds familiar?) –What if Internet routing is not ideal? –What if you want to test out new multicast algorithms, or IPv6? Remember… –The Internet started as an overlay over ossified telephone networks!

Case Studies Resilient Overlay Network Peer-to-peer systems Others (won’t cover today) – –Web –End-system Multicast –Your IP programming assignment –VPNs –Some IPv6 deployment solutions –…

Resilient Overlay Network - RON Goal: increase performance and reliability of routing How? –Deploy N computers in different places –Each computer acts as a router between the N participants Establish IP tunnels between all pairs Constantly monitor –Available bandwidth, latency, loss rate, etc… Route overlay traffic based on these measurements

RON Default IP path determined by BGP & OSPF Reroute traffic using red alternative overlay network path, avoid congestion point Acts as overlay router Berkeley Brown UCLA Picture from Ion Stoica

RON Does it scale? –Not really, only to a few dozen nodes (NxN) Why does it work? –Route around congestion –In BGP, policy trumps optimality Example –2001, one 64-hour period: 32 outages over 30 minutes –RON routed around failure in 20 seconds Reference:

Peer-to-Peer Systems How did it start? –A killer application: file distribution –Free music over the Internet! (not exactly legal…) Key idea: share storage, content, and bandwidth of individual users –Lots of them Big challenge: coordinate all of these users –In a scalable way (not NxN!) –With changing population (aka churn) –With no central administration –With no trust –With large heterogeneity (content, storage, bandwidth,…)

3 Key Requirements P2P Systems do three things: Help users determine what they want –Some form of search –P2P version of Google Locate that content –Which node(s) hold the content? –P2P version of DNS (map name to location) Download the content –Should be efficient –P2P form of Akamai

Napster (1999) xyz.mp3

Napster xyz.mp3 ? xyz.mp3

Napster xyz.mp3 ? xyz.mp3

Napster xyz.mp3 ? xyz.mp3

Napster Search & Location: central server Download: contact a peer, transfer directly Advantages: –Simple, advanced search possible Disadvantages: –Single point of failure (technical and … legal!) –The latter is what got Napster killed

Gnutella: Flooding on Overlays (2000) xyz.mp3 ? xyz.mp3 An “unstructured” overlay network Search & Location: flooding (with TTL) Download: direct

Gnutella: Flooding on Overlays xyz.mp3 ? xyz.mp3 Flooding

Gnutella: Flooding on Overlays xyz.mp3 ? xyz.mp3 Flooding

Gnutella: Flooding on Overlays xyz.mp3

KaZaA: Flooding w/ Super Peers (2001) Well connected nodes can be installed (KaZaA) or self-promoted (Gnutella)

Say you want to make calls among peers You need to find who to call –Centralized server for authentication, billing You need to find where they are –Can use central server, or a decentralized search, such as in KaZaA You need to call them –What if both of you are behind NATs? (only allow outgoing connections) –You could use another peer as a relay…

Skype Built by the founders of KaZaA! Uses Superpeers for registering presence, searching for where you are Uses regular nodes, outside of NATs, as decentralized relays –This is their killer feature This morning, from my computer: –25,456,766 people online

Lessons and Limitations Client-server performs well –But not always feasible Things that flood-based systems do well –Organic scaling –Decentralization of visibility and liability –Finding popular stuff –Fancy local queries Things that flood-based systems do poorly –Finding unpopular stuff –Fancy distributed queries –Vulnerabilities: data poisoning, tracking, etc. –Guarantees about anything (answer quality, privacy, etc.)

BitTorrent (2001) One big problem with the previous approaches –Asymmetric bandwidth BitTorrent (original design) –Search: independent search engines (e.g. PirateBay, isoHunt) Maps keywords ->.torrent file –Location: centralized tracker node per file –Download: chunked File split into many pieces Can download from many peers

BitTorrent How does it work? –Split files into large pieces (256KB ~ 1MB) –Split pieces into subpieces –Get peers from tracker, exchange info on pieces Three-phases in download –Start: get a piece as soon as possible (random) –Middle: spread pieces fast (rarest piece) –End: don’t get stuck (parallel downloads of last pieces)

BitTorrent Self-scaling: incentivize sharing –If people upload as much as they download, system scales with number of users (no free-loading) Uses tit-for-tat: only upload to who gives you data –Choke most of your peers (don’t upload to them) –Order peers by download rate, choke all but P best –Occasionally unchoke a random peer (might become a nice uploader) Optional reading: [Do Incentives Build Robustness in BitTorrent? Piatek et al, NSDI’07]Do Incentives Build Robustness in BitTorrent?

Structured Overlays: DHTs Academia came (a little later)… Goal: Solve efficient decentralized location –Remember the second key challenge? –Given ID, map to host Remember the challenges? –Scale to millions of nodes –Churn –Heterogeneity –Trust (or lack thereof) Selfish and malicious users

DHTs IDs from a flat namespace –Contrast with hierarchical IP, DNS Metaphor: hash table, but distributed Interface –Get(key) –Put(key, value) How? –Every node supports a single operation: Given a key, route messages to node holding key

Identifier to Node Mapping Example Node 8 maps [5,8] Node 15 maps [9,15] Node 20 maps [16, 20] … Node 4 maps [59, 4] Each node maintains a pointer to its successor Example from Ion Stoica

Remember Consistent Hashing? But each node only knows about a small number of other nodes (so far only their successors)

Lookup Each node maintains its successor Route packet (ID, data) to the node responsible for ID using successor pointers lookup(37) node=44

Stabilization Procedure Periodic operations performed by each node N to maintain the ring: STABILIZE() [N.successor = M] N->M: “What is your predecessor?” M->N: “x is my predecessor” if x between (N,M), N.successor = x N->N.successor: NOTIFY() NOTIFY() N->N.successor: “I think you are my successor” M: upon receiving NOTIFY from N: If (N between (M.predecessor, M)) M.predecessor = N

Joining Operation  Node with id=50 joins the ring  Node 50 needs to know at least one node already in the system -Assume known node is 15 succ=4 pred=44 succ=nil pred=nil succ=58 pred=35

Joining Operation  Node 50: send join(50) to node 15  Node 44: returns node 58  Node 50 updates its successor to 58 join(50) succ=58 succ=4 pred=44 succ=nil pred=nil succ=58 pred=35 58

Joining Operation  Node 50: send stabilize() to node 58  Node 58: -Replies with determines it is the right predecessor succ=58 pred=nil succ=58 pred=35 stabilize(): “What is your predecessor?” “my predecessor is 44 succ=4 pred=44

Joining Operation  Node 50: send notify() to node 58  Node 58: -update predecessor to 50 succ=58 pred=nil succ=58 pred=35 notify(): “I think you are my successor” pred=50 succ=4 pred=44

Joining Operation  Node 44 sends a stabilize message to its successor, node 58  Node 58 replies with 50  Node 44 updates its successor to 50 succ=58 stabilize(): “What is your predecessor?” “my predecessor is 50” succ=50 pred=50 succ=4 pred=nil succ=58 pred=35

Joining Operation  Node 44 sends a notify message to its new successor, node 50  Node 50 sets its predecessor to node 44 succ=58 succ=50 notify() pred=44 pred=50 pred=35 succ=4 pred=nil

Joining Operation (cont’d)  This completes the joining operation! succ=58 succ=50 pred=44 pred=50

Achieving Efficiency: finger tables ( ) mod 2 7 = 16 0 Say m=7 ith entry at peer with id n is first peer with id >= i ft[i] Finger Table at

Chord There is a tradeoff between routing table size and diameter of the network Chord achieves diameter O(log n) with O(log n)-entry routing tables

Many other DHTs CAN –Routing in n-dimensional space Pastry/Tapestry/Bamboo –(Book describes Pastry) –Names are fixed bit strings –Topology: hypercube (plus a ring for fallback) Kademlia –Similar to Pastry/Tapestry –But the ring is ordered by the XOR metric –Used by BitTorrent for distributed tracker Viceroy –Emulated butterfly network Koorde –DeBruijn Graph –Each node connects to 2n, 2n+1 –Degree 2, diameter log(n) …

Discussion Query can be implemented –Iteratively: easier to debug –Recursively: easier to maintain timeout values Robustness –Nodes can maintain (k>1) successors –Change notify() messages to take that into account Performance –Routing in overlay can be worse than in the underlay –Solution: flexibility in neighbor selection Tapestry handles this implicitly (multiple possible next hops) Chord can select any peer between [2 n,2 n+1 ) for finger, choose the closest in latency to route through

Where are they now? Many P2P networks shut down –Not for technical reasons! –Centralized systems work well (or better) sometimes But… –Vuze network: Kademlia DHT, millions of users –Skype uses a P2P network similar to KaZaA

Where are they now? DHTs allow coordination of MANY nodes –Efficient flat namespace for routing and lookup –Robust, scalable, fault-tolerant If you can do that –You can also coordinate co-located peers –Now dominant design style in datacenters E.g., Amazon’s Dynamo storage system –DHT-style systems everywhere Similar to Google’s philosophy –Design with failure as the common case –Recover from failure only at the highest layer –Use low cost components –Scale out, not up

Next time Wireless