bit torrent protocol
DESCRIPTION
Presented to Faculty of Science at University of ZakhoTRANSCRIPT
BitTorrent Protocol
Introduction, description and operation
Karwan Jacksi
Faculty of Science
Computer Science Department
University of Zakho
Faculty - Department seminar
Karwan Jacksi 20/11/2011
Client-Server Model• Background:
– When we download a file from the internet we, usually, use HTTP/FTP protocols to download the file from the server.
• This is when we use client-server architecture.
– The server has to upload this file to all clients that are requesting the file.
– The bandwidth of the server is the
Karwan Jacksi 20/11/2011
– The bandwidth of the server is the bottleneck if there are too many simultaneous applicants.
– Client-Server paradigm would get congested and overload the server with too many requests.
– Client-server model lacks the robustness.
• since it has a single point of failure.
Client-Server Model Cont’d
• Solutions to these issues are to:– Increase the number of servers and load balancers to let the performance and robustness grow.
– But these solutions would rather fall into a costlier system in the hardware point of view.
Karwan Jacksi 20/11/2011
Peer-to-Peer Model
• Background:
– P2P model offers more than a single source for files to be downloaded:
• It distributes resources among many nodes.
• Thus, if a node fails or rejects to upload the file, peers can get the leftover pieces of the file from the remaining nodes in the network.
– When the number of nodes
Karwan Jacksi 20/11/2011
– When the number of nodes increase, opportunities to get pieces from other peers increase as well.
– Accordingly, the bandwidth is used in an efficient way when the number of clients increase.
What is BitTorrent?• BitTorrent:
– Is one of many P2P file sharing systems that have been
proposed and implemented, e.g. Gnutella, Kazaa, etc.
– One of few P2P protocols that has attracted significant
attention by a wide range of users.
– The power of BitTorrent protocol comes from splitting the
file into several smaller pieces, once a piece is obtained by a file into several smaller pieces, once a piece is obtained by a
peer, it can be shared with other peers in the swarm.
– This is how BitTorrent offers more than a single source for
files to be downloaded.
Karwan Jacksi 20/11/2011
What is BitTorrent? Cont’d
• BitTorrent:
– Is one of the most common protocols for transferring large
files.
– It has been estimated that it accounted for roughly 43% to 70%
of all Internet traffic (depending on geographical location).
– Programmer Bram Cohen designed the protocol in April
2001 and released a first implementation on July 2, 2001.2001 and released a first implementation on July 2, 2001.
– As of January 2011 BitTorrent has 100 million users.
– At any given instant of time BitTorrent has, on average,
more active users than YouTube and Facebook combined.
– This refers to the number of active users at any instant and not
to the total number of unique users.
Karwan Jacksi 20/11/2011
BitTorrent Terminology:• BitTorrent terms:
– Torrent: a small metadata file with .torrent extension.
• Contains: information about files e.g. names, size, etc., and URL of a Tracker.
– Swarm: a group of peers that are collectively connected for a particular torrent file form a swarm.
– Tracker: a navigation centre for the swarm and is responsible for helping clients to find each other in their responsible for helping clients to find each other in their swarm.
– Seeder: a peer that offers a complete copy of a specific file.
– Leecher or Downloader: a peer that doesn't have a complete copy.
Karwan Jacksi 20/11/2011
BitTorrent Terminology Cont’d
Karwan Jacksi 20/11/2011
BitTorrent Terminology Cont’d
• Choke: it is a state in which a client refuses to upload pieces to another peer.
• Optimistic unchoke: finds out a number of choked peers, and tries to select one of them to get unchoked.
– This approach gives 3 times more chance to the newly connected peers to be unchoked.
• Snub: Occasionally a client finds itself in a state where it is
Karwan Jacksi 20/11/2011
• Snub: Occasionally a client finds itself in a state where it is choked by all peers it was formerly downloading from.
– It flags the connection as snubbed which results in more than one optimistic unchoke, this is called Anti snubbing.
BitTorrent Terminology Cont’d
• Piece selection: which piece of the file should be selected by a peer to start downloading next.
– Strict priority: completes all the current sub-pieces before requesting any other pieces.
– Rarest first: selects the piece with the lowest number of providers.
• It prevents pieces from disappearing from the swarm.
Karwan Jacksi 20/11/2011
– Random first: Selects a random available piece to be downloaded next.
• Commonly used for newly connected peers.
Adoption
– A growing number of individuals and organizations are using
BitTorrent to distribute their own or licensed material.
– Independent adopters report that without using BitTorrent
technology and its dramatically reduced demands on their
private networking hardware and bandwidth, they could not
afford to distribute their files.• Film, video and music:• Film, video and music:
– BitTorrent Inc. has obtained a number of licenses from
Hollywood studios for distributing popular content from
their.
– Sub PopPop Records releases tracks and videos via BitTorrent
Inc.
Karwan Jacksi 20/11/2011
Adoption Cont’d
• Broadcasters:
– The CBC became the first public broadcaster in North America to
make a full show available for download using BitTorrent.
– The Norwegian Broadcasting Corporation (NRK) has since March
2008 experimented with bittorrent distribution, available online.
– Personal materials:
–– TheThe Amazon S3Amazon S3 "Simple Storage Service" is a scalable Internet-–– TheThe Amazon S3Amazon S3 "Simple Storage Service" is a scalable Internet-
based storage service with a simple web service interface,
equipped with built-in BitTorrent support.
– Blog Torrent offers a simplified BitTorrent tracker to
enable bloggers and non-technical users to host a tracker on their
site.
Karwan Jacksi 20/11/2011
Adoption Cont’d
• Software:
– Many software games, especially those whose large size
makes them difficult to host due to bandwidth limits.
– Many major open source and free software projects
encourage BitTorrent as well as conventional downloads of
their products (via HTTP, FTP etc.) to increase availability
and to reduce load on their own servers, especially when and to reduce load on their own servers, especially when
dealing with larger files.
– Government:
– The UK government used BitTorrent to distribute details
about how the tax money of UK citizens was spent.
– Others:
– Facebook and Twitter use BitTorrent to distribute updates
to their servers.
Karwan Jacksi 20/11/2011
BitTorrent Clients
– A BitTorrent client is a computer program that manages
downloads and uploads using the BitTorrent protocol.
– Applications:
– There are too many applications:
Karwan Jacksi 20/11/2011
– Questions?
Karwan Jacksi 20/11/2011