cloudfront 소개 및 데모 – 이수형 수석 (solutions architect),...
DESCRIPTION
2013년 10월 8일 COEX에서 열렸던 "Amazon CloudFront로 컨텐츠 배포하기" Lunch & Learn 세미나에서 아마존웹서비스코리아의 이수형 수석이 발표한 자료입니다.TRANSCRIPT
AGENDA
• Why do you need a CDN? • Amazon Cloudfront – Introduction • Architecting with Amazon Cloudfront • Amazon Cloudfront – Features • Amazon Cloudfront – Case Studies • Amazon Cloudfront – Demo • Amazon Cloudfront – Benefits
WHY DO YOU NEED A CDN?
Rising consumption of content for longer time across an ever-growing
range of devices
Expectation for excellent performance – no buffering, loading or delays
Explosion of online video consumption
Limit storage and delivery costs
Increased global broadband penetration requires serving a widely dispersed
audience
Industry trends & common challenges for content providers
AMAZON CLOUDFRONT The AWS Content Delivery Solution
CloudFront Edge Loca:ons
S3 bucket or custom origin with content
Data transfer of cached content to end user (if cached)
End-user requests content
Data transfer of content to CloudFront edge location to cache
Cached copies of objects
If content not cached – object requested from origin
1 2
3 4
Request routed to most optimal edge location
How CloudFront Works: Non-Cached Object
6
How CloudFront Works: Cached Object
7
CloudFront Edge Loca:ons
S3 bucket or custom origin with content
Data transfer of cached content to end user (if cached)
End-user requests content
Cached copies of objects
1
2
Request routed to most optimal edge location
CloudFront in a Nutshell • Low latency: Improves content load times
• High bandwidth: Enables high bit rate HD video and other bandwidth-heavy applications
• Redundant: Eliminates single points of failure
• Scalable: Ensure great experience as number of end users grows
• Global: Worldwide network provides great experience regardless of geography
• Cost-effective: Pay as you go model provides flexibility for your business
8
Need: Scalability
9
0
10
20
30
40
50
60
70
80
8:00 AM 9:00 AM 10:00 AM 11:00 AM 12:00 PM 1:00 PM 2:00 PM 3:00 PM 4:00 PM 5:00 PM 6:00 PM 7:00 PM 8:00 PM 9:00 PM
Volume of Data
Delivered
(Gbp
s)
Peak usage over 60 Gbps
Example: Video banner ad customer
the cloud provides a beHer way instant elasticity
no upfront capital expense
extensive partner
ecosystem
complete platform of services to
support hosting, processing, storage
and delivery
global infrastructure
ARCHITECTURE Where does Amazon CloudFront figure in the AWS platform?
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administra:on
Networking
AWS PlaOorm
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administra:on
Networking
Content Delivery Solu:on
Global infrastructure
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administra:on
Networking
AWS uses a Super-‐POP architecture for our CDN network, with larger edge loca:ons strategically placed at internet exchange points (IXPs) to enable more efficient cache storage and quick transfer between ISPs
Ver:cal Scaling From $0.02/hr
Elas:c Compute Cloud (EC2)
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administra:on
Networking
Low Cost Mul:ple pricing op:ons, pay only for resources used
ElasHc Easily scale up & down automa:cally
Secure Secure and durable technology plaOorm with industry-‐
recognized cer:fica:ons and audits
Highly Available Highly reliable services and mul:ple fault-‐tolerant Availability
Zones
Integrated with CloudFront In-‐Region Data Transfer enables lower cost than S3/RRS + any
other CDN
Simple Storage Service (S3) Highly Scalable Object Storage Unlimited storage of objects of any type
MulHple Storage OpHons Lower costs with Reduced Redundancy Storage (RRS) by storing non-‐cri:cal, reproducible data at lower levels of
redundancy
Reliable 99.999999999% durability for S3
99.99% durability for RRS
Secure Secure and durable technology plaOorm with industry-‐
recognized cer:fica:ons and audits
Highly Available Access through CDN or directly
Integrated with CloudFront In-‐Region Data Transfer enables lower cost than S3/RRS + any
other CDN
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administra:on
Networking
Objects in S3
Peak Requests:
1.1 million+ per secon
d
99.999999999% Durability
2.9 Billion 14 Billion 40 Billion 102 Billion 262 Billion
762 Billion
1.7 Trillion
2. Trillion
Q4 2006 Q4 2007 Q4 2008 Q4 2009 Q4 2010 Q4 2011 Q4 2012 Q2 2013
London
Paris
NY
CloudFront
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administra:on
Networking
Fast Global Delivery
Worldwide network of edge loca:ons
Top performance, as defined by internal, 3rd party and customer tes:ng
Easy to Use
Via API or Web Console
Whole Site Delivery
Accelera:on for sta:c and dynamic content
AWS IntegraHon
One piece a complete plaOorm of cloud services
Transparent Low Pricing
Mul:ple pricing op:ons
FEATURES
Key features commoditised for one flat price • Static and Dynamic HTTP delivery • HTTP/HTTPS File Delivery • Live and Video on Demand Adaptive Bitrate and RTMP Streaming • Low Minimum Content Expiration Periods (Zero seconds) • AWS Management Console Support • Full control via APIs • Programmatic/Console Invalidation • Industry-compliant, detailed Access Logs • Private Content for Increased Security • Price Classes for Cost Optimization • Cookie Support
20
Amazon CloudFront
Whole site delivery Support for acceleration of static (images, video, css, js, etc.) and dynamic content
AWS provides…
What do content providers require of a CDN?
Elastic Load Balancing
Amazon CloudFront
Dynamic Content
Amazon EC2
Static Content
Amazon S3
User to CloudFront Routing based on lowest latency
CloudFront to Origin TCP Optimizations
Persistent connections Network paths monitored for performance
Dynamic Content Support
22
Dynamic content is the interactive or personalized portion of a website, created on-the-fly for each end user • News • Weather • Sports • Social media • Advertising • Travel
Dynamic Content Support
• Simple DIY configuration with web console
• No consultants to hire, No proprietary languages to learn Simple to Use
• Connections to AWS regions closely monitored
• Standard AWS resources (like CloudFormation)
• Designed to work with origins in Amazon EC2
AWS Integration
• No additional charges or set up fees
• Pay only for requests and data transfer Low Cost
• Mul:ple Cache Behaviors, Minimum Expira:on Period • Mul:ple Origin Servers Origin Connec:on Protocol, Query String Parameters • Viewer Connec:on Protocol · Cookie Support
Features
CASE STUDIES
쿠키런 by Devsisters using S3 & CloudFront
Problem
Limited IT opera:on resource and unknown requirements for bandwidths and requests
SoluHon
Used S3 for all its patches and other sta:c contents. Used CloudFront edge to accelerate the delivery.
Business Benefits
Moving to S3 + CloudFront resulted in an improved performance & availability
Problem
Need to reduce IT costs for new applica:on
SoluHon
AWS’s low, pay-‐as-‐you-‐go pricing & reliable services
With every user’s request, the Smart Hub applica:on authen:cates devices, delivers apps and content, and pushes no:fica:ons across mul:ple devices
Business Benefits
Opera:onal efficiencies, conver:ng capex to opex, new revenue opportuni:es
Samsung runs its Smart Hub application on AWS, saving $34M
NASA JPL Delivers Content from Mars
Problem
A massive sudden increase in web traffic was expected for live coverage of the Mars Explora:on Rover Curiosity landing
SoluHon
NASA JPL u:lized AWS to support website, image and live video delivery to hundreds of thousands of current visitors
Business Benefits
Opera:ng the mars.jpl.nasa.gov website on AWS allowed NASA JPL to broadcast their message to the world and provide an excellent experience for an online viewing audience larger
than the Olympics
Use of AWS
Use Amazon CloudFront to serve game downloads to users across the globe
Business Benefits
Amazon.com’s Video Games Download Store used CloudFront to improve download performance and the overall customer
experience
TesHmonial “Delivery via Amazon CloudFront allows you to download video games and quickly as your broadband connec:on
allows. Customers using a high speed, broadband internet connec:on can see up to an 8x increase in download speed.”
Amazon.com Video Game Downloads accelerated through CloudFront
AWS Reliable Infrastructure Makes It Easier to Focus on Other Tasks
Problem
High error rates and performance issues with their exis:ng CDN provider
SoluHon
Migrated the majority of PBS videos to Amazon S3 storage and delivered them via Amazon CloudFront
Business Benefits
Moving to S3 + CloudFront resulted in a 50% lower error rate and improved performance
Video TesHmonial
hHp://www.youtube.com/watch?v=l2990XEC-‐Cw
“As with all the AWS services we leverage, using Amazon CloudFront is so simple and reliable that the team doesn’t
have to think about it. It all just works, freeing us to focus on building cool applica:ons.”
Earth Networks reduces cost, but not performance
Use of AWS
Earth Networks uses Amazon CloudFront’s dynamic content features to customize the user experience by distribu:ng local
informa:on to millions of users in near-‐real :me.
Business Benefits
Saved over 50% in CDN costs and an:cipates 20% reduc:on in EC2 origin instances without any reduc:on in performance or
need to write custom code.
TesHmonial
“With CloudFront’s strong performance, ease of use and flexibility, our team can use the API or the console to quickly make changes to our CDN configura:on and see the updates within minutes. And with the low cost of delivering dynamic content using CloudFront, we expect to see significant cost
savings as well.”
DEMO
London
Paris
NY
CloudFront Whole Site Accelera:on
Simple to use DIY configura:on with Web Console or API
No consultants to hire
No need to write custom code
AWS IntegraHon Designed to work with origins in Amazon EC2
Connec:ons to AWS regions closely monitored
Standard AWS resources (like CloudForma:on)
Cost effecHve No addi:onal charges or setup fees
Same rates for dynamic and sta:c content
London
Paris
NY
Content Delivery Architecture
Single CNAME cf-‐behaviors.coolnick.co.kr
1
Served from EC2 /php/*.php
2
Served from S3 /images/*.jpg
3
© 2011 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon Whole Site Delivery for Websites Delivery of your entire website via CloudFront Fast performance using reliable AWS network connections Simple, self-configuration using API or Management Console Cost-effective with no minimum commits or required long-term contracts
Client to CloudFront connections:
Routing based on lowest latency
Persistent connections
TCP optimizations
CloudFront to origin server connections:
Persistent connections to each origin Concurrent requests collapsed to a single origin request Connection to AWS origins over Amazon monitored networks
CloudFront Edge Locations:
Multiple layers of caching inside each edge location
Mobile Clients
Browsers/Desktop Clients
Tablets/Devices
minTTL = 86400 query strings = false cookies = none trusted signers = false viewer protocol = allow-all
*.jpg Amazon S3
minTTL = 0 query strings = true cookies = phpsessid trusted signers = true viewer protocol = allow-all
*.php Route 53 ‡
minTTL = 900 query strings = true cookies = all trusted signers = false viewer protocol = allow-all
/ads/* Route 53 ‡ Custom Origin
Amazon Elastic Compute Cloud
Amazon Elastic Load Balancing
Alternate AWS origin configuration ‡
Route 53 with Latency Based Routing
EC2/ELB in US East (N. Virginia)
EC2/ELB in EU West (Dublin, Ireland)
EC2/ELB in AP Southeast (Singapore)
Optional component ‡
CloudFront abc123.cloudfront.net
Route 53 www.mysite.com
‡
Live and VOD Streaming
Support for all device types HTTP protocols -‐ HDS, HLS, Smooth Streaming
RMTP (VOD only)
Simple to configure Live streaming stack managed through
CloudForma:on script VOD -‐ upload .flv to S3, stream via RTMP
Flexible
Full control over streaming origin enables freedom to enable and configure supported features
Static Content Delivery " S3 – Static webpage
without a webserver – demo
" Route53 for DNS setup – A-records and CNAMEs
" CloudFront – Static content delivery
Dynamic Content Delivery " Elastic Load Balancing,
Mutliple origins, Multiple behaviors, Invalidation support
" Bonus demo by REDLAB – Live / VoD streaming with CloudFront
Demo Setup and Demo
Thank You.
Nick Lee (이수형 수석) | Solu:ons Architect | [email protected]