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
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.6k
怖くない!ゼロから始めるPHPソースコードコンパイル入門
colopl
0
130
クレカ・銀行連携機能における “状態”との向き合い方 / SmartBank Engineer LT Event
smartbank
2
100
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.4k
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
120
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
160
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
190
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
300
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
110
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
120
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
100
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
KATA
mclloyd
29
14k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
For a Future-Friendly Web
brad_frost
175
9.4k
The Language of Interfaces
destraynor
154
24k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.6k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
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*$ $%/ͱͯ͠ͷϛογϣϯ