Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Fastlyのプログラマから見たCDN
Search
kazuho
April 13, 2018
Technology
29
18k
Fastlyのプログラマから見たCDN
#cdn_study 発表資料 (2018/4/13)
kazuho
April 13, 2018
Tweet
Share
More Decks by kazuho
See All by kazuho
HTTP優先度制御の今後とビデオ配信
kazuho
1
100
Encrypted SNI
kazuho
5
6.5k
Security, privacy, performance of next-generation transport protocols
kazuho
8
37k
TLS 1.3とその周辺の標準化動向
kazuho
0
9.2k
Other Decks in Technology
See All in Technology
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
110
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
22
20k
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
110
Work as an App Engineer
lycorp_recruit_jp
0
130
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
100
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
210
MLOps の現場から
asei
7
650
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
570
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
5分でわかるDuckDB
chanyou0311
10
3.2k
生成AIのガバナンスの全体像と現実解
fnifni
1
200
Featured
See All Featured
Speed Design
sergeychernyshev
25
670
Making Projects Easy
brettharned
116
5.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
We Have a Design System, Now What?
morganepeng
51
7.3k
Faster Mobile Websites
deanohume
305
30k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Done Done
chrislema
181
16k
The Cult of Friendly URLs
andyhume
78
6.1k
How GitHub (no longer) Works
holman
311
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Music & Morning Musume
bryan
46
6.2k
Transcript
'BTUMZͷϓϩάϥϚ͔Βݟͨ$%/ Ԟ Ұึ ݄
• ۀͷ$%/ • ਓͷैۀһ • ੈք̓ϲॴʹΦϑΟε • 5CQTͷόϯυ෯ 'BTUMZͱ
• ݄ೖࣾ • 1SJODJQBM044&OHJOFFS – )551 5-4 26*$࣮ʮ)0ʯͷ։ൃ –
ͦΕΒϓϩτίϧͷඪ४Խ׆ಈʹࢀՃ ࣗݾհ
ຊ͓͢Δ༰$%/ͷதͷΤϯδχΞ ͔ΒݟͨݸਓతҙݟͰ͋Γɺࣾͱͯ͠ͷݟ ղΛࣔ͢ͷͰ͋Γ·ͤΜ ͓͜ͱΘΓ
• 'BTUMZͷ101ઃܭ • શੈքతͳࢄ,74 • &EHF$MPVE • ΠϯλʔωοτͷਐԽͱ$%/ ΞδΣϯμ
'BTUMZͷ101ઃܭ
$%/ʹΩϟογϡͤͨ͞΄͏͕͍ $%/ʹΩϟογϡͤͨ͞΄͏͕͍҆ ˣ ΩϟογϡώοτΛߴΊ͍ͨ $%/Λ͏ཧ༝
IUUQTXXXGBTUMZDPNOFUXPSLNBQ 101T
• ίϯϏχϞσϧ – Ϣʔβͷۙ͘ʹͨ͘͞Μͷ101 – ϝϦοτϨΠςϯγ • εʔύʔϚʔέοτϞσϧ –
*9ͷۙ͘ʹڊେͳ101 – ϝϦοτΩϟογϡώοτߴ ̎छྨͷϞσϧ
• Ωϟογϡώοτ͠ͳ͍ͳΒϨΠςϯγ ΛΔҙຯ͕ͳ͍ • NTϨΠςϯγ͕૿͑Δͱͯ͠ɺώο τͷߴ͍ڊେͳ101Λஔ͖͢ ˣ ڊେͳ101ͳΒͰͷٕज़త՝ͱ 'BTUMZεʔύʔϚέοτϞσϧ
• 101ຖͷΩϟύγςΟ ྫ – ࠷େ5CQTΫϥεͷωοτϫʔΫ • .314 –
ͷαʔόΫϥελ • (#ϝϞϦ • 5#44% • νϟϨϯδίετͱߴՄ༻ੑ 'BTUMZͷ101
ϧʔςΟϯά
IUUQTXXXGBTUMZDPNCMPHCVJMEJOHBOETDBMJOHGBTUMZOFUXPSLQBSUGJHIUJOHGJC ϧʔλϨεɾϧʔςΟϯά
ϩʔυόϥϯα L2SW L/B Server B Server A Server C
εςʔτϨεɾϩʔυόϥϯε L2SW Server B Server A Server C ECMP
(hash(ip:port))
εςʔτϨεɾϩʔυόϥϯε L2SW Server B Server A Server C ECMP
(hash(ip:port)) IUUQTXXXGBTUMZDPNCMPHCVJMEJOHBOETDBMJOHGBTUMZOFUXPSLQBSUCBMBODJOHSFRVFTUT
• ཁ݅ – ΫϥελͰ࠷̎ϊʔυ͕ॻࠐ – ฏۉXSJUFTTFDɾTFSWFS • )551Ϩεϙϯεͷ͕Ωϟογϡߋ৽ͱԾఆ •
ॻ͖ࠐΈ୯Ґʹ)551Ϩεϙϯε ൺֱతେ • 44%ͷ – ॻࠐϨΠςϯγ – ΣΞϨϕϦϯά 44%Ωϟογϡ
• ղܾࡦ – ಠࣗϑΝΠϧγεςϜ – Ұൠతͳ GTΑΓ؇͍Ұ؏ੑཁ݅ – 44%ͷಛੑʢྫϒϩοΫαΠζʣʹ࠷దԽ
44%Ωϟογϡ
• ϧʔςΟϯά • 5$1ͷνϡʔχϯά – ੍ޚɺ*/*5$8/% • ܧଓతͳϞχλϦϯάͱϑΟʔυόοΫ –
ੈք֤ʹϞχλϦϯάϊʔυ ωοτϫʔΫͷࢹͱνϡʔχϯά
ߴͳ)551࣮
• 'BTUMZͷ101ͷಛ – εʔύʔϚʔέοτϞσϧʢߴώοτʣ – ΧελϜιϑτΣΞʹΑΓ – ߴՁͳઐ༻ϋʔυΣΞΛ༻͍ͣʹ –
ߴՄ༻ੑͱߴޮੑΛ࣮ݱ • ϧʔςΟϯά • ϩʔυόϥϯε • ϑΝΠϧγεςϜ • ܧଓతͳࢹ – 5$1 5-4 )551Ϩϕϧͷνϡʔχϯά ·ͱΊ
શੈքతͳࢄ,74
• 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 … Πϯελϯτɾύʔδ
• ϓϩάϥϜՄೳͳ$%/ • 63-Ͱࢀর͠ɺΩϟογϡ – ϦΫΤετॻʹΑΓҙͷΩʔͰࢀরՄೳ • ҙͷλΠϛϯάɾཻͰύʔδ શੈքతͳࢄ,74
4IJFMEJOH Origin NRT POP LHR POP SFO POP ITM
POP
• ٕज़ཁૉ – େ༰ྔͷΩϟογϡ – Πϯελϯτɾύʔδ – 4IJFMEJOH ۃΊͯߴ͍ΩϟογϡΛ࣮ݱՄೳ
&EHF$MPVE
• 8FC"QQMJDBUJPO'JSFXBMM – σϑΥϧτʴΧελϚΠζՄೳͳϧʔϧ • %%P4 – $%/ωοτϫʔΫ༰ྔ͕େ͖͍ •
খ͞ͳ%%P4ʹͳΒͳ͍ – %%P4ʹରԠ͢Δઐ༻ͷ4JOL ߈ܸରࡦ
• ը૾ͷαΠζɺ࣭ɺѹॖํࣜΛΫϥΠ Ξϯτຖʹ࠷దԽ ը૾࠷దԽ
<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
ϚΠΫϩαʔϏε߹ ೝূ IUUQTTQFBLFSEFDLDPNSZZTENJDSPTFSWJDFTPOGBTUMZ
ΠϯλʔωοτͷਐԽͱ$%/
• 5$1 • Σϒੜ • )551
• 5-4 • )551 • 5-4 ࣮࣭ 5-4 • 26*$ ࣮࣭ 5$1 Πϯλʔωοτϓϩτίϧͷྺ࢙
• ϓϩτίϧ্ͷ੍ݶ͕ϘτϧωοΫʹ • εϚʔτϑΥϯͷීٴ • $%/ͷຄڵ – ϓϩτίϧਐԽʹΫϥΠΞϯτ։ൃऀͱ αʔό։ൃऀͷ߹ҙ͕ඞཁ
– αʔό։ൃʹࢿ͢Δ৫ʹ$%/ • εϊʔσϯࣄ݅ ͳͥࠓͳͷ͔ r ͍͔ͭ͘ͷཧ༝
• શͯͷ௨৴Λ҉߸Խ – ϓϥΠόγʔอޢͱߗԽରࡦͷཱ྆ • ΑΓਝͳηοτΞοϓ – 355 1VTI
&BSMZ)JOUT • ωοτϫʔΫΛ·͍ͨͰ్Εͳ͍௨৴ – ଓͷϋϯυΦʔόʔͱϚϧνύεରԠ • ྼѱͳڥԼͰ೪Γڧ͘ – ϔουΦϒϥΠϯϒϩοΩϯάͷղܾɺલํ Τϥʔగਖ਼ ϓϩτίϧਐԽͷํੑ
• %/4PWFS)5514 – %/4ΫΤϦͷԠ$%/͔ΒɺηΩϡΞʹ • &BSMZ)JOUT$BDIF%JHFTUTGPS) – ΦϦδϯͷॲཧதʹ$%/͔ΒΞηοτΛ৴ •
4FSWFS5JNJOH – ϦΫΤετड৴ɺϨεϙϯεੜɺ৴λΠϛϯάΛ+4Ͱऔಘ • 4FDPOEBSZ$FSUJGJDBUFT – ̍ຊͷ5-4ଓͰෳͷূ໌ॻΛ༻ • 4IPSU5FSN$FSUT%FMFHBUFE$SFET – ൿີݤ࿙ӮͷӨڹΛ੍ݶ ݕӾରࡦؚΉ • 7BSJBOUT – 7BSZͷΩϟογϡരൃΛղܾ $%/ʹಛʹؔͷ͋Δϓϩτίϧ֦ு
26*$
26*$ IUUQTXXXJFUGPSHQSPDFFEJOHTTMJEFTTMJEFTRVJDQEG
• ʙ355Ͱͷଓཱ֬ • ϔουΦϒϥΠϯϒϩοΩϯάͷղܾ • ωοτϫʔΫΛ·͍ͨͰ్Εͳ͍ • ΑΓྑ͍ϓϥΠόγʔอޢ •
ਐԽΛଓ͚Δ௨৴ϓϩτίϧ – ΧʔωϧϧʔλͷӨڹΛഉআ • ΞοϓσʔτͰ͖ͳ͍σόΠεظతʹݟͯअ ຐʹͳΔ 26*$ͷඪ
• τϥϯεϙʔτͷઃܭݻ·Γͭͭ͋Δ – ݅ • ϋϯυγΣΠΫઃܭͷϦϑΝΫλ • ύέοτ൪߸҉߸Խ •
)551ʗϔομѹॖͷৄࡉ͜Ε͔Β 26*$ඪ४Խͷਐঢ়گ
26*$r ૬ޓଓࢼݧ
• .BSL/PUUJOHIBN – )551 26*$8(ٞ *"#ϝϯόʔ • +BOB*ZFOHBS –
*$$3(ٞ 26*$ඪ४ͷΤσΟλ • +PFM+BFHHMJ – /FUNPE 8(ٞ • .FMJOEB4IPSF – 5SBOT8( %*/3(ٞ *"#ϝϯόʔ 'BTUMZͱϓϩτίϧඪ४Խ
·ͱΊ
• ΑΓ҆͘ɺΑΓ͘ίϯςϯπΛ৴ – ߴ͍ΩϟογϡώοτΛ࣮ݱ • શੈքతͳࢄ,74 – ϓϩάϥϚϒϧͳ$%/ –
ॊೈͳ੍ޚ • &EHF$MPVE – ͞Βʹ༷ʑͳػೳΛఏڙ • ϓϩτίϧͷਐԽΛଅਐ – )551 5-4 26*$ $%/ͱͯ͠ͷϛογϣϯ