bittornadoダウンローダ

Download Report

Transcript bittornadoダウンローダ

Networked Life: 20 Questions and Answers
(M. Chiang, Princeton University)
Q15 : How can Skype and BitTorrent
be free?
Prof. Hongseok Kim
© 2014 Networking for Information Communications and Energy Lab.
Challenges of tech networks
 Massive amount of content distribution
 P2P(peer-to-peer)
 Cloud
 Prevalent adoption of mobile wireless technologies
 The power of overlay
 Simple, stable, ubiquitous, economical connectivity
 How to scale up
2
P2P
 Kazza and Gnutella 1990s
 Free riders problem
 Copyright problem
 Skype 2001
 Over 700 million users
 Acquired by Microsoft for $8 billion in 2011
 BitTorrent 2001
 Half of Internet traffic in mid 2000s
3
Differences
 Skype: uses P2P for signaling
 Leverages peer capability to locate each other
 Establish connections
 BitTorrent: uses P2P for content sharing
 Share chunks of files to each other, without deploying many
media servers
4
Positive network effect
 Metcalfe’s Law
 Benefits grows like square
»
Benefit of joining a network grows as the square of the number of
nodes
 P2P law
 Even a constant of neighbors can work
»
Benefit of scalability can be achieved even when each node has only a
small number of neighbors at any given time, as long as these are
carefully chosen
5
6
7
Skype
Stores all the usernames and passwords
Super node
Ordinary node
8
Skype
 Phone calls are P2P
 Discovering peers can be a problem due to firewalls and
NATs
 Problem : both the caller and the callee can be behind firewalls,
with a NAT
»
Actual IP address is not known to the caller
 Super nodes: Must have a public IP address
 Act as relay nodes to bypass the firewall blocking of calls
 Some of your desktops may actually be super nodes
NAT : Network Address Translation
9
BitTorrent
A graph of peering relationships among peers
 Changes regularly depending on the list of peers provided by the tracker
10
BitTorrent

Multicast
 Many users all demand the same file

Divide a file into chunks
 Typically 256 kB

Tracker(Centralized directory)
 Tells a peer a set of 50 (or so) peers with chunks of the file it needs

Peers
 Picks 5 peers to exchange file chunks

Neighbors
 Set of 5 peering neighbors is refreshed at the beginning of every
time slot
11
Tree
Current peering relationships
Chunk
Possible peering relationships
in the next timeslot
Data stream
12
Overlay
⊂
V : Node set
E : Link set
Overlay network of 4 nodes
Underlay network of 5 nodes
13
14
15
BitTorrent Idea 1
 Smaller granularity
 More flexibility in resource allocation
 256kB chunks
 Spatial pipeline
 Multi-tree multicasting
 Each chunks go down a different multicast tree
 Compare with packet switching
 Divides a given message into smaller granularity (called packets)
16
BitTorrent Idea 2
 How do I share different chunks?
 Rarest chunk first
»
Rarest chunks get more quickly redistributed
−
Mitigates the problem where most of the peers have most of the
chunks, but all must wait for the few rare chunks
Rarest chunk
1, 2, 3
2, 3, 4
1, 2, 4
2, 3, 5
Peer 1
Peer 2
Peer 3
Peer 4
Want to collect chunks
1, 2, 3, 4, 5
17
BitTorrent Idea 3
 Peering construction
Overlay 1,
Peers
 A list of neighbors

Overlay 1,
Neighbor
Tit for tat to choose peers (4 peers)
Underlay Network
 Peer A gives priority to the neighbors that are currently supplying
data at the highest rate
 Re-evaluate top 4 every 10 secs
»
Help solve free rider problem
 Randomization (1 peer)
 Randomly select another peer every 30 secs
»
Help with unfairness to those with little upload capacity
18
Summary
 New peer A receives .torrent file from a web server
 Registers with tracker
 Receives a list of neighbors
 Selects 5 peers
 Exchange bitmaps to indicate chunks of content
 Select chunks and share
19
20
21
Back of envelope
 Client server
F: File size
N: Peers
us: server upload
bandwidth
Server
us
File, size F
dN
uN
u1
d1
u2
ui: peer i upload
bandwidth
d2
Network (with
abundant bandwidth)
T : Time it takes to distribute the file throughout the network
22
di: peer i download
bandwidth
Back of envelope
 P2P
F: File size
N: Peers
us: server upload
bandwidth
Server
us
File, size F
dN
uN
u1
u2
d1
ui: peer i upload
bandwidth
d2
Network (with
abundant bandwidth)
T : Time it takes to distribute the file throughout the network
23
di: peer i download
bandwidth
Multi-trees
server
peer
Upload capacities of C, D are wasted
24
A, B wasted
Example
Server
N peers
Case 1
Case 2
25
Case 1
Equivalent
T : Time it takes to distribute the file throughout the network
F: File size
each tree i carry a rate proportional to ui
N: Peers
us: server upload
bandwidth
ui: peer i upload
bandwidth
di: peer i download
bandwidth
26
Case 2
F: File size
N: Peers
us: server upload
bandwidth
ui: peer i upload
bandwidth
di: peer i download
bandwidth
27
Summary
 The power of overlay networks
 P2P law quantifies the positive network effect in applicationlayer multicast
 Ideas like tit for tat enables BitTorrent to scale up
28
29
30
Thank you!
Networking
Next
Information
Innovative
Communications
Creative
Energy
Envisioning