Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fastlyのプログラマから見たCDN

kazuho
April 13, 2018

 Fastlyのプログラマから見たCDN

#cdn_study 発表資料 (2018/4/13)

kazuho

April 13, 2018
Tweet

More Decks by kazuho

Other Decks in Technology

Transcript

  1.  • ίϯϏχϞσϧ – Ϣʔβͷۙ͘ʹͨ͘͞Μͷ101 – ϝϦοτ௿ϨΠςϯγ • εʔύʔϚʔέοτϞσϧ –

    *9ͷۙ͘ʹڊେͳ101 – ϝϦοτΩϟογϡώοτ཰ߴ ̎छྨͷϞσϧ
  2.  • 101ຖͷΩϟύγςΟ ྫ  – ࠷େ5CQTΫϥεͷωοτϫʔΫ • ໿.314 –

    ୆ͷαʔόΫϥελ • (#ϝϞϦ • 5#44% • νϟϨϯδίετͱߴՄ༻ੑ 'BTUMZͷ101
  3.  εςʔτϨεɾϩʔυόϥϯε L2SW Server B Server A Server C ECMP

    (hash(ip:port)) IUUQTXXXGBTUMZDPNCMPHCVJMEJOHBOETDBMJOHGBTUMZOFUXPSLQBSUCBMBODJOHSFRVFTUT
  4.  • ཁ݅ – Ϋϥελ಺Ͱ࠷௿̎ϊʔυ͕ॻࠐ – ฏۉXSJUFTTFDɾTFSWFS • )551Ϩεϙϯεͷ͕Ωϟογϡߋ৽ͱԾఆ •

    ॻ͖ࠐΈ୯Ґʹ)551Ϩεϙϯε ൺֱతେ • 44%ͷ໰୊ – ॻࠐϨΠςϯγ – ΢ΣΞϨϕϦϯά 44%Ωϟογϡ
  5.  • 'BTUMZͷ101ͷಛ௃ – εʔύʔϚʔέοτϞσϧʢߴώοτ཰ʣ – ΧελϜιϑτ΢ΣΞʹΑΓ – ߴՁͳઐ༻ϋʔυ΢ΣΞΛ༻͍ͣʹ –

    ߴՄ༻ੑͱߴޮ཰ੑΛ࣮ݱ • ϧʔςΟϯά • ϩʔυόϥϯε • ϑΝΠϧγεςϜ • ܧଓతͳ؂ࢹ – 5$1 5-4 )551Ϩϕϧͷνϡʔχϯά ·ͱΊ
  6.  • 7BSOJTI$POUSPM-BOHVBHF 7$-  – )551ϦΫΤετͷॲཧΛΧελϚΠζ͢Δ ϓϩάϥϛϯάݴޠ sub vcl_miss

    { if (req.http.User-Agent ~ "Googlebot") { set req.backend = F_special_google_backend; } return(fetch); } ϓϩάϥϜՄೳͳ$%/
  7.  • 63-Λࢦఆͯ͠ͷύʔδ • αϩήʔτɾΩʔΛࢦఆͯ͠ͷύʔδ – ಛఆͷΩʔ͕͍ͭͨΩϟογϡΛ·ͱΊͯ ύʔδ HTTP/1.1 200

    OK Content-Type: text/html Content-Length: 1234 Surrogate-Key: mainpage template-a … Πϯελϯτɾύʔδ
  8.  <div id="content"> <div id="header"> <img src="/images/logo.jpg" /> <esi:include src="/shopping_cart"

    /> </div> <div id="items"> <span id="item_1">...</span> <span id="item_2">...</span>… <span id="item_3">...</span>… <span id="item_4">...</span>… &EHF4JEF*ODMVEFT
  9.  •  5$1 •  ΢Σϒ஀ੜ •  )551

    •  5-4 •  )551 •  5-4 ࣮࣭ 5-4 •  26*$ ࣮࣭ 5$1 Πϯλʔωοτϓϩτίϧͷྺ࢙
  10.  • શͯͷ௨৴Λ҉߸Խ – ϓϥΠόγʔอޢͱߗ௚Խରࡦͷཱ྆ • ΑΓਝ଎ͳηοτΞοϓ – 355 1VTI

    &BSMZ)JOUT • ωοτϫʔΫΛ·͍ͨͰ΋్੾Εͳ͍௨৴ – ઀ଓͷϋϯυΦʔόʔͱϚϧνύεରԠ • ྼѱͳ؀ڥԼͰ΋೪Γڧ͘ – ϔουΦϒϥΠϯϒϩοΩϯάͷղܾɺલํ Τϥʔగਖ਼ ϓϩτίϧਐԽͷํ޲ੑ
  11.  • %/4PWFS)5514 – %/4ΫΤϦͷԠ౴΋$%/͔ΒɺηΩϡΞʹ • &BSMZ)JOUT$BDIF%JHFTUTGPS) – ΦϦδϯͷॲཧதʹ$%/͔ΒΞηοτΛ഑৴ •

    4FSWFS5JNJOH – ϦΫΤετड৴ɺϨεϙϯεੜ੒ɺ഑৴λΠϛϯάΛ+4Ͱऔಘ • 4FDPOEBSZ$FSUJGJDBUFT – ̍ຊͷ5-4઀ଓͰෳ਺ͷূ໌ॻΛ࢖༻ • 4IPSU5FSN$FSUT%FMFHBUFE$SFET – ൿີݤ࿙ӮͷӨڹΛ੍ݶ ݕӾରࡦؚΉ • 7BSJBOUT – 7BSZͷΩϟογϡരൃ໰୊Λղܾ $%/ʹಛʹؔ܎ͷ͋Δϓϩτίϧ֦ு
  12.  • ʙ355Ͱͷ઀ଓཱ֬ • ϔουΦϒϥΠϯϒϩοΩϯάͷղܾ • ωοτϫʔΫΛ·͍ͨͰ΋్੾Εͳ͍ • ΑΓྑ͍ϓϥΠόγʔอޢ •

    ਐԽΛଓ͚Δ௨৴ϓϩτίϧ – Χʔωϧ΍ϧʔλͷӨڹΛഉআ • ΞοϓσʔτͰ͖ͳ͍σόΠε͸௕ظతʹݟͯअ ຐʹͳΔ 26*$ͷ໨ඪ
  13.  • .BSL/PUUJOHIBN – )551 26*$8(ٞ௕ *"#ϝϯόʔ • +BOB*ZFOHBS –

    *$$3(ٞ௕ 26*$ඪ४ͷΤσΟλ • +PFM+BFHHMJ – /FUNPE 8(ٞ௕ • .FMJOEB4IPSF – 5SBOT8( %*/3(ٞ௕ *"#ϝϯόʔ 'BTUMZͱϓϩτίϧඪ४Խ
  14.  • ΑΓ҆͘ɺΑΓ଎͘ίϯςϯπΛ഑৴ – ߴ͍Ωϟογϡώοτ཰Λ࣮ݱ • શੈքతͳ෼ࢄ,74 – ϓϩάϥϚϒϧͳ$%/ –

    ॊೈͳ੍ޚ • &EHF$MPVE – ͞Βʹ༷ʑͳػೳΛఏڙ • ϓϩτίϧͷਐԽΛଅਐ – )551 5-4 26*$  $%/ͱͯ͠ͷϛογϣϯ