Advertisement
Advertisement

More Related Content

Slideshows for you(20)

Similar to Whole Site Delivery with Amazon CloudFront(20)

Advertisement

More from Amazon Web Services(20)

Advertisement

Whole Site Delivery with Amazon CloudFront

  1. Whole Site Delivery with Amazon CloudFront Alex Dunlap Sr. Manager, Amazon Web Services
  2. Agenda • What is Whole Site Delivery? • Why use CloudFront for Whole Site Delivery? • Demo • Customer Stories: – Stephen Evans, Toronto Star Newspapers – Irakli Nadareishvili, National Public Radio
  3. What is Whole Site Delivery?
  4. Personalized Website Example Dynamic Static
  5. Typical Website Architecture Dynamic Content www.example.com/*.php OR Elastic Load Amazon EC2 Custom Origin Balancing Static Content cdn.example.com/*.jpg OR Amazon S3 Custom Origin
  6. Whole Site Delivery with CloudFront Dynamic Content OR Amazon CloudFront Elastic Load Amazon EC2 Custom Origin www.example.com *.php Balancing Static Content *.jpg OR Amazon S3 Custom Origin
  7. Whole Site Delivery: Common Myths Myths… Debunked… • None of my HTML pages are cacheable. • Often, many pages are cacheable – e.g. search results pages. • My HTML pages are customized so • Use Cookies and Query Strings as those cannot be cached. cache keys – e.g. local weather pages. • My pages are personalized and unique • Network and path optimizations allow for each user, so a CDN won’t be useful. CloudFront to speed up dynamic content – e.g. personalized pages.
  8. Whole Site Delivery Use Cases • News • Weather • Sports • Social Media • Advertising • Travel • Stocks
  9. Why use CloudFront for Whole Site Delivery?
  10. Benefits of Whole Site Delivery with Amazon CloudFront Making your web applications……. Faster Scale Better More Available Easier to Manage Cost Less …by leveraging AWS’ presence at the edge of the Internet.
  11. CloudFront can make your web applications……. Faster Scale Better More Available Easier to Manage Cost Less
  12. Faster: The Performance Problem Long Distance + Poor Network = Slow Load Times
  13. Faster: How CloudFront Helps CloudFront helps change this equation to… Short Distance + Optimized Network = Fast Load Times
  14. Faster: Global CloudFront Network Europe Amsterdam (2) North America Dublin Ashburn, VA (2) Frankfurt (2) Dallas, TX (2) London (2) Hayward, CA Madrid Asia Jacksonville, FL Milan Hong Kong (2) Los Angeles, CA (2) Paris (2) Osaka Miami, FL Stockholm Singapore (2) Newark, NJ Tokyo (2) New York, NY (3) Palo Alto, CA Seattle, WA San Jose, CA South America South Bend, IN Sao Paulo Australia St. Louis, MO Sydney
  15. Faster: Optimized Network Paths Dynamic Content Low Latency TCP/IP Window Sizing Amazon CloudFront www.example.com *.php Static Content *.jpg Persistent Connections Monitored Network Paths
  16. CloudFront can make your web applications……. Faster Scale Better More Available Easier to Manage Cost Less
  17. Scale Better: How CloudFront Helps Caching static content at the Edge. Offloading connection set-up and SSL negotiation to the Edge. Persistent connections and collapse forwarding help scale your origin.
  18. CloudFront can make your web applications……. Faster Scale Better More Available Easier to Manage Cost Less
  19. More Available: How CloudFront Helps CloudFront is architected for high availability. Serve cached content even when origin is unavailable. Availability SLA.
  20. CloudFront can make your web applications……. Faster Scale Better More Available Easier to Manage Cost Less
  21. Easier to Manage: How CloudFront Helps No need to write any custom code. Multiple origins and cache behaviors make it easy to architect for whole site delivery. Self service signup and configuration via AWS Management Console and APIs.
  22. CloudFront can make your web applications……. Faster Scale Better More Available Easier to Manage Cost Less
  23. Cost Less: How CloudFront Helps Same price for dynamic and static content! Preferential pricing on origin fetches from S3 and EC2. NEW! CloudFront is less expensive than AWS Data Transfer (over 10 TB per month). Reserved Capacity Pricing for reduced rates with commitment.
  24. Configuring CloudFront for Whole Site Delivery Demo
  25. Demo
  26. Demo
  27. Demo
  28. Cloudfront @ The Toronto Star Stephen Evans Head of Digital Technology April 18, 2013
  29. About The Toronto Star • Canada’s largest daily newspaper • Focused on metro Toronto • 3.3 million monthly unique visitors • Small in-house digital group, technology team supported by vendors & corporate IT • Digital group run as “startup” within corporate structure • Tech stack includes Java, PHP, Ruby • Relaunched flagship site thestar.com on Adobe CQ5 on Jan. 30, 2013
  30. Why AWS? • Rebuild of thestar.com, tech team, hosting infrastructure • Evaluated various cloud-hosting options – capability, price • Ran short pilot phase • AWS clear overall winner in terms of flexibility, feature set, price • Began migration of smaller sites Spring 2012 • Ongoing migration culminating thestar.com January 2013
  31. Why CloudFront? • Evaluated CloudFront vs. various more established players • Cloudfront addressed all priority feature requirements • Validated performance claims via prelaunch load testing • Simplicity of configuration a clear advantage • Ambitious roadmap to release additional features • Clear price and pricing model advantages
  32. Architecture Cloudfront Elastic Load Balancer Production - US East Region VPC Dispatcher/Apache Dispatcher/Apache Dispatcher/Apache Amazon Linux 64 Bit Amazon Linux 64 Bit Amazon Linux 64 Bit C1 Medium C1 Medium C1 Medium Publish CQ/CRX Publish CQ/CRX Publish CQ/CRX Publish CQ/CRX Publish CQ/CRX Publish CQ/CRX Amazon Linux 64 Bit Amazon Linux 64 Bit Amazon Linux 64 Bit Amazon Linux 64 Bit Amazon Linux 64 Bit Amazon Linux 64 Bit C1-Xlarge C1-Xlarge C1-Xlarge C1-Xlarge C1-Xlarge C1-Xlarge Standby Master Author CQ/CRX Author CQ/CRX Amazon Linux 64 Bit Amazon Linux 64 Bit C1-Xlarge C1-Xlarge Availability Zone A Availability Zone B Availability Zone D
  33. Whole Site Delivery • Cache everything possible • No server side cookies written, only select pages pass query strings • Control caching granularly using 19 different rules • Use distributed load testing to validate performance against multiple Cloudfront edge locations • We use a single origin, but ELB and multi-tiered multi-AZ configuration on backend • Planning a multi-region DR architecture that will also leverage CloudFront
  34. Client Side Cookies
  35. Behaviours
  36. Success Metrics • 50% response time improvement • 99.99% uptime since relaunch (100% after launch day) • Business impact: lower hosting cost, improved consumer experience, SEO
  37. Lessons Learned • Understand the constraints of using a CDN and CloudFront specifically up front • Whole site caching presents unique challenges that are different from static asset caching – cookies, post requests • The CDN does not remove the need to ensure your origin is scalable and has its own caching tiers • Think about reporting requirements - how will you track usage? • Engage with the business on caching rules – what behaviours will be applied to what parts of your site?
  38. Thanks! Ping me sevans@thestar.ca @stephenaevans
  39. NPR: Whole Site Delivery Scaling npr.org for the Election Night '12 and beyond. Irakli Nadareishvili Director of Engineering, Digital Media, @NPR Twitter: @inadarei @NPRTechTeam
  40. Election Night: Olympics of the News Websites Irakli Nadareishvili @inadarei http://bit.ly/npraws
  41. Traffic Spike: Irakli Nadareishvili @inadarei http://bit.ly/npraws
  42. Preparation is Key Measure, Improve, Repeat. Irakli Nadareishvili @inadarei http://bit.ly/npraws
  43. Step 1: Measure https://github.com/npr/ec2-fleet Irakli Nadareishvili @inadarei http://bit.ly/npraws
  44. Bottlenecks: 1. Pipeline 2. Geography Irakli Nadareishvili @inadarei http://bit.ly/npraws
  45. Solution: Serve HTML through a CDN. ...but how? Irakli Nadareishvili @inadarei http://bit.ly/npraws
  46. Scalability: Every Second Counts Irakli Nadareishvili @inadarei http://bit.ly/npraws
  47. Pitfalls: 1. No user-specific content... Sortof. 2. Could not CDN API 3. Content expiration takes long time. Irakli Nadareishvili @inadarei http://bit.ly/npraws
  48. We Use Multiple CDNs Irakli Nadareishvili @inadarei http://bit.ly/npraws
  49. http://www.pbs.org/idealab/2013/03/ranking-the-slowest- loading-news-sites-and-how-they-can-speed-up074.html Irakli Nadareishvili @inadarei http://bit.ly/npraws
  50. Questions? Irakli Nadareishvili twitter: @inadarei NATIONAL PUBLIC RADIO http://bit.ly/npraws
  51. Resources Get Started at: http://aws.amazon.com/cloudfront/ Office Hours with CloudFront Engineers May 9th, 1 pm Eastern (10 am Pacific) Sign-Up: https://www2.gotomeeting.com/register/594793282
  52. Thank You! dunlap@amazon.com
Advertisement