CS5412: TORRENTS AND TIT-FOR-TAT

3y ago
25 Views
2 Downloads
270.31 KB
44 Pages
Last View : 20d ago
Last Download : 3m ago
Upload by : Nadine Tse
Transcription

CS5412 Spring 2012 (Cloud Computing: Birman)CS5412:TORRENTS AND TIT-FOR-TATLecture VIKen Birman1

BitTorrent2 Today we’ll be focusing on BitTorrent The technology really has three aspects Astandard tht BitTorrent client systems follow Some existing clients, e.g. the free Torrent client, PPLive A clever idea: using “tit-for-tat” mechanisms to rewardgood behavior and to punish bad behavior (reminderof the discussion we had about RON.) This third aspect is especially intriguing!CS5412 Spring 2012 (Cloud Computing: Birman)

The basic BitTorrent Scenario3 Millions want to download the same popular hugefiles (for free) ISO’s Media (the real example!)Client-server model fails Singleserver fails Can’t afford to deploy enough serversCS5412 Spring 2012 (Cloud Computing: Birman)

Why not use IP Multicast?4 IP Multicast not a real option in general WANsettings Notsupported by many ISPs Most commonly seen in private data centers Alternatives End-hostbased Multicast BitTorrent Other P2P file-sharing schemes (from prior lectures)CS5412 Spring 2012 (Cloud Computing: Birman)

5SourceRouter“Interested”End-hostCS5412 Spring 2012 (Cloud Computing: Birman)

CS5412 Spring 2012 (Cloud Computing: Birman)

”End-hostCS5412 Spring 2012 (Cloud Computing: Birman)

IP 12 Spring 2012 (Cloud Computing: Birman)

End-host based 12 Spring 2012 (Cloud Computing: Birman)

End-host based multicast10 “Single-uploader” “Multiple-uploaders” Lotsof nodes want to download Make use of their uploading abilities as well Node that has downloaded (part of) file will thenupload it to other nodes. Uploading costs amortized across all nodesCS5412 Spring 2012 (Cloud Computing: Birman)

End-host based multicast11 Also called “Application-level Multicast”Many protocols proposed early this decade Yoid(2000), Narada (2000), Overcast (2000), ALMI(2001) Alluse single trees Problem with single trees?CS5412 Spring 2012 (Cloud Computing: Birman)

End-host multicast using single tree12SourceCS5412 Spring 2012 (Cloud Computing: Birman)

End-host multicast using single tree13SourceCS5412 Spring 2012 (Cloud Computing: Birman)

End-host multicast using single tree14SourceSlow data transferCS5412 Spring 2012 (Cloud Computing: Birman)

End-host multicast using single tree15 Tree is “push-based” – node receives data, pushesdata to childrenFailure of “interior”-node affects downloads in entiresubtree rooted at nodeSlow interior node similarly affects entire subtreeAlso, leaf-nodes don’t do any sending!Though later multi-tree / multi-path protocols(Chunkyspread (2006), Chainsaw (2005), Bullet(2003)) mitigate some of these issuesCS5412 Spring 2012 (Cloud Computing: Birman)

BitTorrent16 Written by Bram Cohen (in Python) in 2001“Pull-based” “swarming” approachEach file split into smaller pieces Nodes request desired pieces from neighbors As opposed to parents pushing data that they receivePieces not downloaded in sequential order Previous multicast schemes aimed to support “streaming”;BitTorrent does not Encourages contribution by all nodesCS5412 Spring 2012 (Cloud Computing: Birman)

BitTorrent Swarm17 Swarm Setof peers all downloading the same file Organized as a random mesh Each node knows list of pieces downloaded byneighborsNode requests pieces it does not own fromneighbors Exactmethod explained laterCS5412 Spring 2012 (Cloud Computing: Birman)

How a node enters a swarmfor file “popeye.mp4” File popeye.mp4.torrenthosted at a (well-known)webserverThe .torrent has address oftracker for fileThe tracker, which runs on awebserver as well, keepstrack of all peersdownloading fileCS5412 Spring 2012 (CloudComputing: Birman)18

How a node enters a swarmfor file “popeye.mp4”www.bittorrent.com 1Peer File popeye.mp4.torrenthosted at a (well-known)webserverThe .torrent has address oftracker for fileThe tracker, which runs on awebserver as well, keepstrack of all peersdownloading fileCS5412 Spring 2012 (CloudComputing: Birman)19

How a node enters a swarmfor file “popeye.mp4”www.bittorrent.com Peer2 Tracker File popeye.mp4.torrenthosted at a (well-known)webserverThe .torrent has address oftracker for fileThe tracker, which runs on awebserver as well, keepstrack of all peersdownloading fileCS5412 Spring 2012 (CloudComputing: Birman)20

How a node enters a swarmfor file “popeye.mp4”www.bittorrent.com Peer3Tracker File popeye.mp4.torrenthosted at a (well-known)webserverThe .torrent has address oftracker for fileThe tracker, which runs on awebserver as well, keepstrack of all peersdownloading fileSwarmCS5412 Spring 2012 (CloudComputing: Birman)21

Contents of .torrent file22 URL of trackerPiece length – Usually 256 KBSHA-1 hashes of each piece in file For reliability“files” – allows download of multiple filesCS5412 Spring 2012 (Cloud Computing: Birman)

Terminology23 Seed: peer with the entire file Original Leech: peer that’s downloading the file Fairer Seed: The first seedterm 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 completepieceCS5412 Spring 2012 (Cloud Computing: Birman)

Peer-peer transactions:Choosing pieces to request24 Rarest-first: Look at all pieces at all peers, andrequest piece that’s owned by fewest peers Increasesdiversity in the pieces downloaded avoidscase where a node and each of its peers haveexactly the same pieces; increases throughput Increaseslikelihood all pieces still available even iforiginal seed leaves before any one node hasdownloaded entire fileCS5412 Spring 2012 (Cloud Computing: Birman)

Choosing pieces to request25 Random First Piece: Whenpeer starts to download, request random piece. Soas to assemble first complete piece quickly Then participate in uploads Whenfirst complete piece assembled, switch to rarest-firstCS5412 Spring 2012 (Cloud Computing: Birman)

Choosing pieces to request26 End-game mode: Whenrequests sent for all sub-pieces, (re)send requeststo all peers. To speed up completion of download Cancel request for downloaded sub-piecesCS5412 Spring 2012 (Cloud Computing: Birman)

Tit-for-tat as incentive to upload27 Want to encourage all peers to contributePeer A said to choke peer B if it (A) decides not toupload to BEach peer (say A) unchokes at most 4 interested peersat any time The three with the largest upload rates to A Where the tit-for-tat comes inAnother randomly chosen (Optimistic Unchoke) To periodically look for better choicesCS5412 Spring 2012 (Cloud Computing: Birman)

Anti-snubbing28 A peer is said to be snubbed if each of its peerschokes itTo handle this, snubbed peer stops uploading to itspeersOptimistic unchoking done more often Hopeis that will discover a new peer that will uploadto usCS5412 Spring 2012 (Cloud Computing: Birman)

Why BitTorrent took off29 Better performance through “pull-based” transfer Slow nodes don’t bog down other nodesAllows uploading from hosts that have downloadedparts of a file Incommon with other end-host based multicast schemesCS5412 Spring 2012 (Cloud Computing: Birman)

Why BitTorrent took off30 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, KazaaDoesn’t do “search” per se. Users use well-known, trustedsources to locate content Avoids the pollution problem, where garbage is passed off asauthentic contentCS5412 Spring 2012 (Cloud Computing: Birman)

Pros and cons of BitTorrent31 Pros Proficientin utilizing partially downloaded files Discourages “freeloading” Byrewarding fastest uploaders Encourages Extends diversity through “rarest-first”lifetime of swarmWorks well for “hot content”CS5412 Spring 2012 (Cloud Computing: Birman)

Pros and cons of BitTorrent32 Cons Assumesall interested peers active at same time;performance deteriorates if swarm “cools off” Even worse: no trackers for obscure contentCS5412 Spring 2012 (Cloud Computing: Birman)

Pros and cons of BitTorrent33 Dependence on centralized tracker: pro/con? Single point of failure: New nodes can’t enter swarmif tracker goes down Lack of a search feature Prevents pollution attacks Users need to resort to out-of-band search: well knowntorrent-hosting sites / plain old web-searchCS5412 Spring 2012 (Cloud Computing: Birman)

“Trackerless” BitTorrent34 To be more precise, “BitTorrent without a centralizedtracker”E.g.: AzureusUses a Distributed Hash Table (Kademlia DHT)Tracker run by a normal end-host (not a web-serveranymore)The original seeder could itself be the tracker Or have a node in the DHT randomly picked to act as thetracker CS5412 Spring 2012 (Cloud Computing: Birman)

Prior to Netflix “explosion”, BitTorrentdominated the INternet!35(From CacheLogic, 2004)CS5412 Spring 2012 (Cloud Computing: Birman)

Why is (studying) BitTorrent important?36 BitTorrent consumes significant amount of internettraffic today In2004, BitTorrent accounted for 30% of all internettraffic (Total P2P was 60%), according to CacheLogic Slightly lower share in 2005 (possibly because of legalaction), but still significant BT always used for legal software (linux iso) distributiontoo Recently: legal media downloads (Fox)CS5412 Spring 2012 (Cloud Computing: Birman)

Example finding from a recent study37 Gribble showed that most BitTorrent streams “fail” Hefound that the number of concurrent users is oftentoo small, and the transfer too short, for the incentivestructure to do anything No time to “learn” His suggestion: add a simple history mechanismBehavior from yesterday can be used today. But ofcourse this ignores “dynamics” seen in the Internet.CS5412 Spring 2012 (Cloud Computing: Birman)

BAR Gossip38 Work done at UT Austin looking at gossip model Same style of protocol seen in KelipsThey 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, JeffNapper, Indrajit Roy, Lorenzo Alvisi, Michael Dahlin. OSDI 2006]CS5412 Spring 2012 (Cloud Computing: Birman)

Basic strategy39 They assume cryptographic keys (PKI) Usedto create signatures: detect and discard junk Also employed to prevent malfactor from pretendingthat it send messages but they were lost in network This is used to create a scheme that allows nodes todetect and punish non-complianceCS5412 Spring 2012 (Cloud Computing: Birman)

Key steps in BAR Gossip401.2.History exchange: two parties learn about theupdates the other party holdsUpdate exchange: each party copies a subset ofthese updates into a briefcase that is sent,encrypted, to the other party Twocases: balanced exchange for normal operation Optimistic push to help one party catch up3.Key exchange, where the parties swap the keysneeded to access the updates in the twobriefcases.CS5412 Spring 2012 (Cloud Computing: Birman)

Obvious concern: Failed key exchange41 What if a rational node chooses not to send the key (orsends an invalid key)?Can’t “solve” this problem; they prove a theorem But by tracking histories, BAR gossip allows altruistic andrational nodes to operate fairly enough Central idea is that the balanced exchange shouldreflect the quality of data exchanged in pastThis can be determined from the history and penalizes anode that tries to cheat during exchange Nash equillibrium strategy is to send the keys, so rationalnodes will do so! CS5412 Spring 2012 (Cloud Computing: Birman)

Outcomes achieved42 BAR gossip protocol provides good convergence aslong as: No more than 20% of nodes are ByzantineNo more than 40% collude.Generally seen as the “ultimate story” forBitTorrent-like schemesCS5412 Spring 2012 (Cloud Computing: Birman)

Insights gained?43 Collaborative download schemes can improvedownload speeds very dramatically Theyavoid sender overload Are at risk when participants deviate from protocol Game theory suggests possible remedies BitTorrent is a successful and very practical tool Widelyused inside data centers Also popular for P2P downloads In China, PPLive media streaming system very successfuland very widely deployedCS5412 Spring 2012 (Cloud Computing: Birman)

References44 BitTorrent “Incentivesbuild robustness in BitTorrent”, Bram Cohen BitTorrent Protocol tml Poisoning/Pollution in DHT’s: “IndexPoisoning Attack in P2P file sharing systems” “Pollution in P2P File Sharing Systems”CS5412 Spring 2012 (Cloud Computing: Birman)

BitTorrent CS5412 Spring 2012 (Cloud Computing: Birman) 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

Related Documents:

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

10 tips och tricks för att lyckas med ert sap-projekt 20 SAPSANYTT 2/2015 De flesta projektledare känner säkert till Cobb’s paradox. Martin Cobb verkade som CIO för sekretariatet för Treasury Board of Canada 1995 då han ställde frågan

service i Norge och Finland drivs inom ramen för ett enskilt företag (NRK. 1 och Yleisradio), fin ns det i Sverige tre: Ett för tv (Sveriges Television , SVT ), ett för radio (Sveriges Radio , SR ) och ett för utbildnings program (Sveriges Utbildningsradio, UR, vilket till följd av sin begränsade storlek inte återfinns bland de 25 största

Hotell För hotell anges de tre klasserna A/B, C och D. Det betyder att den "normala" standarden C är acceptabel men att motiven för en högre standard är starka. Ljudklass C motsvarar de tidigare normkraven för hotell, ljudklass A/B motsvarar kraven för moderna hotell med hög standard och ljudklass D kan användas vid

LÄS NOGGRANT FÖLJANDE VILLKOR FÖR APPLE DEVELOPER PROGRAM LICENCE . Apple Developer Program License Agreement Syfte Du vill använda Apple-mjukvara (enligt definitionen nedan) för att utveckla en eller flera Applikationer (enligt definitionen nedan) för Apple-märkta produkter. . Applikationer som utvecklas för iOS-produkter, Apple .

Il cuoco, il ladro, sua moglie e l'amante (tit. orig. The Cook, the Thief, His Wife and Her Lover, P. Greenaway, Francia/Gran Bretagna/Irlanda 1989) Il pranzo di Babette (tit. orig. Babettes gæstebud, G. Axel, Danimarca 1987) Pastasciutta, amore mio (tit. orig. Fatso, A. Bancroft, USA 1980)

New music Depaul may 4, 2018 PrograM Notes Brad Robin (b. 1969) Torrents for alto saxophone and live electronics (2015) Duration: 10 minutes Torrents invites a live saxophone to find common ground with a computer element. The latter combines various permutations of water and the saxophone through processing in its ever morphing voice in an evolving

9 MATHEMATICS - Week 1 Lesson 2: Properties of Operations Learning Objectives: Students will be able to simplify computations with integers, fractions and decimals by using the associative and commutative properties of addition and multiplication, and