CloudFront can be used for whole site delivery to make websites faster, better able to scale, more available, easier to manage, and less costly. It works by caching both static and dynamically generated content at edge locations close to users to provide low latency. Customers like the Toronto Star and NPR have used CloudFront for whole site delivery to improve performance during major traffic events and reduce hosting costs. Key aspects are configuring caching rules and handling cookies to take advantage of CloudFront's global edge network.
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
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
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
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
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
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.
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
40. Success Metrics
• 50% response time
improvement
• 99.99% uptime since
relaunch (100% after
launch day)
• Business impact: lower
hosting cost, improved
consumer experience, SEO
41. 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?
42. Thanks!
Ping me
sevans@thestar.ca
@stephenaevans
43. 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
51. 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
52. We Use Multiple CDNs
Irakli Nadareishvili @inadarei http://bit.ly/npraws
54. Questions?
Irakli Nadareishvili
twitter: @inadarei
NATIONAL PUBLIC RADIO http://bit.ly/npraws
55. 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