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
AmazonCloudFrontで始めるお手軽簡単CDN
Search
濱田孝治
April 19, 2018
Technology
2
2.2k
AmazonCloudFrontで始めるお手軽簡単CDN
あなたのWebサイトも月◯◯円で爆速化できちゃうかも?
濱田孝治
April 19, 2018
Tweet
Share
More Decks by 濱田孝治
See All by 濱田孝治
製造現場のデジタル化における課題とPLC Data to Cloudによる新しいアプローチ
hamadakoji
0
270
可視化プラットフォームGrafanaの基本と活用方法の全て
hamadakoji
3
1.1k
20分で完全に理解するGrafanaダッシュボード
hamadakoji
5
2.4k
GuadDutyによるコンテナランタイム脅威検知にすべて〜その凄さと設定注意点と検知の様子をまるっとお届け〜
hamadakoji
3
1.3k
re:Invent2023で体験したIoT面白ワークショップ〜お絵描き2Dロボットの構築〜
hamadakoji
0
720
今改めて見直してみるラズパイの真価
hamadakoji
1
610
40分1本勝負 VPoE ハマコーvs20人の悩めるエンジニアリングマネージャー
hamadakoji
0
64
AWSの次世代プロセッサ Graviton2(Arm64)をLambdaとFargateで使うために考えるべきこと
hamadakoji
3
1.9k
エンジニアリングマネージャーの理想と現実
hamadakoji
13
8.5k
Other Decks in Technology
See All in Technology
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
Lambdaと地方とコミュニティ
miu_crescent
2
370
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
140
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
380
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
Lexical Analysis
shigashiyama
1
150
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Become a Pro
speakerdeck
PRO
25
5k
It's Worth the Effort
3n
183
27k
Why Our Code Smells
bkeepers
PRO
334
57k
Building an army of robots
kneath
302
43k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Code Reviewing Like a Champion
maltzj
520
39k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How to Ace a Technical Interview
jacobian
276
23k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Transcript
1 2 A 4 41 8/0 9 A
2 70 • 1 • 9 I • @ 2
•
4
5 1 → 3 32 ↑
6 1 → 3 1 → 5
1 → 6 32 ↑ 90 ↑ 106%↑
7 1 → 3 1 → 5
1 → 6 1 → 7 1 → 10 32 ↑ 90 ↑ 106%↑ 113%↑ 123%↑
8 Web X Y New
Industry Benchmarks for Mobile Page Speed - Think With Google https://www.thinkwithgoogle.com/marketing-resources/data-measurement/mobile-page-speed-new-industry-benchmarks/
9 1 3 32%
1 5 90% 1 6 106% 1 7 113% 1 10 123%
10
10 " !
11 ! Web
12 C F D
13 l C l l CA l F l
C l C
14 Web
15 Web 1.
16 Web 1.
17 Web 1. 2.
18 Web 1. 2.
19 Web 1. 2.
3.
21 Web 1. 2.
3.
22 Web 1. 2.
3. ! !
23
24 Web Client Internet Web App Database
25 Client Internet Web App Database •
• Akamai •CloudFront •Cloud Flare • Nginx • Apache mod_cache • APCphp • API Gateway response cache • Amazon ElastiCache • redis • Memcached • Amazon DynamoDB Accelerator DAX
26 AWSConsole Amazon CloudFront Edge
27 CDN CloudFront
28 CDN CloudFront
29 CDN ! $"% # CloudFront
&
30 Web 1. 2.
3. ! !
31 Web 1. 2.
3. ! ! AmazonCloudFront
32 Amazon CloudFront
33 Amazon Cloud Front + Contents Delivery Network)CDN* % %
( ! "# $' &
34 %"Contents Delivery Network • Akamai • &
CDN $ • CloudFlare • !CDN WordPress# • Google Cloud CDN • GCP CDN
35 AmazonCloudFront41 .:2 '7( 36*58=;%%<),9 CloudFront #%&
ClientA ClientB ②%%+0 ③<) ①# ④# ⑤ ! <) '7($&"%/-
36 AmazonCloudFront&" ClientA ① DNS )$ DB '%+ *!
②IP ,xxx.cloudfront.net- )$ DB DNS ③%+Edge #( ④%+Edge CloudFront
37 AmazonCloudFront 2456 114
38
39 CloudFront ① EC2 ② EC21RDS
③ EC2RDS
40 ① ①EC2
41 ① CloudFront Client Route 53 www.example.com EC2
ELB
42 4-)① CloudFront4-5B+2C Client Route 53 www.example.com A<(#(" EC2 ELB
CloudFront '( 3 (#(". CloudFront %!& → D1*@ CloudFront!%!&) $A<(#("?, /;67> EC2D0:8 10 9=
43 ;52#① CloudFront;5<QH8R Client Route 53 www.example.com OG 1(1' CloudFront
CloudFront OG 1(1' .&"/:B !$ AN6E>P S3OG+0,#(17? @9 S3 OG+06E>PS3 IL *+2-1#MD Q3F4%# !)R=JCloudFront;5CK
44 ② ②EC2RDS
45 ② CloudFront Client Route 53 www.example.com ELB
EC2 RDS
46 0)%② CloudFront0)1 Client Route 53 www.example.com +7$$ ELB EC2
RDS CloudFront=7%+7% &; ! !8/ .5 >1:? CloudFront #%"$4( 2< 329CloudFront %$4-*6 ',
47 ③ ③EC2RDS
48 ③ CloudFront Client Route 53 www.example.com
ELB App RDS App App img wp- content/uploads/ NFS EC2
49 0)&③ CloudFront0)1 CloudFront Client :6%% *6%% ELB EC2 RDS
php jpg png js css Route 53 www.example.com S3 :6%% 5( $ S337 #&!%- 2 + *6%% " & 9/8. 4 ,'
50 ③ • WordPress& S3 #(!"$ • % )StaticPress
S3 WP Offload S3 Lite* • goofys'Linux→S3 %
51 '! ③ CloudFront'!( CloudFront Client /, $, ELB EC2
RDS S3 Route 53 www.example.com 2 S3Bucket + UploadsC S S JavaScript ◯ /wp-includes /wp-content Custom Origin WordPress*) $, HTML △0.#,1 /login.php /wp-admin Default(*) CloudFront-%"&
52
53 • CDN $%C 9 />KH • GET/HEAD/OPTION (<I •
URLB $%@L=;8F • +-!&,AF 6E"- J08F • Header / Cookie / Query Strings URL ?57 +-!&,AF '#-1 :2.G $%34D $%,*-)AF
54 %#&"*-31,%%4 • + 2 0 TTL
/( • HTTP& !!% & $& • . ')/( OK
55 *+2"03/BHO8F2!2 P • .23$ ; HeaderCookie Query Strings&13# 8F(3
M5 ;> • URL%C G *+2"03/: H • Whitelist6E '.3,284 = I %-)3&13# * +@7DE • *+ 2!2 .2 J 5?L9 M5NK9A<
56 )-1 ,2 • + . - Amazon CloudFront
• https://aws.amazon.com/jp/cloudfront/dynamic- content/ • CloudFront # %/$!1'(02 • https://docs.aws.amazon.com/ja_jp/AmazonCloudFro nt/latest/DeveloperGuide/Expiration.html • Amazon CloudFront (/ (2015"6&*) • https://dev.classmethod.jp/cloud/cloudfront-cache- control/
57
58 5;4627>-=71? 5;8/ CloudFront< IP"' *< .,CloudFront
CloudFront Client +9(!( ELB EC2 RDS CloudFront$%!&)#:0 CloudFront IP"'*<13
59 $ &#"1' CloudFront CloudFrontAWS WAF IP % ELB
EC2 RDS WAF IP % Client WAF !
60 4<3 526A.@6CB CloudFront Client CloudFront IP%9/1 ELB+ !#$(
;0 ELB EC2 RDS )7* &("'=: IP%9/1 WAF ELB !#$( IP %,>? -8''
61 1;0 3/5=928?> CloudFront( ! $:,. WAF ! $
ELB < :, CloudFront Client *6## ELB EC2 RDS CloudFront( &) +27- ! $" ' % WAF WAF &) +4! $'%" ELB < WAF
62 CloudFront
63 https://aws.amazon.com/jp/cloudfront-cdn/
64 https://aws.amazon.com/jp/cloudfront-cdn/
65 https://classmethod.jp/services/members/
66 https://classmethod.jp/services/members/
66 https://classmethod.jp/services/members/
67
68 • CDNCContents Delivery NetworkDWeb &?84/A7:<9; • Amazon
CloudFront2< @=- % -$ 3=-%-$*#+ 6> • , )"#')-(.!1 CloudFront 50 B