Unformatted text preview:

BitTorrentCommon ScenarioIP Multicast?Slide 4Client-ServerSlide 6IP multicastEnd-host based multicastSlide 9Slide 10End-host multicast using single treeSlide 12Slide 13Slide 14Slide 15BitTorrent SwarmHow a node enters a swarm for file “popeye.mp4”Slide 18Slide 19Slide 20Contents of .torrent fileTerminologyPeer-peer transactions: Choosing pieces to requestChoosing pieces to requestSlide 25Tit-for-tat as incentive to uploadAnti-snubbingWhy BitTorrent took offSlide 29Pros and cons of BitTorrentSlide 31Slide 32“Trackerless” BitTorrentWhy is (studying) BitTorrent important?Slide 35Other file-sharing systemsFile-sharing systems…ReferencesBitTorrentCS514Vivek Vishnumurthy, TACommon Scenario•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 serversIP Multicast?•Recall: IP Multicast not a real option in general settings–Not scalable–Only used in private settings•Alternatives–End-host based Multicast–BitTorrent–Other P2P file-sharing schemes (later in lecture)Router“Interested” End-hostSourceRouter“Interested” End-hostSourceClient-ServerRouter“Interested” End-hostSourceClient-ServerOverloaded!Router“Interested” End-hostSourceIP multicastRouter“Interested” End-hostSourceEnd-host based multicastEnd-host based multicast•“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 nodesEnd-host based multicast•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 treeSourceEnd-host multicast using single treeSourceEnd-host multicast using single treeSourceSlow data transferEnd-host multicast using single tree•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 issuesBitTorrent•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 nodesBitTorrent Swarm•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 laterHow 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 fileHow a node enters a swarm for file “popeye.mp4”www.bittorrent.comPeer1popeye.mp4.torrent•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 fileHow a node enters a swarm for file “popeye.mp4”PeerTrackerAddresses of peers2www.bittorrent.com•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 fileHow a node enters a swarm for file “popeye.mp4”PeerTracker3www.bittorrent.comSwarm•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 fileContents of .torrent file•URL of tracker•Piece length – Usually 256 KB•SHA-1 hashes of each piece in file–For reliability•“files” – allows download of multiple filesTerminology•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 piecePeer-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 fileChoosing pieces to request•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 rarest-firstChoosing pieces to request•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-piecesTit-for-tat as incentive to upload•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 choicesAnti-snubbing•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 usWhy BitTorrent took off•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 schemesWhy BitTorrent took off•Practical


View Full Document

CORNELL CS 514 - BitTorrent

Documents in this Course
LECTURE

LECTURE

29 pages

LECTURE

LECTURE

28 pages

Load more
Download BitTorrent
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view BitTorrent and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view BitTorrent 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?