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
99
Encrypted SNI
kazuho
5
6.4k
Security, privacy, performance of next-generation transport protocols
kazuho
8
37k
TLS 1.3とその周辺の標準化動向
kazuho
0
9.1k
Other Decks in Technology
See All in Technology
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
300
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
110
Engineer Career Talk
lycorp_recruit_jp
0
190
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
550
Lambdaと地方とコミュニティ
miu_crescent
2
370
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
700
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Scaling GitHub
holman
458
140k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
A Tale of Four Properties
chriscoyier
156
23k
Navigating Team Friction
lara
183
14k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
A Philosophy of Restraint
colly
203
16k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Fireside Chat
paigeccino
34
3k
We Have a Design System, Now What?
morganepeng
50
7.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Why Our Code Smells
bkeepers
PRO
334
57k
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*$ $%/ͱͯ͠ͷϛογϣϯ