The BitTorrent Protocol

Slides:



Advertisements
Similar presentations
P2P Streaming Protocol Pro- incentive Parameters draft-zeng-ppsp-protocol-pro-incentive-para-01 IETF79 Meeting Wenjun (Kevin) Zeng & Yingjie Gu Huawei.
Advertisements

Optimal Scheduling in Peer-to-Peer Networks Lee Center Workshop 5/19/06 Mortada Mehyar (with Prof. Steven Low, Netlab)
Rarest First and Choke Algorithms Are Enough
Rarest First and Choke Algorithms are Enough Arnaud LEGOUT INRIA, Sophia Antipolis France G. Urvoy-Keller and P. Michiardi Institut Eurecom France.
The BitTorrent Protocol
The BitTorrent Protocol. What is BitTorrent?  Efficient content distribution system using file swarming. Does not perform all the functions of a typical.
Incentives Build Robustness in BitTorrent Author: Bram Cohen Presenter: Brian Liao.
Incentives Build Robustness in BitTorrent- Bram Cohen Presented by Venkatesh Samprati.
The BitTorrent protocol A peer-to-peer file sharing protocol.
Incentives Build Robustness in BitTorrent Bram Cohen.
Peer-to-Peer (P2P) Networks
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
Stochastic Analysis of File Swarming Systems The Chinese University of Hong Kong John C.S. Lui Collaborators: D.M. Chiu, M.H. Lin, B. Fan.
The BitTorrent content distribution system CS217 Advanced Topics in Internet Research Guest Lecture Nikitas Liogkas, 5/11/2006.
Clustering and Sharing Incentives in BitTorrent Systems Arnaud Legout 1, Nikitas Liogkas 2, Eddie Kohler 2, Lixia Zhang 2 1 INRIA, Projet Planète, Sophia.
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Peer to Peer (P2P) Networks and File sharing. By: Ryan Farrell.
Modeling and analysis of BitTorrent-like P2P network Fan Bin Oct,1 st,2004.
1 Incentives Build Robustness in BitTorrent? Analysis on Bit Torrent Client performance By Jimmy Wong.
A P2P file distribution system ——BitTorrent Fan Bin Sep,25,2004.
Incentives Build Robustness in BitTorrent 1st Workshop on Economics of Peer-to-Peer Systems 2003 Bram Cohen
BitTorrent Background. Common Scenario Millions want to download the same popular huge files (for free) –ISO’s –Media (the real example!) Client-server.
The Bittorrent Protocol
Content Overlays (Nick Feamster) February 25, 2008.
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
BitTorrent Presentation by: NANO Surmi Chatterjee Nagakalyani Padakanti Sajitha Iqbal Reetu Sinha Fatemeh Marashi.
University of Bologna, Italy How to cheat BitTorrent and why nobody does Simon Patarin and David Hales University of Bologna ECCS 2006,
BitTorrent.
BitTorrent Internet Technologies and Applications.
BitTorrent How it applies to networking. What is BitTorrent P2P file sharing protocol Allows users to distribute large amounts of data without placing.
GPS: A General Peer-to-Peer Simulator and its Use for Modeling BitTorrent Weishuai Yang Nael Abu-Ghazaleh
1 BitTorrent System Efrat Oune Bar-Ilan What is BitTorrent? BitTorrent is a peer-to-peer file distribution system (built for intensive daily use.
BitTorrent Dr. Yingwu Zhu. Bittorrent A popular P2P application for file exchange!
A P2P file distribution system ——BitTorrent Pegasus Team CMPE 208.
1 BitHoc: BitTorrent for wireless ad hoc networks Jointly with: Chadi Barakat Jayeoung Choi Anwar Al Hamra Thierry Turletti EPI PLANETE 28/02/2008 MAESTRO/PLANETE.
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,
Do incentives build robustness in BitTorrent? Michael Piatek, Tomas Isdal, Thomas Anderson, Arvind Krishnamurthy, Arun Venkataramani.
Bit Torrent A good or a bad?. Common methods of transferring files in the internet: Client-Server Model Peer-to-Peer Network.
Content Overlays (continued) Nick Feamster CS 7260 March 26, 2007.
MULTI-TORRENT: A PERFORMANCE STUDY Yan Yang, Alix L.H. Chow, Leana Golubchik Internet Multimedia Lab University of Southern California.
1 Slides from Richard Yang with minor modification Peer-to-Peer Systems: DHT and Swarming.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP r.
B IT T ORRENT T ECHNOLOGY Anthony Pervetich. H ISTORY Bram Cohen Designed the BitTorrent protocol in April 2001 Released July 2, 2001 Concept Late 90’s.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Bit Torrent Nirav A. Vasa. Topics What is BitTorrent? Related Terms How BitTorrent works Steps involved in the working Advantages and Disadvantages.
Peer to Peer Networking. Network Models => Mainframe Ex: Terminal User needs direct connection to mainframe Secure Account driven  administrator controlled.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
PEAR TO PEAR PROTOCOL. Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change.
November 19, 2016 Guide:- Mrs. Kale J. S. Presented By:- Hamand Amol Sambhaji. Hamand Amol Sambhaji. Pardeshi Dhananjay Rajendra. Pardeshi Dhananjay Rajendra.
Lecture XV: Real P2P Systems
05 - P2P applications and Sockets
An example of peer-to-peer application
FairTorrent: BrinGing Fairness to Peer-to-Peer Systems
Introduction to BitTorrent
BitTorrent Vs Gnutella.
Venkatesh Kumar Auzumeedi
nTorrent: Peer-to-Peer File Sharing in Named Data Networking
Designing a new BitTorrent Client
Economics and Computation Week 7: The economics of P2P file sharing
Angelo Sapello University of Delaware
Part 4: Peer to Peer - P2P Applications
Small Is Not Always Beautiful
Simplified Explanation of “Do incentives build robustness in BitTorrent?” By James Hoover.
Content Distribution Networks + P2P File Sharing
PEER-TO-PEER SYSTEMS.
Pure P2P architecture no always-on server
Chapter 2 Application Layer
Content Distribution Networks + P2P File Sharing
Presentation transcript:

The BitTorrent Protocol

What is BitTorrent? Efficient content distribution system using file swarming. Usually does not perform all the functions of a typical p2p system, like searching.

BitTorrent traffic CacheLogic estimated (around 2003 or so0 that BitTorrent Traffic accounts for roughly 35% of all traffic on the Internet.

File sharing To share a file or group of files, a peer first creates a .torrent file, a small file that contains metadata about the files to be shared, and Information about the tracker, the computer that coordinates the file distribution. Peers first obtain a .torrent file, and then connect to the specified tracker, which tells them from which other peers to download the pieces of the file.

BT Components On a public domain site, obtain .torrent file. for example: http://bt.LOR.net http://bt.HarryPotter.com/ Web Server The Lord of Ring.torrent Harry Potter.torrent Transformer.torrent

File sharing Large files are broken into pieces of size between 64 KB and 1 MB 1 2 3 4 5 8 6 7

BT: publishing a file A B C Harry Potter.torrent Bob Web Server Tracker Downloader: A Seeder: B Downloader: C

The .torrent file The URL of the tracker Pieces <hash1, hash 2,…, hash n> Piece length Name of the file Length of the file

The Tracker IP address, port, peer id State information (Completed or Downloading) Returns a random list of peers

Tracker protocol communicates with clients via HTTP/HTTPS client GET request info_hash: uniquely identifies the file peer_id: chosen by and uniquely identifies the client client IP and port numwant: how many peers to return (defaults to 50) stats: bytes uploaded, downloaded, left tracker GET response interval: how often to contact the tracker list of peers, containing peer id, IP and port stats: complete, incomplete

Peer wire protocol implemented directly on top of TCP messages handshake (maybe with bitfield) keep-alive choke / unchoke interested / not interested have (advertisement of a newly acquired piece) request / piece cancel (only used in “endgame mode”) port (used in tracker-less mode)

(not a derogatory term) BitTorrent Lingo Seeder = a peer that provides the complete file. Initial seeder = a peer that provides the initial copy. Leecher One who is downloading (not a derogatory term) Initial seeder Leecher Seeder

Simple example {1,2,3,4,5,6,7,8,9,10} Seeder: A {} {1,2,3} {1,2,3,5} {1,2,3,4} {1,2,3,4,5} Downloader C Downloader B

Basic Idea Initial seeder chops file into many pieces. Leecher first locates the .torrent file that directs it to a tracker, which tells which other peers are downloading that file. As a leecher downloads pieces of the file, replicas of the pieces are created. More downloads mean more replicas available As soon as a leecher has a complete piece, it can potentially share it with other downloaders. Eventually each leecher becomes a seeder by obtaining all the pieces, and assembles the file. Verifies the checksum.

Operation

Pieces and Sub-Pieces A piece is broken into sub-pieces ... typically 16KB in size Until a piece is assembled, only download the sub-pieces of that piece only This policy lets pieces assemble quickly

Pipelining When transferring data over TCP, always have several requests pending at once, to avoid a delay between pieces being sent. At any point in time, some number, typically 5, are requested simultaneously. Every time a piece or a sub-piece arrives, a new request is sent out. DOUBT

Piece Selection The order in which pieces are selected by different peers is critical for good performance If an inefficient policy is used, then peers may end up in a situation where each has all identical set of easily available pieces, and none of the missing ones. If the original seed is prematurely taken down, then the file cannot be completely downloaded! What are “good policies?”

BT: internal Chunk Selection mechanisms Strict Priority First Priority Rarest First General rule Random First Piece Special case, at the beginning Endgame Mode Special case

Random First Piece Initially, a peer has nothing to trade Important to get a complete piece ASAP Select a random piece of the file and download it

Rarest Piece First Determine the pieces that are most rare among your peers, and download those first. This ensures that the most commonly available pieces are left till the end to download.

Endgame Mode Near the end, missing pieces are requested from every peer containing them. When the piece arrives, the pending requests for that piece are cancelled. This ensures that a download is not prevented from completion due to a single peer with a slow transfer rate. Some bandwidth is wasted, but in practice, this is not too much.

BT: internal mechanism Built-in incentive mechanism (where all the magic happens): Choking Algorithm Optimistic Unchoking

Choking Choking is a temporary refusal to upload. It is one of BitTorrent’s most powerful idea to deal with free riders (those who only download but never upload). Tit-for-tat strategy is based on game-theoretic concepts.

Choking Reasons for choking: Avoid free riders Network congestion A good choking algorithm caps the number of simultaneous uploads for good TCP performance. Avoids choking and unchoking too quickly. Alice Choked Choked Bob

More on Choking Peers try out unused connections once in a while to find out if they might be better than the current ones (optimistic unchoking).

Optimistic unchoking A BitTorrent peer has a single “optimistic unchoke” to which it uploads regardless of the current download rate from it. This peer rotates every 30s Reasons: To discover currently unused connections are better than the ones being used To provide minimal service to new peers

Upload-Only mode Once download is complete, a peer has no download rates to use for comparison nor has any need to use them. The question is, which nodes to upload to? Policy: Upload to those with the best upload rate. This ensures that pieces get replicated faster, and new seeders are created fast

Questions about BT Which features contribute to the efficiency of BitTorrent? What is the effect of bandwidth constraints? Is the Rarest First policy really necessary? Must nodes perform seeding after downloading is complete? How serious is the Last Piece Problem? Does the incentive mechanism affect the performance much?