CS5412: TORRENTS AND TIT-FOR-TAT



Similar documents
The BitTorrent Protocol

Peer-to-peer systems and overlays

Lecture 6 Content Distribution and BitTorrent

Peer-to-Peer Networks. Chapter 2: Initial (real world) systems Thorsten Strufe

P2P File Sharing: BitTorrent in Detail

CONTRACTS: PRACTICAL CONTRIBUTION INCENTIVES FOR P2P LIVE STREAMING. An Overview by Alex Loeb

Seminar RVS MC-FTP (Multicast File Transfer Protocol): Simulation and Comparison with BitTorrent

Incentives Build Robustness in BitTorrent

Peer-to-peer filetransfer protocols and IPv6. János Mohácsi NIIF/HUNGARNET TF-NGN meeting, 1/Oct/2004

N6Lookup( title ) Client

BitTorrent Peer To Peer File Sharing

DDoS Vulnerability Analysis of Bittorrent Protocol

The Internet is Flat: A brief history of networking over the next ten years. Don Towsley UMass - Amherst

SE4C03: Computer Networks and Computer Security Last revised: April Name: Nicholas Lake Student Number: For: S.

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. File Sharing

CSCI-1680 CDN & P2P Chen Avin

The Role and uses of Peer-to-Peer in file-sharing. Computer Communication & Distributed Systems EDA 390

Peer-to-Peer Networks. Chapter 6: P2P Content Distribution

Peer-to-Peer Data Management

Java Bit Torrent Client

Guaranteeing Performance through Fairness in Peer-to-Peer File-Sharing and Streaming Systems. Alex Sherman

Peer-to-Peer Networks Fast Download 11th Week

The Bittorrent P2P File-sharing System: Measurements And Analysis J.A. Pouwelse, P. Garbacki, D.H.J. Epema, H.J. Sips Department of Computer Science,

Content Distribution Network (CDN)

The Algorithm of Sharing Incomplete Data in Decentralized P2P

MC-FTP (Multicast File Transfer Protocol): Implementation and Comparison with

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Multicast vs. P2P for content distribution

BitTorrent File Sharing in Mobile Ad-hoc Networks

CS5412: TIER 2 OVERLAYS

Graffiti Networks: A Subversive, Internet-Scale File Sharing Model. Andrew Pavlo DC401 Rhode Island Defcon Group October 12, 2009

CNT5106C Project Description

How To Make A Game Of Gnutella A Cooperative Game

Middleware and Distributed Systems. Peer-to-Peer Systems. Martin v. Löwis. Montag, 30. Januar 12

LiveSwarms: Adapting BitTorrent for end host multicast

apt-p2p: A Peer-to-Peer Distribution System for Software Package Releases and Updates

Evaluating the Effectiveness of a BitTorrent-driven DDoS Attack

Lab 5: BitTorrent Client Implementation

The Challenges of Stopping Illegal Peer-to-Peer File Sharing

P2P: centralized directory (Napster s Approach)

Quality of Service and Denial of Service

Professor Yashar Ganjali Department of Computer Science University of Toronto.

A Survey of Peer-to-Peer Network Security Issues

Peer-to-Peer Multimedia Streaming Using BitTorrent

PEER-TO-PEER NETWORK

Optimizing Congestion in Peer-to-Peer File Sharing Based on Network Coding

q Admin and recap q Case studies: Content Distribution o Forward proxy (web cache) o Akamai o YouTube q P2P networks o Overview

Network Coding for Large Scale Content Distribution

How To Test The Speed Of Bittorrent On A Bitt Client And Torrent On A Pc Or Ipad (For Free) On A Microsoft Flash Get 2.5 (For A Free) Computer (For Pc Or Mac) On An Ip

Performance Modeling of BitTorrent Peer-to-Peer File Sharing Networks

Modeling and Analysis of Bandwidth-Inhomogeneous Swarms in BitTorrent

Data Deduplication in BitTorrent. Thesis to obtain the Master of Science Degree in Information Systems and Computer Engineering

P2P Node Setup Guide Authored by: Unitsa Sungket, Prince of Songkla University, Thailand Darran Nathan, APBioNet

Computation and Economics - Spring 2012 Assignment #3: File Sharing

Attacking a Swarm with a Band of Liars evaluating the impact of attacks on BitTorrent

Optimizing and Balancing Load in Fully Distributed P2P File Sharing Systems

Peer-to-peer Cooperative Backup System

Should Internet Service Providers Fear Peer-Assisted Content Distribution?

RatFish: A File Sharing Protocol Provably Secure Against Rational Users

On the feasibility of exploiting P2P systems to launch DDoS attacks

Dynamic File Bundling for Large-scale Content Distribution

Dandelion: Cooperative Content Distribution with Robust Incentives

Skirting ISP Traffic Shaping in P2P Systems, and Countermeasures

(Refer Slide Time: 02:17)

MODIFIED BITTORRENT PROTOCOL AND ITS APPLICATION IN CLOUD COMPUTING ENVIRONMENT

PEER-TO-PEER LIVE STREAMING AND VIDEO ON DEMAND DESIGN ISSUES AND ITS CHALLENGES

AUTOMATED AND ADAPTIVE DOWNLOAD SERVICE USING P2P APPROACH IN CLOUD

How To Accelerate Peer To Peer File Sharing With Social Networks

A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL OF THE UNIVERSITY OF MINNESOTA BY. Ranga Reddy Pallelra

Multimedia transmission in a managed P2P network: making sense?

Peer-to-peer networking with BitTorrent

A CASE STUDY IN MODELING LARGE-SCALE PEER-TO-PEER FILE-SHARING NETWORKS USING DISCRETE-EVENT SIMULATION

An apparatus for P2P classification in Netflow traces

From Centralization to Distribution: A Comparison of File Sharing Protocols

Peer-to-Peer Networks Organization and Introduction 1st Week

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Detecting peer-to-peer botnets

Yahoo Attack. Is DDoS a Real Problem?

Searching for Malware in BitTorrent

D3S A Distributed Storage Service

A Week in the Life of the Most Popular BitTorrent Swarms

A Torrent Recommender based on DHT Crawling

Sync Security and Privacy Brief

One hop Reputations for Peer to Peer File Sharing Workloads

Traffic Localization for DHT-based BitTorrent networks

A Success and Failure Factor Study of Peer-to-Peer File Sharing Systems. Christian Lüthold, Marc Weber

Using UDP Packets to Detect P2P File Sharing

Lab 1: Evaluating Internet Connection Choices for a Small Home PC Network

Improving the Speed of Peer to Peer Backup Systems with BitTorrent WORCESTER POLYTECHNIC INSTITUTE

P2P File Sharing - A Model For Fairness Versus Performance

Security in Structured P2P Systems

A Middleware Strategy to Survive Compute Peak Loads in Cloud

Torrage: A Secure BitTorrent based Peer-to-Peer Distributed Storage System

Data Center Content Delivery Network

Privacy-preserving P2P data sharing with OneSwarm

Unstructured vs. Structured P2P systems. Systems. Unstructured P2P File Sharing Systems. Development of P2P Applications

A Survey of Data Management in Peer-to-Peer Systems

Krunal Patel Department of Information Technology A.D.I.T. Engineering College (G.T.U.) India. Fig. 1 P2P Network

arxiv: v1 [cs.ni] 8 Nov 2010

Leveraging BitTorrent for End Host Measurements

Transcription:

1 CS5412: TORRENTS AND TIT-FOR-TAT Lecture VI Ken Birman

BitTorrent 2 Today we ll be focusing on BitTorrent The technology really has three aspects A standard tht BitTorrent client systems follow Some existing clients, e.g. the free Torrent client, PPLive A clever idea: using tit-for-tat mechanisms to reward good behavior and to punish bad behavior (reminder of the discussion we had about RON...) This third aspect is especially intriguing!

The basic BitTorrent Scenario 3 Millions want to download the same popular huge files (for free) ISO s Media (the real example!) Client-server model fails Single server fails Can t afford to deploy enough servers

Why not use IP Multicast? 4 IP Multicast not a real option in general WAN settings Not supported by many ISPs Most commonly seen in private data centers Alternatives End-host based Multicast BitTorrent Other P2P file-sharing schemes (from prior lectures)

5 Source Router Interested End-host

Client-Server 6 Source Router Interested End-host

Client-Server 7 Overloaded! Source Router Interested End-host

IP multicast 8 Source Router Interested End-host

End-host based multicast 9 Source Router Interested End-host

End-host based multicast 10 Single-uploader Multiple-uploaders Lots of nodes want to download Make use of their uploading abilities as well Node that has downloaded (part of) file will then upload it to other nodes. Uploading costs amortized across all nodes

End-host based multicast 11 Also called Application-level Multicast Many protocols proposed early this decade Yoid (2000), Narada (2000), Overcast (2000), ALMI (2001) All use single trees Problem with single trees?

End-host multicast using single tree 12 Source

End-host multicast using single tree 13 Source

End-host multicast using single tree 14 Source Slow data transfer

End-host multicast using single tree 15 Tree is push-based node receives data, pushes data to children Failure of interior -node affects downloads in entire subtree rooted at node Slow interior node similarly affects entire subtree Also, leaf-nodes don t do any sending! Though later multi-tree / multi-path protocols (Chunkyspread (2006), Chainsaw (2005), Bullet (2003)) mitigate some of these issues

BitTorrent 16 Written by Bram Cohen (in Python) in 2001 Pull-based swarming approach Each file split into smaller pieces Nodes request desired pieces from neighbors As opposed to parents pushing data that they receive Pieces not downloaded in sequential order Previous multicast schemes aimed to support streaming ; BitTorrent does not Encourages contribution by all nodes

BitTorrent Swarm 17 Swarm Set of peers all downloading the same file Organized as a random mesh Each node knows list of pieces downloaded by neighbors Node requests pieces it does not own from neighbors Exact method explained later

How a node enters a swarm for file popeye.mp4 File popeye.mp4.torrent hosted at a (well-known) webserver The.torrent has address of tracker for file The tracker, which runs on a webserver as well, keeps track of all peers downloading file CS5412 Spring 2012 (Cloud Computing: Birman) 18

How a node enters a swarm for file popeye.mp4 www.bittorrent.com Peer 1 File popeye.mp4.torrent hosted at a (well-known) webserver The.torrent has address of tracker for file The tracker, which runs on a webserver as well, keeps track of all peers downloading file CS5412 Spring 2012 (Cloud Computing: Birman) 19

How a node enters a swarm for file popeye.mp4 www.bittorrent.com File popeye.mp4.torrent hosted at a (well-known) webserver Peer 2 The.torrent has address of tracker for file Tracker The tracker, which runs on a webserver as well, keeps track of all peers downloading file CS5412 Spring 2012 (Cloud Computing: Birman) 20

How a node enters a swarm for file popeye.mp4 www.bittorrent.com File popeye.mp4.torrent hosted at a (well-known) webserver Peer The.torrent has address of tracker for file 3 Tracker The tracker, which runs on a webserver as well, keeps track of all peers downloading file Swarm CS5412 Spring 2012 (Cloud Computing: Birman) 21

Contents of.torrent file 22 URL of tracker Piece length Usually 256 KB SHA-1 hashes of each piece in file For reliability files allows download of multiple files

Terminology 23 Seed: peer with the entire file Original Seed: The first seed Leech: peer that s downloading the file Fairer term might have been downloader Sub-piece: Further subdivision of a piece The unit for requests is a subpiece But a peer uploads only after assembling complete piece

24 Peer-peer transactions: Choosing pieces to request Rarest-first: Look at all pieces at all peers, and request piece that s owned by fewest peers Increases diversity in the pieces downloaded avoids case where a node and each of its peers have exactly the same pieces; increases throughput Increases likelihood all pieces still available even if original seed leaves before any one node has downloaded entire file

Choosing pieces to request 25 Random First Piece: When peer starts to download, request random piece. So as to assemble first complete piece quickly Then participate in uploads When first complete piece assembled, switch to rarestfirst

Choosing pieces to request 26 End-game mode: When requests sent for all sub-pieces, (re)send requests to all peers. To speed up completion of download Cancel request for downloaded sub-pieces

Tit-for-tat as incentive to upload 27 Want to encourage all peers to contribute Peer A said to choke peer B if it (A) decides not to upload to B Each peer (say A) unchokes at most 4 interested peers at any time The three with the largest upload rates to A Where the tit-for-tat comes in Another randomly chosen (Optimistic Unchoke) To periodically look for better choices

Anti-snubbing 28 A peer is said to be snubbed if each of its peers chokes it To handle this, snubbed peer stops uploading to its peers Optimistic unchoking done more often Hope is that will discover a new peer that will upload to us

Why BitTorrent took off 29 Better performance through pull-based transfer Slow nodes don t bog down other nodes Allows uploading from hosts that have downloaded parts of a file In common with other end-host based multicast schemes

Why BitTorrent took off 30 Practical Reasons (perhaps more important!) Working implementation (Bram Cohen) with simple welldefined interfaces for plugging in new content Many recent competitors got sued / shut down Napster, Kazaa Doesn t do search per se. Users use well-known, trusted sources to locate content Avoids the pollution problem, where garbage is passed off as authentic content

Pros and cons of BitTorrent 31 Pros Proficient in utilizing partially downloaded files Discourages freeloading By rewarding fastest uploaders Encourages diversity through rarest-first Extends lifetime of swarm Works well for hot content

Pros and cons of BitTorrent 32 Cons Assumes all interested peers active at same time; performance deteriorates if swarm cools off Even worse: no trackers for obscure content

Pros and cons of BitTorrent 33 Dependence on centralized tracker: pro/con? Single point of failure: New nodes can t enter swarm if tracker goes down Lack of a search feature Prevents pollution attacks Users need to resort to out-of-band search: well known torrent-hosting sites / plain old web-search

Trackerless BitTorrent 34 To be more precise, BitTorrent without a centralizedtracker E.g.: Azureus Uses a Distributed Hash Table (Kademlia DHT) Tracker run by a normal end-host (not a web-server anymore) The original seeder could itself be the tracker Or have a node in the DHT randomly picked to act as the tracker

35 Prior to Netflix explosion, BitTorrent dominated the INternet! (From CacheLogic, 2004)

Why is (studying) BitTorrent important? 36 BitTorrent consumes significant amount of internet traffic today In 2004, BitTorrent accounted for 30% of all internet traffic (Total P2P was 60%), according to CacheLogic Slightly lower share in 2005 (possibly because of legal action), but still significant BT always used for legal software (linux iso) distribution too Recently: legal media downloads (Fox)

Example finding from a recent study 37 Gribble showed that most BitTorrent streams fail He found that the number of concurrent users is often too small, and the transfer too short, for the incentive structure to do anything No time to learn His suggestion: add a simple history mechanism Behavior from yesterday can be used today. But of course this ignores dynamics seen in the Internet...

BAR Gossip 38 Work done at UT Austin looking at gossip model Same style of protocol seen in Kelips They ask what behaviors a node might exhibit Byzantine: the node is malicious Altrustic: The node answers every request Rational: The node maximizes own benefit Under this model, is there an optimal behavior? [BAR Gossip. Harry C. Li, Allen Clement, Edmund L. Wong, Jeff Napper, Indrajit Roy, Lorenzo Alvisi, Michael Dahlin. OSDI 2006]

Basic strategy 39 They assume cryptographic keys (PKI) Used to create signatures: detect and discard junk Also employed to prevent malfactor from pretending that it send messages but they were lost in network This is used to create a scheme that allows nodes to detect and punish non-compliance

Key steps in BAR Gossip 40 1. History exchange: two parties learn about the updates the other party holds 2. Update exchange: each party copies a subset of these updates into a briefcase that is sent, encrypted, to the other party Two cases: balanced exchange for normal operation Optimistic push to help one party catch up 3. Key exchange, where the parties swap the keys needed to access the updates in the two briefcases.

Obvious concern: Failed key exchange 41 What if a rational node chooses not to send the key (or sends an invalid key)? Can t solve this problem; they prove a theorem But by tracking histories, BAR gossip allows altruistic and rational nodes to operate fairly enough Central idea is that the balanced exchange should reflect the quality of data exchanged in past This can be determined from the history and penalizes a node that tries to cheat during exchange Nash equillibrium strategy is to send the keys, so rational nodes will do so!

Outcomes achieved 42 BAR gossip protocol provides good convergence as long as: No more than 20% of nodes are Byzantine No more than 40% collude. Generally seen as the ultimate story for BitTorrent-like schemes

Insights gained? 43 Collaborative download schemes can improve download speeds very dramatically They avoid sender overload Are at risk when participants deviate from protocol Game theory suggests possible remedies BitTorrent is a successful and very practical tool Widely used inside data centers Also popular for P2P downloads In China, PPLive media streaming system very successful and very widely deployed

References 44 BitTorrent Incentives build robustness in BitTorrent, Bram Cohen BitTorrent Protocol Specification: http://www.bittorrent.org/protocol.html Poisoning/Pollution in DHT s: Index Poisoning Attack in P2P file sharing systems Pollution in P2P File Sharing Systems