Download presentation
Presentation is loading. Please wait.
Published byEverett Ellis Modified over 9 years ago
1
Getting to 2nd Base with your Content Delivery Network Mike Brittain Engineering Architect
2
Overview 1. Measure your performance 2. Tweak your cache TTLs 3. Cache dynamic objects 4. Cache whole pages 5. Inspect origin hits 6. Use proper HTTP headers 7. Use multiple CDNs 8. Review CDN documentation 9. Engage your vendor
3
Overview 20 Minutes
4
Overview 1. Cache dynamic objects 2. Inspect origin traffic 3. Cache HTML pages
5
Typical Setup
7
CDN Storage $$$
8
Origin Pull CDN lingo for “reverse proxy”
9
Response Headers Cache-control: max-age=3600 Last-Modified: Mon, 16 Mar … ETag: “82c7-378-8e2a” http://www.askapache.com/htaccess/apache-speed-etags.html
10
Revalidation Requests GET /images/generated.css HTTP/1.1 Host: origin.example.com If-Modified-Since: Mon, 16 Mar … If-None-Match: ”82c7-378-8e2a” HTTP/1.1 200 OK Content-Length: 35043... or... HTTP/1.1 304 Not Modified $$$ $
11
Review Origin Logs RequestsURLSize 28/images/logo.gif2 KB 17/images/nav_tabs.png5 KB 4,613/images/annual_report.ppt16 MB 31/images/flames.gif13 KB
12
Avoid Double Paying 16 MB x 4,600 @ 0.35/GB ≈ $25 (CDN) 16 MB x 4,600 @ 0.50/GB ≈ $36 (origin) $61
13
Avoid Double Paying 16 MB x 4,600 @ 0.35/GB ≈ $25 (CDN) 16 MB x 23 @ 0.50/GB ≈ $0.18 (origin) $25 - ish
14
Cache HTML Pages
16
Page built just for Mike
17
Cache HTML Pages Serve generic version to the CDN Use client-side logic for personalization
18
Cache HTML Pages Replace generic sections with tailored versions Cookies, JavaScript
19
Cache HTML Pages Track short history of user interactions Fresh data only where needed Ajax, Cookies, JavaScript
20
Cache HTML Pages Use tracking pixels for page views Real time data with Ajax, or fake it Ajax, Cookies, JavaScript
21
Cache HTML Pages Search Results, HTML frag., Public APIs, XML, JSON, RSS Do you GET it?
22
Cache HTML Pages
23
TTLs of 3 mins to 1 hr Psst… under 60 seconds is okay, too.
24
Cache HTML Pages 92%
25
Thank You Slides, etc. www.mikebrittain.com Questions mike@mikebrittain.com
26
Wait… You’re still here?
27
No, seriously… go away!
28
HTTP Headers cURL, telnet, Charles, Fiddler, Firebug, etc.
29
CDNs Fail Plan B Split traffic between (similar) CDNs Origin servers Cloud storage
30
CDNs Fail
31
Amazon CloudFront: $0.17/GB* Rackspace Cloud Files: $0.22/GB JetS3t, Cyberduck, Transit, S3 Browser, S3Fox Plug-in, s3sync.rb, APIs, etc.
32
Multiple CDNs Cost vs. Performance Time Views
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.