Peer Assisted CDN

Embed Size (px)

Citation preview

  • 8/17/2019 Peer Assisted CDN

    1/42

     

    Peer-Assisted ContentPeer-Assisted Content

    Distribution Networks:Distribution Networks: Techniques and Challenges Techniques and ChallengesPei CaoPei Cao

    Stanford UniversitStanford Universit

  • 8/17/2019 Peer Assisted CDN

    2/42

     

     Traditional !ntra-Provider Traditional !ntra-Provider

    Content Distribution NetworksContent Distribution Networks

    National Center 

    Regional Center 

    Branch

    . . .

    . . . . . .

    Users. . . . . .. . . . . .

  • 8/17/2019 Peer Assisted CDN

    3/42

     

    Peer-to-Peer ContentPeer-to-Peer Content

    DistributionDistribution

    National Center 

    Regional Center 

    Branch

    . . .

    . . . . . .

    Users. . . . . .. . . . . .

  • 8/17/2019 Peer Assisted CDN

    4/42

     

    P"P vs CDNP"P vs CDN

    # P"P:P"P:$ No infrastructure costNo infrastructure cost

    $ Su%%l grows linearl with de&andSu%%l grows linearl with de&and

    $ Si&%le distributed' rando&i(ed algorith&sSi&%le distributed' rando&i(ed algorith&s

    $ No )oSNo )oS

    # CDN:CDN:

    $ !nitial infrastructure cost!nitial infrastructure cost$ Centrali(ed scheduling algorith&sCentrali(ed scheduling algorith&s

    $ Network e*ciencNetwork e*cienc

    $ Ca%able of su%%orting )oSCa%able of su%%orting )oS

  • 8/17/2019 Peer Assisted CDN

    5/42

     

    Co&bine P"P with CDN+Co&bine P"P with CDN+

    # Use P"P to co&%le&ent CDNUse P"P to co&%le&ent CDN$ P"P reduces load on the CDN' covers areasP"P reduces load on the CDN' covers areas

    where CDN is not installedwhere CDN is not installed

    $ ,ust be able to control' or sha%e.' P"P tra*c,ust be able to control' or sha%e.' P"P tra*c# Use CDN to co&%le&ent P"PUse CDN to co&%le&ent P"P

    $ CDN ste%s in when %eer-based distribution isCDN ste%s in when %eer-based distribution is

    falling short' enabling )oSfalling short' enabling )oS

    $ ,ust be able to detect when %eers won/t &eet,ust be able to detect when %eers won/t &eetthe deliver ti&e guaranteethe deliver ti&e guarantee

  • 8/17/2019 Peer Assisted CDN

    6/42

     

    0utline0utline

    # 1eview of 2itTorrent1eview of 2itTorrent

    # Tra*c-sha%ing 2itTorrent: biased Tra*c-sha%ing 2itTorrent: biasedneighbor selectionneighbor selection

    # )oS in 2itTorrent: deliver ti&e)oS in 2itTorrent: deliver ti&e%rediction%rediction

  • 8/17/2019 Peer Assisted CDN

    7/42

     

    2itTorrent 3ile Sharing2itTorrent 3ile Sharing

    NetworkNetwork4oal: re%licate 5 chunks of data a&ong4oal: re%licate 5 chunks of data a&ong

    N nodesN nodes

    # 3or& neighbor connection gra%h3or& neighbor connection gra%h

    # Neighbors e6change dataNeighbors e6change data

  • 8/17/2019 Peer Assisted CDN

    8/42

     

    2itTorrent: Neighbor2itTorrent: Neighbor

    SelectionSelection Tracker7le8torrent9Seed

    hole 7le

    A

    ;

    "<

    =

  • 8/17/2019 Peer Assisted CDN

    9/42

     

    2itTorrent: Piece 1e%lication2itTorrent: Piece 1e%lication

     Tracker7le8torrent9Seed

    hole 7le

    A

    ;

    <

  • 8/17/2019 Peer Assisted CDN

    10/42

     

    2itTorrent: Piece 1e%lication2itTorrent: Piece 1e%lication

    Algorith&sAlgorith&s

    #  Tit-for-tat. >choking?unchoking@: Tit-for-tat. >choking?unchoking@:$ ach %eer onl u%loads to B other %eers at a ti&each %eer onl u%loads to B other %eers at a ti&e

    $ of these are chosen based on a&ount of data of these are chosen based on a&ount of data

    received fro& the neighbor in the last " secondsreceived fro& the neighbor in the last " seconds

    $  The last one is chosen rando&l' with a B;E bias The last one is chosen rando&l' with a B;E bias

    toward newco&erstoward newco&ers

    # >Focal@ 1arest-7rst re%lication:>Focal@ 1arest-7rst re%lication:$ hen %eer < unchokes %eer A' A selects whichhen %eer < unchokes %eer A' A selects which

    %iece to download%iece to download

  • 8/17/2019 Peer Assisted CDN

    11/42

     

    Analsis of 2itTorrentAnalsis of 2itTorrent

    # Conclusion fro& &odeling studies:Conclusion fro& &odeling studies:2itTorrent is nearl o%ti&al in2itTorrent is nearl o%ti&al in

    ideali(ed' ho&ogeneous networksideali(ed' ho&ogeneous networks$ De&onstrated b si&ulation studiesDe&onstrated b si&ulation studies

    $ Con7r&ed b theoretical &odeling studiesCon7r&ed b theoretical &odeling studies

    # !ntuition: in a rando& gra%h'!ntuition: in a rando& gra%h'

    Prob>Peer A/s content is a subset of Peer 2/s@ GProb>Peer A/s content is a subset of Peer 2/s@ G

    ;E;E

  • 8/17/2019 Peer Assisted CDN

    12/42

     

     Tra*c-Sha%ing 2itTorrent Tra*c-Sha%ing 2itTorrent

  • 8/17/2019 Peer Assisted CDN

    13/42

     

    1ando& Neighbor 4ra%h1ando& Neighbor 4ra%h

    # 6isting studies all assu&e rando&6isting studies all assu&e rando&neighbor selectionneighbor selection

    $ 2itTorrent no longer o%ti&al if nodes in2itTorrent no longer o%ti&al if nodes inthe sa&e !SP onl connect to each otherthe sa&e !SP onl connect to each other

    # 1ando& neighbor selection1ando& neighbor selection  highhigh

    cross-!SP tra*ccross-!SP tra*c

  • 8/17/2019 Peer Assisted CDN

    14/42

     

    Di*cult in Tra*c-Sha%ing P"PDi*cult in Tra*c-Sha%ing P"P

    A%%licationsA%%lications

    # !SPs:!SPs:$ DiHerent links have diHerent &onetar costsDiHerent links have diHerent &onetar costs

    $ Prefer clustering. of tra*cPrefer clustering. of tra*c# P"P A%%lications:P"P A%%lications:

    $ No knowledge of underling !SP to%ologNo knowledge of underling !SP to%olog

    $Use rando&i(ed algorith&s that don/t doUse rando&i(ed algorith&s that don/t dowell under clusteringwell under clustering

    # Current solution: throttlingCurrent solution: throttling  usersuserssuHersuHer

  • 8/17/2019 Peer Assisted CDN

    15/42

     

    A Network-3riendlA Network-3riendl

    2itTorrent+2itTorrent+# !SPs infor& 2itTorrent of its link!SPs infor& 2itTorrent of its link

    %references%references

    # Algorith& of 2itTorrent is adIustedAlgorith& of 2itTorrent is adIustedsuch that both users and !SPs bene7tsuch that both users and !SPs bene7t

    # 6a&%le: 2iased Neighbor Selection6a&%le: 2iased Neighbor Selection$ orks when cost function is transitiveorks when cost function is transitive

  • 8/17/2019 Peer Assisted CDN

    16/42

     

    2iased Neighbor Selection2iased Neighbor Selection

    # !dea: of N neighbors' choose N-k fro&!dea: of N neighbors' choose N-k fro&%eers in the sa&e !SP' and choose k%eers in the sa&e !SP' and choose k

    rando&l fro& %eers outside the !SPrando&l fro& %eers outside the !SP

    !SP

  • 8/17/2019 Peer Assisted CDN

    17/42

     

    !&%le&enting 2iased Neighbor!&%le&enting 2iased Neighbor

    SelectionSelection

    # 2 Tracker2 Tracker$ Need !SP a*liations of %eersNeed !SP a*liations of %eers

    #Peer to AS &a%sPeer to AS &a%s#Public !P address ranges fro& !SPsPublic !P address ranges fro& !SPs#S%ecial J-. KTTP headerS%ecial J-. KTTP header

    # 2 tra*c sha%ing devices2 tra*c sha%ing devices$ !nterce%t %eer!nterce%t %eer  tracker. &essagestracker. &essages

    and &ani%ulate res%onsesand &ani%ulate res%onses

    $ No need to change tracker or clientNo need to change tracker or client

  • 8/17/2019 Peer Assisted CDN

    18/42

     

    valuation ,ethodologvaluation ,ethodolog

    # vent-driven si&ulatorvent-driven si&ulator$ Use actual client and tracker codes as &uch asUse actual client and tracker codes as &uch as

    %ossible%ossible

    $ Calculate bandwidth contention' assu&e %erfect fair-Calculate bandwidth contention' assu&e %erfect fair-

    share fro& TCPshare fro& TCP

    # Network settingsNetwork settings$ 9= !SPs' each with ; %eers' 95b?s u%load' 9,b?s9= !SPs' each with ; %eers' 95b?s u%load' 9,b?s

    downloaddownload

    $ Seed node' =5b?s u%loadSeed node' =5b?s u%load

    $ 0%tional universit. nodes >9,b?s u%load@0%tional universit. nodes >9,b?s u%load@

    $ 0%tional !SP bottleneck to other !SPs0%tional !SP bottleneck to other !SPs

  • 8/17/2019 Peer Assisted CDN

    19/42

     

    Fi&itation of ThrottlingFi&itation of Throttling

  • 8/17/2019 Peer Assisted CDN

    20/42

     

     Throttling: Cross-!SP Tra*c Throttling: Cross-!SP Tra*c

    1edundanc: Average L of ti&es a data chunk enters the

  • 8/17/2019 Peer Assisted CDN

    21/42

     

    2iased Neighbor Selection:2iased Neighbor Selection:

    Download Ti&esDownload Ti&es

  • 8/17/2019 Peer Assisted CDN

    22/42

     

    2iased Neighbor Selection:2iased Neighbor Selection:

    Cross-!SP Tra*cCross-!SP Tra*c

  • 8/17/2019 Peer Assisted CDN

    23/42

     

    !&%ortance of 1arest-3irst!&%ortance of 1arest-3irst

    1e%lication1e%lication

    # 1ando& %iece re%lication %erfor&s1ando& %iece re%lication %erfor&sbadlbadl

    $ !ncreases download ti&e b M=E - 9;E!ncreases download ti&e b M=E - 9;E$ !ncrease tra*c redundanc fro& < to 9=!ncrease tra*c redundanc fro& < to 9=

    # 2iased neighbors 1arest-3irst2iased neighbors 1arest-3irst  

    ,ore unifor& %rogress of %eers,ore unifor& %rogress of %eers

  • 8/17/2019 Peer Assisted CDN

    24/42

  • 8/17/2019 Peer Assisted CDN

    25/42

     

    Co&%arison with Si&%leCo&%arison with Si&%le

    ClusteringClustering

    # 4atewa %eer: onl one %eer4atewa %eer: onl one %eerconnects to the %eers outside theconnects to the %eers outside the

    !SP' all other %eers onl connect to!SP' all other %eers onl connect to%eers inside the !SP%eers inside the !SP

    $ 4atewa %eer &ust have high4atewa %eer &ust have high

    bandwidthbandwidth

    # !t is the seed. for this !SP!t is the seed. for this !SP

    $ nds u% bene7ting %eers in other !SPsnds u% bene7ting %eers in other !SPs

  • 8/17/2019 Peer Assisted CDN

    26/42

     

    Co&bining 2iased NeighborCo&bining 2iased Neighbor

    Selection with CachesSelection with Caches

    # Under rando& neighbor selectionUnder rando& neighbor selection$ bandwidth require&ent of cache is highbandwidth require&ent of cache is high

    # Under biased neighbor selectionUnder biased neighbor selection$ bandwidth needed fro& the cache isbandwidth needed fro& the cache is

    reduced b an order of &agnitudereduced b an order of &agnitude

  • 8/17/2019 Peer Assisted CDN

    27/42

     

    ConclusionsConclusions

    # 2 choosing neighbors well' 2itTorrent2 choosing neighbors well' 2itTorrentcan achieve high %eer %erfor&ancecan achieve high %eer %erfor&ance

    without increasing !SP costwithout increasing !SP cost$ 2iased neighbor selection: choose initial2iased neighbor selection: choose initial

    set of neighbors wellset of neighbors well

    $Can be co&bined with throttling andCan be co&bined with throttling andcachingcaching

     2itTorrent/s algorith& can be sha%edO2itTorrent/s algorith& can be sha%edO

  • 8/17/2019 Peer Assisted CDN

    28/42

     

    Deliver Ti&e PredictionDeliver Ti&e Prediction

  • 8/17/2019 Peer Assisted CDN

    29/42

     

    ,otivation,otivation

    # Provide deliver ti&e guarantee underProvide deliver ti&e guarantee underP"PCDNP"PCDN

    # hat contributes to deliver ti&e of ahat contributes to deliver ti&e of adownload via 2itTorrent+download via 2itTorrent+

    $ 3ro& si&ulations: seed bandwidth and3ro& si&ulations: seed bandwidth and

    even re%lication of blockseven re%lication of blocks$ ,issing: node Ioin?leave dna&ics' TCP,issing: node Ioin?leave dna&ics' TCP

    eHects' etc8eHects' etc8

  • 8/17/2019 Peer Assisted CDN

    30/42

     

    Side-b-Side FiveSide-b-Side Five

    6%eri&ents6%eri&ents# Two clients' running on the sa&e Two clients' running on the sa&e

    &achine' starting at the sa&e ti&e'&achine' starting at the sa&e ti&e'

    downloading the sa&edownloading the sa&e# 9< e6%eri&ents fro& A%r-,a "9< e6%eri&ents fro& A%r-,a "

    # 3ile si(es: B,2 98=423ile si(es: B,2 98=42

    # Network si(e: 99 "9 %eersNetwork si(e: 99 "9 %eers# Duration: 9 hrs " dasDuration: 9 hrs " das

  • 8/17/2019 Peer Assisted CDN

    31/42

     

    1esults fro& 6%eri&ents1esults fro& 6%eri&ents

    # Hective download rate: 9

  • 8/17/2019 Peer Assisted CDN

    32/42

     

    Sus%icion L9: SlowerSus%icion L9: Slower

    Neighbors+Neighbors+

    # Calculate unweighted average of observedCalculate unweighted average of observedthrough%ut at a%%lication levelthrough%ut at a%%lication level$ 1199: average fro& all neighbors: average fro& all neighbors

    $ 11"": average fro& neighbors u%loading Q";52 of data: average fro& neighbors u%loading Q";52 of data$ 11

  • 8/17/2019 Peer Assisted CDN

    33/42

     

    Sus%icion L": 3ewer NeighborsSus%icion L": 3ewer Neighbors

    U%loading to the Peer+U%loading to the Peer+

    # Slot analsis: calculate download concurrencSlot analsis: calculate download concurrenc$ ,a6i&u& nu&ber of neighbors:

  • 8/17/2019 Peer Assisted CDN

    34/42

     

    Close. NeighborsClose. Neighbors

    # RE of data downloaded fro& 9-=ERE of data downloaded fro& 9-=Eof neighborsof neighbors

    # FetFet F(p)F(p) andand G(p)G(p) be the nu&ber ofbe the nu&ber ofneighbors that %rovidesneighbors that %rovides  p p of data toof data to

    %eers 3 and 4' then%eers 3 and 4' then

      3>%@ Q 4>%@3>%@ Q 4>%@  %eer 3 is slower than 4%eer 3 is slower than 4$ This holds for % RE' B;E' and ;E This holds for % RE' B;E' and ;E

  • 8/17/2019 Peer Assisted CDN

    35/42

     

    hat &akes a neighborhat &akes a neighbor

    close+close+# Not related to s%eed' or order ofNot related to s%eed' or order of

    connection to %eer' or order ofconnection to %eer' or order of

    unchoking b %eerunchoking b %eer

  • 8/17/2019 Peer Assisted CDN

    36/42

     

    Cost of De%arture of a CloseCost of De%arture of a Close

    NeighborNeighbor

    # De%arture cost: if one close neighborDe%arture cost: if one close neighborleaves' calculate the ti&e until theleaves' calculate the ti&e until the

    earliest ne6t close neighborearliest ne6t close neighbor# The average de%arture cost:

  • 8/17/2019 Peer Assisted CDN

    37/42

     

    h Do Close Neighborsh Do Close Neighbors

    FeaveFeave# 3ive %ossible reasons3ive %ossible reasons

    $ A: 1ando& disconnectA: 1ando& disconnect

    $ 2: 3inished downloading2: 3inished downloading$ C: Peer broke oH the relationshi%C: Peer broke oH the relationshi%

    $ D: Neighbor broke oH the relationshi%D: Neighbor broke oH the relationshi%

    # 1esults: 2 is &ost co&&on' followed1esults: 2 is &ost co&&on' followedb C?D' then Ab C?D' then A

  • 8/17/2019 Peer Assisted CDN

    38/42

     

    ConclusionsConclusions

    # Content deliver ti&e in 2itTorrent isContent deliver ti&e in 2itTorrent isdeter&ined b:deter&ined b:

    $ Neighbor u%load s%eedNeighbor u%load s%eed$ Stabilit of neighbor relationshi%Stabilit of neighbor relationshi%

    #Disru%tion of the %airing leads to longDisru%tion of the %airing leads to longdeliver ti&edeliver ti&e

    #Neighbors &a leave due to rando&Neighbors &a leave due to rando&disconnection' co&%letion of download' ordisconnection' co&%letion of download' or

    7nding faster neighbors7nding faster neighbors

  • 8/17/2019 Peer Assisted CDN

    39/42

     

    Using CDN to Co&%le&entUsing CDN to Co&%le&ent

    P"PP"P# Use nodes CDN as high-s%eedUse nodes CDN as high-s%eed

    s%eciall &anaged seedss%eciall &anaged seeds

    # Seeds are called to hel% whenever aSeeds are called to hel% whenever anode loses a close neighbornode loses a close neighbor

  • 8/17/2019 Peer Assisted CDN

    40/42

     

    Su&&arSu&&ar

    # A wa to sha%e 2itTorrent tra*cA wa to sha%e 2itTorrent tra*c

    # Predicting 2itTorrent %erfor&ance bPredicting 2itTorrent %erfor&ance b

    &onitoring close %eer relationshi%&onitoring close %eer relationshi%

  • 8/17/2019 Peer Assisted CDN

    41/42

     

    1elated ork1elated ork

    # ,an &odeling studies of 2itTorrent,an &odeling studies of 2itTorrent

    # Si&ulation studiesSi&ulation studies

    # ,easure&ents of real torrents,easure&ents of real torrents

  • 8/17/2019 Peer Assisted CDN

    42/42

    0ngoing ork0ngoing ork

    # Five e6%eri&ents with biasedFive e6%eri&ents with biasedneighbor selectionsneighbor selections

    # A k-regular gra%h algorith& withA k-regular gra%h algorith& withfaster convergencefaster convergence

    # Protot%e i&%le&entation ofProtot%e i&%le&entation of

    P"PCDN.P"PCDN.