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
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
7
680
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Terraform Stacks入門 #HashiTalks
msato
0
360
LINEヤフーにおけるPrerender技術の導入とその効果
narirou
1
110
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
170
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
880
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
640
Featured
See All Featured
KATA
mclloyd
29
14k
The Invisible Side of Design
smashingmag
298
50k
RailsConf 2023
tenderlove
29
900
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Fireside Chat
paigeccino
34
3k
Become a Pro
speakerdeck
PRO
25
5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Teambox: Starting and Learning
jrom
133
8.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
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*$ $%/ͱͯ͠ͷϛογϣϯ