Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other...

20

Transcript of Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other...

Page 1: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.
Page 2: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

IntroductionIntroductionWidespread unstructured P2P networkWidespread unstructured P2P networkA Gnutella client has 4-10 TCP connections to other peersA Gnutella client has 4-10 TCP connections to other peersFor signalling traffic UDP isFor signalling traffic UDP is used and to make use of the used and to make use of the benefits of server based networks a ”ultra-peer” state wasbenefits of server based networks a ”ultra-peer” state was createdcreated””Ultra-peer” status is self assigned by powerful peers and Ultra-peer” status is self assigned by powerful peers and provides some extraprovides some extra functionality compared to ordinary functionality compared to ordinary nodesnodesThere exist many freely available GnutellaThere exist many freely available Gnutella clientsclientsSome of the most popular areSome of the most popular are::

LimewireLimewire BearshareBearshare MorpheusMorpheus ShareazaShareaza

ItIt has the most increasing number of users has the most increasing number of usersIt has a veryIt has a very pleasant GUI and connects also to eDonkey and pleasant GUI and connects also to eDonkey and BitTorrentBitTorrent

Page 3: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Main FeaturesMain Features

This protocol underlies much of the This protocol underlies much of the current file-sharing activity on the current file-sharing activity on the Internet.Internet.It is based on TCP/IP and It is based on TCP/IP and HTTPHTTPA file sharing network (fsn) is a bunch of A file sharing network (fsn) is a bunch of machines that exchange files using machines that exchange files using gnutella.gnutella.To connect to a gnutella network, you To connect to a gnutella network, you need the IP address of one single machine need the IP address of one single machine that is already part of the network.that is already part of the network.

Page 4: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

GnutellaGnutella

Peer-to-peer indexing and searching Peer-to-peer indexing and searching service.service.

Peer-to-peer point-to-point file Peer-to-peer point-to-point file downloading using HTTP.downloading using HTTP.

A gnutella node needs a server (or a set of A gnutella node needs a server (or a set of servers) to “start-up”… gnutellahosts.com servers) to “start-up”… gnutellahosts.com provides a service with reliable initial provides a service with reliable initial connection pointsconnection points

But introduces a new single point of failure!But introduces a new single point of failure!

Page 5: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Gnutella vs. NapsterGnutella vs. Napster

Like Napster, distributed file storage and Like Napster, distributed file storage and transmissiontransmission

Added the ability to distribute file discoveryAdded the ability to distribute file discovery Ask your direct peers who else they knowAsk your direct peers who else they know Query those machines directlyQuery those machines directly

Page 6: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

CharacteristicsCharacteristics

Gnutella is a distributed system for file Gnutella is a distributed system for file sharingsharing

provide means provide means for network discoveryfor network discovery

provide means provide means for file searching and sharingfor file searching and sharing

Defines a network at the application levelDefines a network at the application level Employs the concept of peer-to-peerEmploys the concept of peer-to-peer

all hosts are equal (symmetry)all hosts are equal (symmetry)

there is no central pointthere is no central point

anonymous search, but reveal the IP anonymous search, but reveal the IP addresses when downloadingaddresses when downloading

Page 7: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Advantages and Advantages and DisadvantagesDisadvantages

Advantages:Advantages: Inherent scalabilityInherent scalability Avoidance of “single point of litigation” Avoidance of “single point of litigation”

problemproblem Fault ToleranceFault Tolerance

Disadvantages:Disadvantages: Slow information discoverySlow information discovery More query traffic on the networkMore query traffic on the network

Resource DiscoveryResource Discovery

Page 8: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

GnutellaGnutella in Details in Details

Share any type of files Share any type of files (not just music)(not just music)Decentralized search Decentralized search unlike Napsterunlike Napster

You ask your You ask your neighbors for files of neighbors for files of interestinterestNeighbors ask their Neighbors ask their neighbors, and so onneighbors, and so on

TTL field quenches TTL field quenches messages after a messages after a number of hopsnumber of hops

Users with matching Users with matching files reply to youfiles reply to you

Figure from http://computer.howstuffworks.com/file-sharing.htm

Page 9: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Joining Joining Gnutella Gnutella NetworkNetwork

A

Gnutella NetworkThe new node connects to a The new node connects to a well known ‘Anchor’ node.well known ‘Anchor’ node.

Then sends a PING message Then sends a PING message to discover other nodes.to discover other nodes.

PONG messages are sent in PONG messages are sent in reply from hosts offering reply from hosts offering new connections with the new connections with the new node.new node.

Direct connections are then Direct connections are then made to the newly made to the newly discovered nodes.discovered nodes.

NewPING

PINGPING

PINGPING

PINGPING

PINGPING

PING

PONG

PONG

Page 10: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Query floodingQuery flooding

Gnutella Gnutella

no hierarchyno hierarchy

use bootstrap node to use bootstrap node to learn about otherslearn about others

join messagejoin message

Send query to neighborsSend query to neighbors

Neighbors forward query to Neighbors forward query to all attached neighbors all attached neighbors ((floodsfloods))

If queried peer has object, it If queried peer has object, it sends message back to sends message back to querying peerquerying peer

join

query

Page 11: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

About the Flooding - DoSAbout the Flooding - DoS

There is nothing that stops a servant flooding its network region with messages.There is nothing that stops a servant flooding its network region with messages.

Cost of Cost of maintaining Networkmaintaining NetworkCost of Cost of searching filesearching file

Page 12: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

The Cooperation SpectrumThe Cooperation Spectrum

Page 13: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Free RidingFree Riding

File sharing networks rely on users sharing dataTwo types of free riding

Downloading but not sharing any data Not sharing any interesting data

On Gnutella 15% of users contribute 94% of content 63% of users never responded to a query Didn’t have “interesting” data

Data from E. Adar and B.A. Huberman (2000), “Free Riding on Gnutella”

Page 14: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Number of Shared FilesNumber of Shared Files

Page 15: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

SummarySummarypeer-to-peer networking: applications connect to peer applications peer-to-peer networking: applications connect to peer applications focus: decentralized method of searching for filesfocus: decentralized method of searching for fileseach application instance serves to:each application instance serves to:

store selected filesstore selected files route queries (file searches) from and to its neighboring peersroute queries (file searches) from and to its neighboring peers respond to queries (serve file) if file stored locallyrespond to queries (serve file) if file stored locally

Gnutella history:Gnutella history: 3/14/00: release by AOL, almost immediately withdrawn3/14/00: release by AOL, almost immediately withdrawn too late: 23K users on Gnutella at 8 am this AMtoo late: 23K users on Gnutella at 8 am this AM many iterations to fix poor initial design (poor design turned many iterations to fix poor initial design (poor design turned

many people off)many people off)What we care about:What we care about:

How much traffic does one query generate?How much traffic does one query generate? how many hosts can it support at once?how many hosts can it support at once? What is the latency associated with querying?What is the latency associated with querying? Is there a bottleneck?Is there a bottleneck?

Page 16: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Screenshots – GnutellaLogging ….

Page 17: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

Screenshots – GnutellaSearching & Downloading ….

Page 18: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

IImage of the mage of the Gnutella networkGnutella network

IImage of the mage of the Gnutella networkGnutella network

Page 19: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

IImage of the mage of the Gnutella networkGnutella networkIImage of the mage of the Gnutella networkGnutella network

Page 20: Introduction Widespread unstructured P2P network A Gnutella client has 4-10 TCP connections to other peers For signalling traffic UDP is used and to make.

IImage of the mage of the Gnutella networkGnutella networkIImage of the mage of the Gnutella networkGnutella network