Your SlideShare is downloading. ×
Bit torrent protocol seminar by Sanjay R
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Bit torrent protocol seminar by Sanjay R


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. The BitTorrent Protocol
  • 2. Common Scenario
    Millions want to download the same popular huge files (for free)
    Media (the real example!)
    Client-server model fails
    Single server fails
    Can’t afford to deploy enough servers
  • 3. Client-Server
  • 4. Peer-to-Peer
    • A model of communication where every node in the network acts alike.
    • 5. As opposed to the Client-Server model, where one node provides services and other nodes use the services.
  • Advantages of P2P Computing
    No central point of failure
    E.g., the Internet and the Web do not have a central point of failure.
    Most internet and web services use the client-server model (e.g. HTTP), so a specific service does have a central point of failure.
    Since every peer is alike, it is possible to add more peers to the system and scale to larger networks.
    Disadvantage of P2P Computing
    • Decentralized coordination.
    • 6. All nodes are not created equal.
  • BitTorrent
    • Written by Bram Cohen in 2001
    • 7. Designed to transfer large files
    • 8. 160 million clients, 100 million active users
    • 9. Used by many different people and organisations
    • 10. The more popular a large video, audio or software file, the faster and cheaper it can be transferred with BitTorrent
  • “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
    Encourages contribution by all nodes
    Peer-to-peer in nature
    Even if clients join simultaneously (“flash crowd”)
    BitTorrent protocol is implemented in applications called BitTorrent Clients such as uTorrent, Bit Comet.
  • 11. BitTorrent Terminology
    Peers – A node or computer that does not have the complete file
    Seed or seeder - A computer with a complete copy of a BitTorrent file
    Swarm- A group of computers simultaneously sending (uploading) or receiving (downloading) the same file
    .torrent - A pointer file that directs your computer to the file you want to download
    Tracker- A server that manages the BitTorrent file-transfer process
  • 12. BitTorrent Swarm
    • Swarm
    • 13. Set of peers all downloading the same file
    • 14. Organized as a random mesh
    • 15. Each node knows list of pieces downloaded by neighbors
    • 16. Node requests pieces it does not own from neighbors
  • 17.
  • 18. A *.torrent guides users to owners of a file
    User obtains *.torrent file. File contains meta info about a target file.
    Armed with a list of peers holding pieces of the file, user downloads from many peers
    User loads *.torrent file into BitTorrent client, which then looks up the named client
    Tracker coordinates peers.
  • 19. All peers act as a source
    A machine with a complete copy (the seed) can distribute incomplete pieces to multiple peers
    Peers exchange different pieces of the file with one another until they assemble a whole
    As soon as the user has a piece of the file on his machine, he can become a source of that piece to other peers, helping speed download
  • 20. The key ingredients of the *.torrent file are the tracker’s address and the unique SHA1 hash
    All data in a metainfo file is encoded.
    info: a dictionary that describes the file(s) of the torrent.
    announce: contains the URL of the “tracker”
    creation date
    Comments from the author(optional)
    created by: (optional)
    piece length: number of bytes in each piece (integer)
    pieces: string consisting of the concatenation of all 20-byte SHA1 hash values, one per piece
  • 21. Bit Torrent Download
    • Download and install the BitTorrent client software
    • 22. Check and configure firewall and/or router for BitTorrent (if applicable)
    • 23. Find files to download
    • 24. Download and open the .torrent pointer file
    • 25. Let BitTorrent give and receive pieces of the file
    • 26. Stay connected after the download completes to share your .torrent files with others
  • Upload and Publish File
    • Download and install the BitTorrent client software
    • 27. Create a New .torrent file
    Publish the .torrent file on torrent search Index sites such as PirateBay
  • 28. 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
  • 29. Choosing 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-first
  • 30. Why 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
  • 31. Why BitTorrent took off
    Practical Reasons (perhaps more important!)
    Working implementation (Bram Cohen) with simple well-defined interfaces for plugging in new content
    Many recent competitors got sued / shut down
    Napster, Kazaa
    Users use well-known, trusted sources to locate content
    Avoids the pollution problem, where garbage is passed off as authentic content
  • 32. Pros and cons of BitTorrent
    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”
  • 33. Pros and cons of BitTorrent
    Assumes all interested peers active at same time; performance deteriorates if swarm “cools off”
    Even worse: no trackers for obscure content
  • 34. Pros and cons of BitTorrent
    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
  • 35. “Trackerless” BitTorrent
    To be more precise, “BitTorrent without a centralized-tracker”
    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
  • 36. Why is (studying) BitTorrent important?
    BitTorrent consumes significant amount of internet traffic today
    In 2004, BitTorrent accounted for 35 to 60% of all internet traffic (according to CacheLogic)
    BT always used for legal software (linuxiso) distribution to
  • 37. Companies using BitTorrent Technology
    • With help from BitTorrent, Facebook can now push hundreds of megabytes of new code to all servers worldwide in just a minute.
    • 38. Twitter is calling in the help of BitTorrent to deploy files across its many servers in a more efficient way. The project dubbed ‘Murder’ is based on the Open Source BitTornado BitTorrent client.
  • Conclusion
    BitTorrent is a well thought-out protocol that embraces aspects of cooperation and self-optimizing mechanisms.
    BitTorrent propose solutions for current optimization and scalability problems
  • 39. Thank you for your attention.