This presentation provides practical guidance using external agent-based measurements and real user monitoring techniques. We review common content delivery network (CDN) architectures and how they relate to performance measurement. Finally, we walk through real-world CDN performance monitoring implementations used by MapBox, Amazon.com, and Amazon CloudFront.
2. Why Measure?
“For e-commerce sites, a one
second delay in web page
response time decreased
conversions by 7%”
Source: Aberdeen Group
Source: Compuware Gomez
3.
4.
5. What are they downloading?
Where are they?
How does that influence my
measurement?
32. var startTime = new Date().getTime();
var testObjectUrl = ”/test_object.png”;
//Measure round trip to the edge
<script /> $.ajax({
url: testObjectUrl,
success: function(data) {
var endTime = new Date().getTime();
publishMeasurement(endTime - startTime);
}
});
33. var startTime = new Date().getTime();
var testObjectUrl = ”/test_object.png”;
Request Test
Object //Measure round trip to the edge
$.ajax({
url: testObjectUrl,
success: function(data) {
var endTime = new Date().getTime();
publishMeasurement(endTime - startTime);
}
});
34. var startTime = new Date().getTime();
var testObjectUrl = ”/test_object.png”;
Wrapped in
JavaScript //Measure round trip to the edge
Timers*
Timers $.ajax({
url: testObjectUrl,
success: function(data) {
var endTime = new Date().getTime();
publishMeasurement(endTime - startTime);
}
});
*More Info on JavaScript timers: http://ejohn.org/blog/accuracy-of-javascript-time/
35. Real User Measurement
Customer Ease of Diagnostic
Experience Setup Data
Service-Side D B A
External C B B
Real User A C C+
37. Real User Measurement 1.0
Customer Ease of Diagnostic
Experience Setup Data
Service-Side D B A
External C B B
Real User A C C+
38. Real User Measurement 2.0
Customer Ease of Diagnostic
Experience Setup Data
Service-Side D B A
External C B B
Real User A C A
39. Measurement Summary
Customer Ease of Diagnostic
Experience Setup Data
Service-Side D B A
External C B B
Real User A C A
Get your customer experience metrics here
42. • Edge selection: connect time
• Cache server performance: FBL of hits
• Network performance: LBL of hits >100 KB
• Origin fetch: FBL of misses
43. • Edge selection: connect time
• Cache server performance: FBL of hits
• Network performance: LBL of hits >100 KB
• Origin fetch: FBL of misses
44. • Edge selection: connect time
• Cache server performance: FBL of hits
• Network performance: LBL of hits >100 KB
• Origin fetch: FBL of misses
45. • Edge selection: connect time
• Cache server performance: FBL of hits
• Network performance: LBL of hits >100 KB
• Origin fetch: FBL of misses
46. ~1 KB 100 KB+
2 to 3 Round Trips 7 to 8 Round Trips
0-1 DNS Lookup 0-1 DNS Lookup
1 TCP Connect 1 TCP Connect
1 Object Download 6 Object Download
Tests Client to Edge Latency Tests Client to Edge Latency & Network Quality
47. DNS Lookup TCP Connect Edge Cache Client Cache
Viewer-Driven Bust Prime Bust
DNS rotation example: Two-requests example: Query string example:
test1.example.com GET /test_100k.png GET /test_100k.png?ver=1
test2.example.com GET /test_100k.png GET /test_100k.png?ver=2
Prime Viewer-Driven
Two-requests example: One-request example:
test.example.com GET /test_100k.png
test.example.com
Bust
One-request w/ CDN
Config example:
GET /test_100k.png?ver=1
89. Maps as Utility
• Foursquare
• Weather (WDT, USA Today)
• Airplane pilot maps (foreflight)
90. Maps as Utility
• Our customers maps are critical elements of
their service
• No maps isn’t an option for them
91. On AWS from the Start
• Benchmarking the whole time
• For example: `c1.xlarge` is our sweet spot
• We tried everything…
• …with every configuration we could think of
92. On AWS from the Start
• Use Amazon Cloudfront as our CDN
• Got business pressure to switch...
• So, we benchmarked (Jan/Feb 2012)
105. Do Less
• If-Modified-Since
• CDN has an expired item, it checks back with
the origin
• Origin says "oh, you can keep using that“ –
Just headers
106. Do Less
• Ability to independently quickly query metadata
for resource components
• Know validity before loading full resource
• Sometimes this is dismissed as impractical,
more often worth the work
122. #reinvent
We are sincerely eager to
hear your feedback on this
presentation and on re:Invent.
Please fill out an evaluation
form when you have a
chance.