SlideShare a Scribd company logo
1 of 43
Seminar by:
Anand Babu
int82657@stud.uni-stuttgart.de
Institute for Parallel and Distributed
Systems (IPVS)
University of Stuttgart
05/01/13Peer to Peer Content Delivery Networks1
Peer-to-Peer
Content Delivery
Network
Outline
05/01/13Peer to Peer Content Delivery Networks2
Motivation
Traditional Approaches
P2P Architecture
Types of P2P
Centralized
Decentralized
 Unstructured
 Structured
Summary
References
Motivation
Millions of users want to download the same popular huge
files (for free)
E.g:
Film, Video and music
Media content from Broadcasters
Personal Content
Software
Institutions
05/01/13Peer to Peer Content Delivery Networks3
Router
“Interested”
End-host
Source
Client-Server
05/01/13Peer to Peer Content Delivery Networks4
Router
“Interested”
End-host
Source
Client-Server
Overloaded!
05/01/13Peer to Peer Content Delivery Networks5
Router
“Interested”
End-host
Source
IP multicast
05/01/13Peer to Peer Content Delivery Networks6
Router
“Interested”
End-host
Source
End-host based multicast
05/01/13Peer to Peer Content Delivery Networks7
End-host based multicast
“Single-uploader”  “Multiple-uploaders”
Node that has downloaded file will then upload it to other
nodes.
Uploading costs amortized across all nodes
Also called “Application-level Multicast”
Many protocols proposed early this decade
Yoid (2000), Narada (2000), Overcast (2000), ALMI (2001)
All use single trees
Problem with single trees?
05/01/13Peer to Peer Content Delivery Networks8
End-host multicast using single
tree
Source
05/01/13Peer to Peer Content Delivery Networks9
End-host multicast using single
tree
Source
05/01/13Peer to Peer Content Delivery Networks10
End-host multicast using single
tree
Source
Slow data transfer
05/01/13Peer to Peer Content Delivery Networks11
Why is P2P CDN important?
P2P consumes significant amount of internet traffic today
In 2004, Total P2P traffic was 60% (Source: Cachelogic)
Slightly lower share in 2005 (possibly because of legal action),
but still significant
BT is the most popular P2P Protocol(30% in 2004)
Well-Known BT users:
05/01/13Peer to Peer Content Delivery Networks12
Peer-to-Peer System
05/01/13Peer to Peer Content Delivery Networks13
All nodes are both clients
and servers
No centralized data
source
Scalable
Resistant to Flash crowds
Cost Effective
Types of Peer-to-Peer Systems
Centralized
Napster
Decentralized
 Gnutella
 Fast-track
Structured
 Freenet
 Chord
 Pastry
05/01/13Peer to Peer Content Delivery Networks14
Napster
05/01/13Peer to Peer Content Delivery Networks15
Only mp3
Peer updates file list and the Napster database
is updated periodically.
User sends search request to the server
Server replies with the information of nodes
containing the file
User connects directly to remote peer and
start download
Napster -- continued
05/01/13Peer to Peer Content Delivery Networks16
Search is centralized and dynamic.
File transfer is direct (Peer to Peer)
Pros and Cons:
Fast and Efficient and up-to-date(no stale links)
Single point of failure
Gnutella
05/01/13Peer to Peer Content Delivery Networks17
Share any type of files
Decentralized search
Request send to
neighbors(Flooding)
Neighbor forwards it to its
neighbors.
If TTL is over request is
finished.
Users with matching file replies
Gnutella -- continued
05/01/13Peer to Peer Content Delivery Networks18
Decentralized system
No Single point of failure
Less Prone to denial of service
Flooding queries
Increase network congestion
Search only reaches to a subset of peers due to
TTL.
Compromise in Privacy as peers are able to see
search queries.
Fast-track
Hybrid of centralized Napsters and
decentralized Gnutella.
Super Nodes acts as local search server
 Each super node act as a Napster server for a
small network
 Super nodes are chosen according to their
capacity and availability
User upload the list of shared files to
a super-peer
Super nodes exchange the list
periodically
Peer send the query to super node
05/01/13Peer to Peer Content Delivery Networks19
BitTorrent
“Pull-based”
Each file split into smaller pieces
Nodes pull desired pieces
Pieces not downloaded in sequential order
Previous multicast schemes aimed to support “streaming”; Bit
Torrent does not
“swarming” approach
Encourages contribution by all nodes
05/01/13Peer to Peer Content Delivery Networks20
Basic Components
Seed
Peer that has the entire file
Leacher
Peer that has an incomplete copy of the file
A Torrent file
Passive component
Contains meta-data about the file to be downloaded and the peers
Typically hosted on a web server
A Tracker
Central component
Returns a random list of peers with state information(Completed or
Downloading)
05/01/13Peer to Peer Content Delivery Networks21
Data types
All the data used in Bit-torrent communication is Bencoded.
Integer: 2011  Bencoded: i2011e
String: “Something” Bencoded: 9: Something
List: List[0]=1337 List[1]=“DEF” List[2]=“CON” Bencoded:
li1337e:3DEF:3CONe
Dictionary:Dictionary[“uname”]=“hpcbabu”
Dictionary[“password”]=“default” Benocded form
d5:uname7:hpcbabu8:password7:defaulte
05/01/13Peer to Peer Content Delivery Networks22
Contents of .torrent file
Piece length – Usually 256 KB
Pieces: SHA-1 hashes of all pieces
SHA-1 hashes of each piece in file
For reliability
Announce Lists: List of all URL of trackers
The piece length and pieces information are fixed while
announce lists are dynamic.
05/01/13Peer to Peer Content Delivery Networks23
The big pictureThe big picture
Web Server
Bob
Tracker
Downloader:
A
Seeder:
B
Downloader:
C
Harry Potter.torrent
05/01/13Peer to Peer Content Delivery Networks24
Request and Response
Scrape Request
e.g: http://example.com/scrape.php?
info_hash=aaaaaaaaaaaaaaaaaaaa&info_hash=bbbbbbbbbbbbb
bbbbbbb&info_hash=cccccccccccccccccccc
Scrape Response
e.g:
d5:filesd20:....................d8:completei5e10:downloadedi50e1
0:incompletei10eeee
5 seeders, 10 leechers, and 50 complete downloads
05/01/13Peer to Peer Content Delivery Networks25
Request and Response
Announce Request:
e.g: http://some.tracker.com:999/announce ?
info_hash=12345678901234567890
&peer_id=ABCDEFGHIJKLMNOPQRST
&ip=255.255.255.255&port=6881
&downloaded=0&uploaded=0 &left=98765 &event=started
Announce Response:
The tracker response is a BEncoded dictionary that has two
keys: interval and peers.
05/01/13Peer to Peer Content Delivery Networks26
Peer wire Protocol(TCP)
exchange of pieces
The file into several pieces and sub-pieces and are
downloaded from different peers.
Each client will need to maintain the state information for
each peers. This list looks like
am_choking: this client is choking the peer
am_interested: this client is interested in the peer
peer_choking: peer is choking this client
peer_interested: peer is interested in this client
05/01/13Peer to Peer Content Delivery Networks27
Steps in PWP:
Handshaking
Message Communication
 Pipelining
 Piece selection strategy
Peer selection strategy
Choking and optimistic unchoking
Anti-snubbing
Upload-Only Mode
End Game Mode
05/01/13Peer to Peer Content Delivery Networks28
Messaging
Initial handshake message:
<pstrlen><pstr><reserved><info_hash><peer_id>
An UDP ping request/response.
All other messages are sent over TCP and are of the form:
 <length prefix><message ID><payload>
Request:
<len=013><id=6><index><begin><length>
e.g.: have: <len=0005><id=4><piece index>
choke: <len=0001><id=0>
bitfield: <len=0001+X><id=5><bitfield>
05/01/13Peer to Peer Content Delivery Networks29
Pipelining
Keep unfulfilled requests on each connection
To cut down the round-trip
This scheme has been found to saturate most connections in
practice
Extremely efficient over slow lines.
Default - 5
05/01/13Peer to Peer Content Delivery Networks30
Piece Selection
critical for performance
If a bad algorithm is used  all the effort would go waste.
Until a piece is assembled, only download sub-pieces for that
piece
This policy lets complete pieces assemble quickly
05/01/13Peer to Peer Content Delivery Networks31
Rarest Piece First
Policy: Determine the pieces that are most rare among your
peers and download those first
This ensures that the most common pieces are left till the
end to download
Rarest first also ensures that a large variety of pieces are
downloaded from the seed
05/01/13Peer to Peer Content Delivery Networks32
Random First Piece
Initially, a peer has nothing to trade
Important to get a complete piece ASAP
Rare pieces are typically available at fewer peers, so
downloading a rare piece initially is not a good idea
Policy: Select a random piece of the file and download it
05/01/13Peer to Peer Content Delivery Networks33
Endgame Mode
Policy: Last blocks trickle slowly in general. To speed
this up , send a request for all the missing blocks to
every peer.
Send a cancel message to all peers whenever a block
arrives.
This ensures that a download doesn’t get 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.
05/01/13Peer to Peer Content Delivery Networks34
Choking
Choking is a temporary refusal to upload; downloading is
normal
Tit-for-tat strategy
Peer A said to choke peer B if it (A) decides not to upload to
B
Each peer (say A) unchokes a certain number peers at any
time(default – 4)
The three with the largest upload rates to A
Where the tit-for-tat comes in
Another randomly chosen (Optimistic Unchoke)
To periodically look for better choices
05/01/13Peer to Peer Content Delivery Networks35
Anti-snubbing
A peer is said to be snubbed if each of its peers chokes it
Poor download rates until the optimistic unchoke finds
better peers.
If No data download for over a minute, assume its snubbed.
Don’t upload to that peer unless as an optimistic unchoke.
More than one concurrent optimistic unchoke – fast
recovery.
05/01/13Peer to Peer Content Delivery Networks36
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
05/01/13Peer to Peer Content Delivery Networks37
Pros and cons of BitTorrent
Pros
Proficient in utilizing partially downloaded files
Discourages “freeloading”
By rewarding fastest uploaders
No infrastructure costs
Better resource utilization
Works well for “hot content”
05/01/13Peer to Peer Content Delivery Networks38
Pros and cons of BitTorrent
Cons
Long tail doesn’t work
Even worse: no trackers for obscure content
Single point of failure: New nodes can’t enter swarm if tracker
goes down
Lack of a search feature
 Users need to resort to out-of-band search: well known torrent-
hosting sites / plain old web-search
05/01/13Peer to Peer Content Delivery Networks39
Analysis
Random neighbor selection  high cross-traffic
ISP Perspective: Different links have different costs
P2P Applications Perspective: No knowledge of underlying
ISP topology
No longer optimal if nodes should connect only to same ISP
nodes.
End result: Throttling
05/01/13Peer to Peer Content Delivery Networks40
Challenges/Open questions
Network-Friendly Bit torrent: ISPs informs Bit-torrent of its
link preferences.
Biased Neighbor selection
Rarest Piece First suffers
Move from TCP-UDP: take control of the internet ?
Legal Complexity
05/01/13Peer to Peer Content Delivery Networks41
Summary
P2P CDNs can be
cost-effective
Provide better resource utilization
Challenges:
Network Congestion
Network cost–Friendly Protocols
Handling copyright issues
05/01/13Peer to Peer Content Delivery Networks42
Thank You
05/01/13Peer to Peer Content Delivery Networks43

More Related Content

What's hot

Bit Torrent Technology
Bit Torrent TechnologyBit Torrent Technology
Bit Torrent Technologyguestc67adeb
 
BitTorrent Protocol
BitTorrent ProtocolBitTorrent Protocol
BitTorrent ProtocolSridharBR
 
Bit torrent protocol
Bit torrent protocolBit torrent protocol
Bit torrent protocolKarwan Jacksi
 
BitTorrent - sharing files has never been easier
BitTorrent - sharing files has never been easierBitTorrent - sharing files has never been easier
BitTorrent - sharing files has never been easierMohd253
 
Torrent Seminar inc.- working, terms, details
Torrent Seminar inc.- working, terms, detailsTorrent Seminar inc.- working, terms, details
Torrent Seminar inc.- working, terms, detailsMayur Kathale
 
Bit Torrent technology
Bit Torrent technology Bit Torrent technology
Bit Torrent technology Parth Akbari
 
Bit torrent Technology ppt
Bit torrent Technology pptBit torrent Technology ppt
Bit torrent Technology pptAkshay K Sajan
 
Bittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshiBittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshidhananjaypardeshi13
 
Copy Of Part 4
Copy Of Part 4Copy Of Part 4
Copy Of Part 4raeshu
 
Bit torrent protocol
Bit torrent protocolBit torrent protocol
Bit torrent protocolD bipul lomga
 
Bit Torrent presentation
Bit Torrent presentationBit Torrent presentation
Bit Torrent presentationAvula Jagadeesh
 
A SPDYier Experience by Olaniyi Jinadu
A SPDYier Experience by Olaniyi JinaduA SPDYier Experience by Olaniyi Jinadu
A SPDYier Experience by Olaniyi JinaduOlaniyi Jinadu
 
Bittorrent final seminar
Bittorrent final seminarBittorrent final seminar
Bittorrent final seminarChirodeep Das
 

What's hot (20)

Bit Torrent Technology
Bit Torrent TechnologyBit Torrent Technology
Bit Torrent Technology
 
Bit Torrent
Bit Torrent Bit Torrent
Bit Torrent
 
Bit torrent and tracker
Bit torrent and trackerBit torrent and tracker
Bit torrent and tracker
 
BitTorrent Protocol
BitTorrent ProtocolBitTorrent Protocol
BitTorrent Protocol
 
Bittorrent
BittorrentBittorrent
Bittorrent
 
Bit torrent protocol
Bit torrent protocolBit torrent protocol
Bit torrent protocol
 
BitTorrent - sharing files has never been easier
BitTorrent - sharing files has never been easierBitTorrent - sharing files has never been easier
BitTorrent - sharing files has never been easier
 
Torrent Seminar inc.- working, terms, details
Torrent Seminar inc.- working, terms, detailsTorrent Seminar inc.- working, terms, details
Torrent Seminar inc.- working, terms, details
 
Torrent technology
Torrent technologyTorrent technology
Torrent technology
 
Bittorrent Basics
Bittorrent BasicsBittorrent Basics
Bittorrent Basics
 
Bit Torrent technology
Bit Torrent technology Bit Torrent technology
Bit Torrent technology
 
Bit torrent Technology ppt
Bit torrent Technology pptBit torrent Technology ppt
Bit torrent Technology ppt
 
Torrents
TorrentsTorrents
Torrents
 
Bittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshiBittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshi
 
Copy Of Part 4
Copy Of Part 4Copy Of Part 4
Copy Of Part 4
 
Bit torrent protocol
Bit torrent protocolBit torrent protocol
Bit torrent protocol
 
Bit Torrent presentation
Bit Torrent presentationBit Torrent presentation
Bit Torrent presentation
 
A SPDYier Experience by Olaniyi Jinadu
A SPDYier Experience by Olaniyi JinaduA SPDYier Experience by Olaniyi Jinadu
A SPDYier Experience by Olaniyi Jinadu
 
Unit v
Unit v Unit v
Unit v
 
Bittorrent final seminar
Bittorrent final seminarBittorrent final seminar
Bittorrent final seminar
 

Similar to P2p cdn

UNRAVEILING BIT-TORRENT
UNRAVEILING BIT-TORRENTUNRAVEILING BIT-TORRENT
UNRAVEILING BIT-TORRENTSudhansu Dash
 
P2P Seminar
P2P SeminarP2P Seminar
P2P SeminarCoRehab
 
Adaptive Sliding Piece Selection Window for BitTorrent Systems
Adaptive Sliding Piece Selection Window for BitTorrent SystemsAdaptive Sliding Piece Selection Window for BitTorrent Systems
Adaptive Sliding Piece Selection Window for BitTorrent SystemsWaqas Tariq
 
Insights on On-demand Media Streaming Progress
Insights on On-demand Media Streaming ProgressInsights on On-demand Media Streaming Progress
Insights on On-demand Media Streaming ProgressSovan Kundu
 
Bit torrent protocol seminar by Sanjay R
Bit torrent protocol seminar by Sanjay RBit torrent protocol seminar by Sanjay R
Bit torrent protocol seminar by Sanjay RSanjay Ravishankar
 
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMSEFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMSijp2p
 
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMSEFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMSijp2p
 
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS ijp2p
 
Peer To Peer.pptx
Peer To Peer.pptxPeer To Peer.pptx
Peer To Peer.pptxHananShk
 
Peerto Peer Networks
Peerto Peer NetworksPeerto Peer Networks
Peerto Peer Networkssanjoysanyal
 
Bittorrent_project_Srikanth_Vanama
Bittorrent_project_Srikanth_VanamaBittorrent_project_Srikanth_Vanama
Bittorrent_project_Srikanth_VanamaSrikanth Vanama
 
Peer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingPeer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingDilum Bandara
 
Give to-get algorithm-for_p2_p_video_on_demand
Give to-get algorithm-for_p2_p_video_on_demandGive to-get algorithm-for_p2_p_video_on_demand
Give to-get algorithm-for_p2_p_video_on_demandjayanthi_2009
 
A Brief Note On Peer And Peer ( P2P ) Applications Have No...
A Brief Note On Peer And Peer ( P2P ) Applications Have No...A Brief Note On Peer And Peer ( P2P ) Applications Have No...
A Brief Note On Peer And Peer ( P2P ) Applications Have No...Brenda Thomas
 

Similar to P2p cdn (20)

Bittorrent in a P2P social network
Bittorrent in a P2P social networkBittorrent in a P2P social network
Bittorrent in a P2P social network
 
UNRAVEILING BIT-TORRENT
UNRAVEILING BIT-TORRENTUNRAVEILING BIT-TORRENT
UNRAVEILING BIT-TORRENT
 
P2P Seminar
P2P SeminarP2P Seminar
P2P Seminar
 
Adaptive Sliding Piece Selection Window for BitTorrent Systems
Adaptive Sliding Piece Selection Window for BitTorrent SystemsAdaptive Sliding Piece Selection Window for BitTorrent Systems
Adaptive Sliding Piece Selection Window for BitTorrent Systems
 
Insights on On-demand Media Streaming Progress
Insights on On-demand Media Streaming ProgressInsights on On-demand Media Streaming Progress
Insights on On-demand Media Streaming Progress
 
BitTorrent.pdf
BitTorrent.pdfBitTorrent.pdf
BitTorrent.pdf
 
Bit torrent a revolution in p2p
Bit torrent a revolution in p2pBit torrent a revolution in p2p
Bit torrent a revolution in p2p
 
Bit torrent protocol seminar by Sanjay R
Bit torrent protocol seminar by Sanjay RBit torrent protocol seminar by Sanjay R
Bit torrent protocol seminar by Sanjay R
 
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMSEFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
 
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMSEFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
 
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
EFFECTIVE TOPOLOGY-AWARE PEER SELECTION IN UNSTRUCTURED PEER-TO-PEER SYSTEMS
 
Journal Club- MPSS
Journal Club- MPSSJournal Club- MPSS
Journal Club- MPSS
 
Peer To Peer.pptx
Peer To Peer.pptxPeer To Peer.pptx
Peer To Peer.pptx
 
Peerto Peer Networks
Peerto Peer NetworksPeerto Peer Networks
Peerto Peer Networks
 
P2p Peer To Peer Introduction
P2p Peer To Peer IntroductionP2p Peer To Peer Introduction
P2p Peer To Peer Introduction
 
Bittorrent_project_Srikanth_Vanama
Bittorrent_project_Srikanth_VanamaBittorrent_project_Srikanth_Vanama
Bittorrent_project_Srikanth_Vanama
 
Peer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingPeer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and Streaming
 
Give to-get algorithm-for_p2_p_video_on_demand
Give to-get algorithm-for_p2_p_video_on_demandGive to-get algorithm-for_p2_p_video_on_demand
Give to-get algorithm-for_p2_p_video_on_demand
 
A Brief Note On Peer And Peer ( P2P ) Applications Have No...
A Brief Note On Peer And Peer ( P2P ) Applications Have No...A Brief Note On Peer And Peer ( P2P ) Applications Have No...
A Brief Note On Peer And Peer ( P2P ) Applications Have No...
 
Torrent
TorrentTorrent
Torrent
 

Recently uploaded

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 

Recently uploaded (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 

P2p cdn

  • 1. Seminar by: Anand Babu int82657@stud.uni-stuttgart.de Institute for Parallel and Distributed Systems (IPVS) University of Stuttgart 05/01/13Peer to Peer Content Delivery Networks1 Peer-to-Peer Content Delivery Network
  • 2. Outline 05/01/13Peer to Peer Content Delivery Networks2 Motivation Traditional Approaches P2P Architecture Types of P2P Centralized Decentralized  Unstructured  Structured Summary References
  • 3. Motivation Millions of users want to download the same popular huge files (for free) E.g: Film, Video and music Media content from Broadcasters Personal Content Software Institutions 05/01/13Peer to Peer Content Delivery Networks3
  • 8. End-host based multicast “Single-uploader”  “Multiple-uploaders” Node that has downloaded file will then upload it to other nodes. Uploading costs amortized across all nodes Also called “Application-level Multicast” Many protocols proposed early this decade Yoid (2000), Narada (2000), Overcast (2000), ALMI (2001) All use single trees Problem with single trees? 05/01/13Peer to Peer Content Delivery Networks8
  • 9. End-host multicast using single tree Source 05/01/13Peer to Peer Content Delivery Networks9
  • 10. End-host multicast using single tree Source 05/01/13Peer to Peer Content Delivery Networks10
  • 11. End-host multicast using single tree Source Slow data transfer 05/01/13Peer to Peer Content Delivery Networks11
  • 12. Why is P2P CDN important? P2P consumes significant amount of internet traffic today In 2004, Total P2P traffic was 60% (Source: Cachelogic) Slightly lower share in 2005 (possibly because of legal action), but still significant BT is the most popular P2P Protocol(30% in 2004) Well-Known BT users: 05/01/13Peer to Peer Content Delivery Networks12
  • 13. Peer-to-Peer System 05/01/13Peer to Peer Content Delivery Networks13 All nodes are both clients and servers No centralized data source Scalable Resistant to Flash crowds Cost Effective
  • 14. Types of Peer-to-Peer Systems Centralized Napster Decentralized  Gnutella  Fast-track Structured  Freenet  Chord  Pastry 05/01/13Peer to Peer Content Delivery Networks14
  • 15. Napster 05/01/13Peer to Peer Content Delivery Networks15 Only mp3 Peer updates file list and the Napster database is updated periodically. User sends search request to the server Server replies with the information of nodes containing the file User connects directly to remote peer and start download
  • 16. Napster -- continued 05/01/13Peer to Peer Content Delivery Networks16 Search is centralized and dynamic. File transfer is direct (Peer to Peer) Pros and Cons: Fast and Efficient and up-to-date(no stale links) Single point of failure
  • 17. Gnutella 05/01/13Peer to Peer Content Delivery Networks17 Share any type of files Decentralized search Request send to neighbors(Flooding) Neighbor forwards it to its neighbors. If TTL is over request is finished. Users with matching file replies
  • 18. Gnutella -- continued 05/01/13Peer to Peer Content Delivery Networks18 Decentralized system No Single point of failure Less Prone to denial of service Flooding queries Increase network congestion Search only reaches to a subset of peers due to TTL. Compromise in Privacy as peers are able to see search queries.
  • 19. Fast-track Hybrid of centralized Napsters and decentralized Gnutella. Super Nodes acts as local search server  Each super node act as a Napster server for a small network  Super nodes are chosen according to their capacity and availability User upload the list of shared files to a super-peer Super nodes exchange the list periodically Peer send the query to super node 05/01/13Peer to Peer Content Delivery Networks19
  • 20. BitTorrent “Pull-based” Each file split into smaller pieces Nodes pull desired pieces Pieces not downloaded in sequential order Previous multicast schemes aimed to support “streaming”; Bit Torrent does not “swarming” approach Encourages contribution by all nodes 05/01/13Peer to Peer Content Delivery Networks20
  • 21. Basic Components Seed Peer that has the entire file Leacher Peer that has an incomplete copy of the file A Torrent file Passive component Contains meta-data about the file to be downloaded and the peers Typically hosted on a web server A Tracker Central component Returns a random list of peers with state information(Completed or Downloading) 05/01/13Peer to Peer Content Delivery Networks21
  • 22. Data types All the data used in Bit-torrent communication is Bencoded. Integer: 2011  Bencoded: i2011e String: “Something” Bencoded: 9: Something List: List[0]=1337 List[1]=“DEF” List[2]=“CON” Bencoded: li1337e:3DEF:3CONe Dictionary:Dictionary[“uname”]=“hpcbabu” Dictionary[“password”]=“default” Benocded form d5:uname7:hpcbabu8:password7:defaulte 05/01/13Peer to Peer Content Delivery Networks22
  • 23. Contents of .torrent file Piece length – Usually 256 KB Pieces: SHA-1 hashes of all pieces SHA-1 hashes of each piece in file For reliability Announce Lists: List of all URL of trackers The piece length and pieces information are fixed while announce lists are dynamic. 05/01/13Peer to Peer Content Delivery Networks23
  • 24. The big pictureThe big picture Web Server Bob Tracker Downloader: A Seeder: B Downloader: C Harry Potter.torrent 05/01/13Peer to Peer Content Delivery Networks24
  • 25. Request and Response Scrape Request e.g: http://example.com/scrape.php? info_hash=aaaaaaaaaaaaaaaaaaaa&info_hash=bbbbbbbbbbbbb bbbbbbb&info_hash=cccccccccccccccccccc Scrape Response e.g: d5:filesd20:....................d8:completei5e10:downloadedi50e1 0:incompletei10eeee 5 seeders, 10 leechers, and 50 complete downloads 05/01/13Peer to Peer Content Delivery Networks25
  • 26. Request and Response Announce Request: e.g: http://some.tracker.com:999/announce ? info_hash=12345678901234567890 &peer_id=ABCDEFGHIJKLMNOPQRST &ip=255.255.255.255&port=6881 &downloaded=0&uploaded=0 &left=98765 &event=started Announce Response: The tracker response is a BEncoded dictionary that has two keys: interval and peers. 05/01/13Peer to Peer Content Delivery Networks26
  • 27. Peer wire Protocol(TCP) exchange of pieces The file into several pieces and sub-pieces and are downloaded from different peers. Each client will need to maintain the state information for each peers. This list looks like am_choking: this client is choking the peer am_interested: this client is interested in the peer peer_choking: peer is choking this client peer_interested: peer is interested in this client 05/01/13Peer to Peer Content Delivery Networks27
  • 28. Steps in PWP: Handshaking Message Communication  Pipelining  Piece selection strategy Peer selection strategy Choking and optimistic unchoking Anti-snubbing Upload-Only Mode End Game Mode 05/01/13Peer to Peer Content Delivery Networks28
  • 29. Messaging Initial handshake message: <pstrlen><pstr><reserved><info_hash><peer_id> An UDP ping request/response. All other messages are sent over TCP and are of the form:  <length prefix><message ID><payload> Request: <len=013><id=6><index><begin><length> e.g.: have: <len=0005><id=4><piece index> choke: <len=0001><id=0> bitfield: <len=0001+X><id=5><bitfield> 05/01/13Peer to Peer Content Delivery Networks29
  • 30. Pipelining Keep unfulfilled requests on each connection To cut down the round-trip This scheme has been found to saturate most connections in practice Extremely efficient over slow lines. Default - 5 05/01/13Peer to Peer Content Delivery Networks30
  • 31. Piece Selection critical for performance If a bad algorithm is used  all the effort would go waste. Until a piece is assembled, only download sub-pieces for that piece This policy lets complete pieces assemble quickly 05/01/13Peer to Peer Content Delivery Networks31
  • 32. Rarest Piece First Policy: Determine the pieces that are most rare among your peers and download those first This ensures that the most common pieces are left till the end to download Rarest first also ensures that a large variety of pieces are downloaded from the seed 05/01/13Peer to Peer Content Delivery Networks32
  • 33. Random First Piece Initially, a peer has nothing to trade Important to get a complete piece ASAP Rare pieces are typically available at fewer peers, so downloading a rare piece initially is not a good idea Policy: Select a random piece of the file and download it 05/01/13Peer to Peer Content Delivery Networks33
  • 34. Endgame Mode Policy: Last blocks trickle slowly in general. To speed this up , send a request for all the missing blocks to every peer. Send a cancel message to all peers whenever a block arrives. This ensures that a download doesn’t get 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. 05/01/13Peer to Peer Content Delivery Networks34
  • 35. Choking Choking is a temporary refusal to upload; downloading is normal Tit-for-tat strategy Peer A said to choke peer B if it (A) decides not to upload to B Each peer (say A) unchokes a certain number peers at any time(default – 4) The three with the largest upload rates to A Where the tit-for-tat comes in Another randomly chosen (Optimistic Unchoke) To periodically look for better choices 05/01/13Peer to Peer Content Delivery Networks35
  • 36. Anti-snubbing A peer is said to be snubbed if each of its peers chokes it Poor download rates until the optimistic unchoke finds better peers. If No data download for over a minute, assume its snubbed. Don’t upload to that peer unless as an optimistic unchoke. More than one concurrent optimistic unchoke – fast recovery. 05/01/13Peer to Peer Content Delivery Networks36
  • 37. 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 05/01/13Peer to Peer Content Delivery Networks37
  • 38. Pros and cons of BitTorrent Pros Proficient in utilizing partially downloaded files Discourages “freeloading” By rewarding fastest uploaders No infrastructure costs Better resource utilization Works well for “hot content” 05/01/13Peer to Peer Content Delivery Networks38
  • 39. Pros and cons of BitTorrent Cons Long tail doesn’t work Even worse: no trackers for obscure content Single point of failure: New nodes can’t enter swarm if tracker goes down Lack of a search feature  Users need to resort to out-of-band search: well known torrent- hosting sites / plain old web-search 05/01/13Peer to Peer Content Delivery Networks39
  • 40. Analysis Random neighbor selection  high cross-traffic ISP Perspective: Different links have different costs P2P Applications Perspective: No knowledge of underlying ISP topology No longer optimal if nodes should connect only to same ISP nodes. End result: Throttling 05/01/13Peer to Peer Content Delivery Networks40
  • 41. Challenges/Open questions Network-Friendly Bit torrent: ISPs informs Bit-torrent of its link preferences. Biased Neighbor selection Rarest Piece First suffers Move from TCP-UDP: take control of the internet ? Legal Complexity 05/01/13Peer to Peer Content Delivery Networks41
  • 42. Summary P2P CDNs can be cost-effective Provide better resource utilization Challenges: Network Congestion Network cost–Friendly Protocols Handling copyright issues 05/01/13Peer to Peer Content Delivery Networks42
  • 43. Thank You 05/01/13Peer to Peer Content Delivery Networks43

Editor's Notes

  1. P2P systems are classified under two major categories centralized and decentralized. Example of centralized is Napster in which one server keeps the information of of all the other peers and decentralized is further divided into structured and unstructured. These are categorized under unstructured as they do not follow any structured way for file placement and do not optimize the search algorithm. Due to their unstructured way, they flood the queries in network and increase the network congestion…..whereas in structured they follow particular algorithms to search a file in the network.
  2. Napster was the start of P2P and it could share only music files with peers. Every node uploads the list of shared files onto the server and whenever any peer search for a file, the server replies back with the list of nodes containing the file. User connect directly to remote peer and start download. However if the remote peer is behind a firewall, the peer send this information to the server and server forwards this request to the remote peer and then our node waits for the remote peer to connect in order to download the file.
  3. Issues with Napster…Since it has a single server maintaining the list, the server is the single point of failure….Hence it is prone to denial of service…………However it ensures correct results till the time server is working properly…..as the list is uploaded directly to the server….. Search is centralized but the file transfer is peer to peer….
  4. Gnutella could share any type of files, in opposition to Napster…..The search is decentralized….
  5. Since the system is completely decentralized there is no single point of failure…………and this is less prone to denial of service….. However it cannot ensure correct results as one node may have the requested file but before the request reaches this node TTL is over and peer is refused about the file……. It increases network congestion as each time the query is broadcasted to all the neighbors…..
  6. It connect different networks together…..each network has a super node that keeps the information of all the shared file by the nodes in that network…….