Top Banner
The BitTorrent Protocol Taken from http://www.cs.uiowa.edu/~ghosh/bittorrent.ppt
76

The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Jul 04, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

The BitTorrent Protocol

Taken from

http://www.cs.uiowa.edu/~ghosh/bittorrent.ppt

Page 2: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

What is BitTorrent?

Efficient content distribution system using

file swarming. Usually does not perform

all the functions of a typical p2p system,

like searching.

Page 3: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BitTorrent traffic

CacheLogic estimated that BitTorrent traffic

accounts for roughly 35% of all traffic on the

Internet.

Page 4: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

File sharingTo share a file or group of files, a peer first creates a .torrent file, a small file that contains

(1)metadata about the files to be shared, and (2) 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.

Page 5: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT Components

• On a public domain site, obtain .torrent file. for example: – http://bt.LOR.net– http://bt.HarryPotter.com/ Web Server

Harry Potter.torrentTransformer.torrent

The Lord of Ring.torrent

Page 6: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

File sharingLarge files are broken into pieces of size between

64 KB and 1 MB

1 2 3 4 5 6 7 8

Page 7: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Web Server

Bob

Page 8: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Web Server

Bob

Page 9: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Web Server

Bob

Page 10: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Web Server

BobHarry Potter.torrent

Page 11: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Harry Potter.torrent

Page 12: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Harry Potter.torrent

Page 13: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Harry Potter.torrent

Page 14: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Harry Potter.torrent

Page 15: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Harry Potter.torrent

Page 16: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Downloader:

ASeeder:

BDownloader:

C

Harry Potter.torrent

Page 17: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: publishing a file

Bob

Tracker

Downloader:

ASeeder:

BDownloader:

C

Harry Potter.torrent

Page 18: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

The .torrent file

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

Page 19: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

The Tracker

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

Page 20: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BitTorrent LingoSeeder = a peer that provides the complete file.Initial seeder = a peer that provides the initial copy.

Initial seeder

Seeder

Leecher

One who is downloading(not a derogatory term)

Leecher

Page 21: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

{1,2,3,4,5,6,7,8,9,10}

Page 22: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

{}

Page 23: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

{}

Page 24: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

{1,2,3}

Page 25: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

{1,2,3}

Downloader C

{}

Page 26: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

{1,2,3}

Downloader C

{}

Page 27: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

Downloader C

{1,2,3}

{1,2,3,4}

Page 28: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

Downloader C

{1,2,3}

{1,2,3,4}

Page 29: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

Downloader C{1,2,3,4}

{1,2,3,5}

Page 30: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

Downloader C{1,2,3,4}

{1,2,3,5}

Page 31: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Simple example

Seeder: A

Downloader B

{1,2,3,4,5,6,7,8,9,10}

Downloader C

{1,2,3,5}

{1,2,3,4,5}

Page 32: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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.

Page 33: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Operation

Page 34: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 35: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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.

Page 36: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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?”

Page 37: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 38: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 39: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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.

Page 40: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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.

Page 41: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

BT: internal mechanism

• Built-in incentive mechanism (where all the

magic happens):

– Choking Algorithm

– Optimistic Unchoking

Page 42: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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.

Page 43: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Page 44: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Page 45: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Page 46: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Page 47: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

Page 48: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

Page 49: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

Page 50: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

Page 51: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

Choked

Page 52: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

Choked

Page 53: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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, (known as fibrillation)..

Alice

Bob

ChokedChoked

Page 54: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file 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).

Page 55: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Optimistic unchoking

Page 56: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 57: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 58: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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:

Page 59: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 60: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 61: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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

Page 62: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Questions about BT

Page 63: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Questions about BT

• Which features contribute to the efficiency of BitTorrent?

Page 64: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Questions about BT

• Which features contribute to the efficiency of BitTorrent?

• What is the effect of bandwidth constraints?

Page 65: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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?

Page 66: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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?

Page 67: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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?

Page 68: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

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?

Page 69: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

Page 70: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

HELLO

HELLO

HELLO

HELLO

Page 71: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

Bitmap

Bitmap

Bitmap

Bitmap

Page 72: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

Request C1

Request C5

Page 73: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

Request C1

Request C5

Without upload constraint

Page 74: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

C1

C5

Without upload constraint

Page 75: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

One more example

peer A

peer B

peer C

peer D

peer E

C1

C5

Without upload constraint

With upload constraint

Page 76: The BitTorrent Protocol · Bob Tracker Harry Potter.torrent. BT: publishing a file Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent. BT: publishing a file Bob

Trackerless torrents

BitTorrent also supports "trackerless" torrents, featuring a DHT implementation that allows the client to download torrents that have been created without using a BitTorrent tracker.