P2P networks course

download report

Transcript P2P networks course

Administrative Details
 Grade – 90% test, 10% homework
 3-4 homework assignments
 Office hours after lesson
 E-mail – [email protected]
 Tel. 054-6501047
1
Course outline
 Introduction to P2P networks
 Overlay networks
 Node addition and deletion
 Resource addition and deletion
 Discovery in P2P networks
 Search in P2P networks, distributed hash tables
 File sharing P2P networks
 Quality of service in P2P networks
 Security of P2P networks
 Actual networks: BitTorrent, Gnutella, Skype
 Anonymity in P2P networks
2
What is P2P
 Client – server model
 Peer-to-Peer model
 Example – search for information on
favorite topic – compare the two models
Discovery
 Load balancing
 Data transfer

3
Why use P2P?
 Shared resources
 CPU time, Storage
 Bandwidth
 Files (music, video etc.)
 Knowledge of network
 Proximity of peers may enable more efficient




communication than hierarchical networks
Scalability
“Equality” – no central corporation that wants
something from us
Security – there are both pros and cons
Anonymity
4
Disadvantages of P2P
 Management
 Discovery
 Reliability
 Files may disappear
 Nodes may disappear
 Voice quality may be reduced
 Malicious content masquerades as benign
(Microsoft 2010: more than 30% of illegal (i.e.
free) Microsoft software has malware)
 No responsible central authority
5
Architecture 1: Central Node
 Central Node holds control information
 Node A wants resource R
 Location of central node is configured in every
participating node, e.g. during installation
 A contacts central node, asks for location of
resource R
 Central node answers with pair <B,R> where B is
a node address
 A and B negotiate directly for R
 Example: Napster music service
6
Central node: Pros and Cons
 Pros:
Good manageability
 Reliable resource search
 Economically attractive, all the visibility (e.g.
for advertising or as a brand name), with less
resources.

 Cons:
 Scalability may be a problem
 Networking bottleneck at central node
 Central authority may be blamed for illegal
activities of whole network (Napster case)
7
Architecture 2: Pure P2P
 All nodes are equal
 Node A wants a resource R
 Node A may “know” several nodes, i.e. have
neighbors in an overlay network
 Node A searches for resource in one of several
methods, e.g. limited flooding, distributed hash
tables etc.
 If A receives as response a pair <B, R>, A
contacts B for resource R
 Otherwise, A doesn’t get R
 Examples: Early Gnutella, Freenet
8
Pure P2P: Pros and Cons
 Pros
Scalability
 Robustness: no single point of failure

 Cons:
 Existing resources may not be found
 Inefficient distribution of resources, e.g.
resource duplication
 Security problems and cheating
9
Architecture 3: Hybrid Model
 Two types of nodes
 Regular nodes
 Super nodes
 Super nodes distribute the functions of a central
node
 Node A wants a resource R





Node A may “know” one or more super nodes
Node A contacts super node and asks for R
Super node searches for R among other super nodes
If super node receives as response a pair <B, R>, super
node returns R to A
Otherwise, A doesn’t get R
 Examples: BitTorrent, Skype,SMTP
10
Hybrid P2P: pros and cons
 A mix between central node and pure P2P
 Pros
 More robust and scalable than central node
 Economic advantages compared to client-server
mode.
 More reliable than pure P2P
 Super nodes can dictate more efficient use of
resources and discourage cheaters (hopefully)
 Cons: the usual manageability and reliability
problems of P2P
11
P2P Applications
 File sharing
 Voice over IP (VoIP)
 Content Delivery Networks
 Video on Demand
 Sharing stolen content
 Instant messaging
 Connection of servers in a client-server
network (e.g. SMTP)
 Cloud and grid computing
12
Why P2P? Some numbers…
 Next: an example comparing file
distribution in Client-Server vs. P2P
 Example and slides courtesy of “Computer
Networking: A Top Down Approach”,
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July 2007.
13
File Distribution: Server-Client vs P2P
Question : How much time to distribute file
from one server to N peers?
us: server upload
bandwidth
Server
us
File, size F
dN
uN
u1
d1
u2
ui: peer i upload
bandwidth
d2
di: peer i download
bandwidth
Network (with
abundant bandwidth)
14
File distribution time: server-client
 server sequentially
sends N copies:

NF/us time
 client i takes F/di
time to download
Server
F
us
dN
u1 d1 u2
d2
Network (with
abundant bandwidth)
uN
Time to distribute F
to N clients using = dcs = max { NF/us, F/min(di) }
i
client/server approach
increases linearly in N
(for large N)
15
File distribution time: P2P
 server must send one
Server
F
u1 d1 u2
d2
copy: F/us time
us
 client i takes F/di time
Network (with
dN
to download
abundant bandwidth)
uN
 NF bits must be
downloaded (aggregate)
 fastest possible upload rate: us + Sui
 (This is a little optimistic, since data has
to propagate through the network
peers)
dP2P = max { F/us, F/min(di) , NF/(us + Sui) }
i
16
Server-client vs. P2P: example
Client upload rate = u, F/u = 1 hour, us = 10u, dmin ≥ us
Minimum Distribution Time
3.5
P2P
Client-Server
3
2.5
2
1.5
1
0.5
0
0
5
10
15
20
25
30
35
N
17
File Distribution Time P2P
(cont.)
 Previous analysis is valid if m peers have
file and n peers download.
 If only server has file then initial
distribution to peers takes time.
 Alternative strategy:
Peer1 downloads from server
 Peeri downloads from Peeri-1 for i=2,…,n

 Simple case: assume that i, ui=di=α
 Analysis: time to download is N-1/α+F/α
18
P2P external threats
 Threat to conventional economic models
Divert traffic to cheaper alternatives (e.g.
Skype)
 Heavily use resources of service providers (e.g.
file sharing)

 Threat to conventional Intellectual
Property laws
 Threat to user security due to many trust
issues
 Threat to law enforcement capabilities
19
Threats to P2P users
 File sharing
 Wrong file
 Damaged file
 File contains malicious code
 Prosecution connected to Intellectual Property
 Deliberate downgrade of service
 Censorship
 Monitoring of activity (by law enforcement
and others)
 Untrustworthy nodes
20
Is P2P successful?
 Some file sharing services shut down:
Napster
 Kazaa

 Other content models threatening P2P file
sharing:

User provided:
• Central storage services: DropBox, RapidShare
• Central content services

Pay services
• iTunes
 BitTorrent and eMule still alive and kicking
21