You can't (yet) bend the law of Physics, but you can use the power of the cloud to design applications that run as fast as the speed of light! This session will focus on the best practices for optimizing performance to the very last millisecond. We'll dive into topics such as caching at every layer of your application, TCP optimizations, SSL optimizations, latency based routing, and much more. These best practices can help you to streamline your infrastructure utilization, improve performance and allow you to scale economically.
12. Singapore
Tokyo
DNS Resolver
Singapore
DNS response
d123.sin.cloudfront.net 1.2.3.4
DNS response
d123.cloudfront.net CNAME d123.sin.cloudfront.net
DNS query
d123.sin.cloudfront.net
TCP Connect 1.2.3.4
HTTP/1.1
GET /example.jpg
DNS query
d123.cloudfront.net
13. Tracing route to ns-sin2-01.cloudfront.net [204.246.164.22] over a maximum of 32 hops: 1 <1 ms <1 ms <1 ms 203.208.249.242 ... 6 13 ms <1 ms <1 ms ge-1-1-0-0.sngtp- ar6.ix.singtel.com [203.208.183.81] 7 32 ms 33 ms 33 ms so-3-1-2-0.hkgcw- cr3.ix.singtel.com [203.208.172.46] 8 31 ms 46 ms 32 ms ge-5-0-6-0.hkgcw- cr3.ix.singtel.com [203.208.152.121] 9 40 ms 35 ms 35 ms if-13-46.icore1.HK2- HongKong.as6453.net [116.0.67.17] 10 40 ms 35 ms 36 ms Vlan32.icore1.S9U- Singapore.as6453.net [116.0.83.1] 11 32 ms 32 ms 32 ms ix-12-3.icore1.S9U- Singapore.as6453.net [116.0.83.70] 12 * * * Request timed out. 13 * * * Request timed out. 14 33 ms 33 ms 33 ms 203.83.223.83 15 33 ms 33 ms 33 ms 204.246.164.22
Tokyo
Singapore
Hong Kong
14.
15. Singapore
DNS Resolver
Hong Kong
TCP Connect 5.6.7.8
HTTP/1.1
GET /example.jpg
DNS response
d123.cloudfront.net 5.6.7.8
DNS query
d123.cloudfront.net
Routing Engine Maps
Resolvers/Viewer Networks => Edge Location
Tokyo
5.6.7.8
Anonymous Latency measurements from real users
50. •HTTP runs on TCP/IP
•TCP has the concept of TCP handshake
•Every HTTP connection has to complete TCP handshake
51. Two Users Without an Edge Proxy
SYN
SYN-ACK
ACK
GET /index.jsp
ACK
SYN-ACK
GET /index.jsp
2nd User
Region
SYN
100ms
200ms
200ms
52. With CloudFront as an Edge Proxy
SYN
SYN-ACK
ACK
GET /index.jsp
ACK
-ACK
GET /index.jsp
Region
SYN
20ms
SYN
SYN-ACK
ACK
GET /index.jsp
GET /index.jsp
80ms
2nd User
200ms
120ms
71. 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Page Load Time (s)
Test Iteration
Oregon - Cache-able Base
Oregon - Final
0
0.5
1
1.5
2
2.5
3
3.5
4
1
2
3
Page Load Time (s)
Test Iteration
Oregon - Cache-able Base
Oregon - Final
72. 0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
1
2
3
Page Load Time (s)
Test Iteration
Tokyo - Cache-able Base
Tokyo - Final
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Page Load Time (s)
Test Iteration
Tokyo - Cache-able Base
Tokyo - Final
73.
74.
75.
76.
77.
78. Virginia -Baseline
Virginia -Final
% Improvement
1st Request
0.49s
0.43s
11.89%
Avg of Requests 2-20
0.40s
0.28s
27.18%
Oregon -Baseline
Oregon -Final
% Improvement
1st Request
3.50s
2.39s
31.75%
Avg of Requests 2-20
3.47s
0.47s
86.82%
Tokyo -Baseline
Tokyo -Final
% Improvement
1st Request
9.93s
2.32s
76.68%
Avg of Requests 2-20
9.53s
0.46s
95.99%
Tokyo -Final (Single Region)
% Improvement
1st Request
4.88s
52.93%
Avg of Requests 2-20
0.59s
93.60%
79. Please give us your feedback on this session.
Complete session evaluations and earn re:Invent swag.
http://bit.ly/awsevals