1 / 32

Maximizing Content Delivery Network Performance: Tips and Tricks from Mike Brittain

Learn how to optimize your content delivery network (CDN) performance with tips from engineering architect Mike Brittain. Discover ways to measure performance, tweak cache settings, inspect origin hits, and use proper HTTP headers. Explore the benefits of using multiple CDNs and engage with your vendor for optimal results.

bradberrym
Download Presentation

Maximizing Content Delivery Network Performance: Tips and Tricks from Mike Brittain

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting to 2nd Base with your ContentDelivery Network • Mike Brittain • Engineering Architect

  2. Overview Measure your performance Tweak your cache TTLs Cache dynamic objects Cache whole pages Inspect origin hits Use proper HTTP headers Use multiple CDNs Review CDN documentation Engage your vendor

  3. Overview 20 Minutes

  4. Overview Cache dynamic objects Inspect origin traffic Cache HTML pages

  5. Typical Setup

  6. 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

  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

  15. Cache HTML Pages

  16. Cache HTML Pages 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. Cache HTML Pages 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. CDNs Fail 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 • Views • Time

More Related