Content Delivery
Using
Amazon CloudFront
Shared by: @sandeepkaur @amandeepsingh
Overview
● Define the term CDN
● Introduce CloudFront
● Illustrate how CloudFront
operates
● Review common Use
Cases for CloudFront
● Walk through case
Study
● Quiz
What is a CDN
A content delivery network(CDN) is a system of
distributed servers(network) that deliver webpages and
other web content to a user based on the geographic
location of the user.
What is a CDN
What is a CDN
What is a CDN
● Amazon CloudFront can be used to deliver your entire website,
○ including dynamic,
○ static,
○ streaming and interactive content
using a global network of Edge locations.
● CloudFront is optimized to work with other Amazon Web Services,
○ Amazon Simple Storage Service(Amazon S3),
○ Amazon Elastic Compute Cloud (Amazon EC2),
○ Amazon Elastic Load Balancing and
○ Amazon Route53.
● Amazon CloudFront also work seamlessly with any non-AWS origin
server, which store the original, definitive version of your files.
What is a CDN
CloudFront- Key Terminology
Edge Location: This is the location where the content will be cached. This is
separated to an AWS region and availability zones.
Origin: This is the origin of all the files that the CDN will distribute. This can be
either an S3 bucket, an EC2 instance, an Elastic Load balancer or Route53.
Distribution: This is the name given the CDN which consists of a collection of
edge locations.
● Web Distribution: Typically used for website.
● RTMP: Used for media streaming.
Amazon CloudFront uses a global network of 116 Points of Presence (105 Edge
Locations and 11 Regional Edge Caches) in 56 cities across 24 countries.
Amazon CloudFront Pricing
Amazon CloudFront Pricing
Amazon CloudFront Pricing
AWS no longer charging for AWS data transfer out to Amazon CloudFront.
Where can CloudFront help you?
● Static Content Use Cases:
○ Media Delivery (Video & Audio)
○ Software Download
○ Web Site Assets (Images, CSS, JS)
● Dynamic Content Use Cases:
○ News
○ Social media
○ Weather
○ Advertising
● Live Streaming
○ Sporting Events
○ Company Meetings
● Multiple Cache Behaviors
● Multiple Origin Servers
● Minimum Expiration
Period
● Query String Parameters
Dynamic Content
How we are using CloudFront for
optimized content delivery on Tokr
CloudFront @
About the
Tokr is the application which helps end users to
find the nearest weed dispensaries around their
area and allows them to claim deals if any. It
also allows the dispensaries to be registered
with the application so as to showcase their
products and help the audience to reach them
based on their personal preferences.
Technologies used:
- Angular JS
- Django Rest Framework
- AWS Infrastructure
Old Architecture
Web
Clients
Mobile
Clients
EC2 Instance
AWS S3
Bucket
RDS
MySql
Problem with old architecture
- Fails in Load testing when a number of users access the app simultaneously
- Single point of Failure
- SSL costing
- Slow response time
Architecture
AWS
CloudFront
Web
Clients
Mobile
Clients
AWS S3
Bucket
Elastic Load
balancer
EC2 App
instance
EC2 App
instance
RDS
MySql
trytokr.s3.amazonaws.com
Tokr-Ohio-EBD-xxxxxxxxxxxx.elb.us-east.com
https://www.trytokr.com
Origins
AWS Certificate Manager
Automatic SSL certificate
deployment and renewal
Static Resources
Dynamic Resources
Success stories with new architecture
- With the help of load balancer, load on the EC2 instances is equally divided
- With the help of Cloudfront, speed of the website has been improved by 40%
approximately
- 99.99% uptime since relaunch (100% after Launch day)
- Business impact: Lower hosting cost, improved consumer experience
CloudFront Distribution
CloudFront Origin
CloudFront Origin
CloudFront Cache Behaviours
CloudFront Cache Behaviours
CloudFront Origin
CloudFront Cache Behaviours
Any Question?
What types of content does Amazon CloudFront support?
How does Amazon CloudFront speed up my entire website?
Does Amazon CloudFront work with non-AWS origin servers?
Thank you.

Content Delivery Using Amazon CloudFront

  • 1.
    Content Delivery Using Amazon CloudFront Sharedby: @sandeepkaur @amandeepsingh
  • 2.
    Overview ● Define theterm CDN ● Introduce CloudFront ● Illustrate how CloudFront operates ● Review common Use Cases for CloudFront ● Walk through case Study ● Quiz
  • 3.
    What is aCDN A content delivery network(CDN) is a system of distributed servers(network) that deliver webpages and other web content to a user based on the geographic location of the user.
  • 4.
  • 5.
  • 6.
  • 7.
    ● Amazon CloudFrontcan be used to deliver your entire website, ○ including dynamic, ○ static, ○ streaming and interactive content using a global network of Edge locations. ● CloudFront is optimized to work with other Amazon Web Services, ○ Amazon Simple Storage Service(Amazon S3), ○ Amazon Elastic Compute Cloud (Amazon EC2), ○ Amazon Elastic Load Balancing and ○ Amazon Route53. ● Amazon CloudFront also work seamlessly with any non-AWS origin server, which store the original, definitive version of your files. What is a CDN
  • 8.
    CloudFront- Key Terminology EdgeLocation: This is the location where the content will be cached. This is separated to an AWS region and availability zones. Origin: This is the origin of all the files that the CDN will distribute. This can be either an S3 bucket, an EC2 instance, an Elastic Load balancer or Route53. Distribution: This is the name given the CDN which consists of a collection of edge locations. ● Web Distribution: Typically used for website. ● RTMP: Used for media streaming.
  • 9.
    Amazon CloudFront usesa global network of 116 Points of Presence (105 Edge Locations and 11 Regional Edge Caches) in 56 cities across 24 countries.
  • 12.
  • 13.
  • 14.
    Amazon CloudFront Pricing AWSno longer charging for AWS data transfer out to Amazon CloudFront.
  • 15.
    Where can CloudFronthelp you? ● Static Content Use Cases: ○ Media Delivery (Video & Audio) ○ Software Download ○ Web Site Assets (Images, CSS, JS) ● Dynamic Content Use Cases: ○ News ○ Social media ○ Weather ○ Advertising ● Live Streaming ○ Sporting Events ○ Company Meetings
  • 16.
    ● Multiple CacheBehaviors ● Multiple Origin Servers ● Minimum Expiration Period ● Query String Parameters Dynamic Content
  • 18.
    How we areusing CloudFront for optimized content delivery on Tokr CloudFront @
  • 19.
    About the Tokr isthe application which helps end users to find the nearest weed dispensaries around their area and allows them to claim deals if any. It also allows the dispensaries to be registered with the application so as to showcase their products and help the audience to reach them based on their personal preferences. Technologies used: - Angular JS - Django Rest Framework - AWS Infrastructure
  • 20.
  • 21.
    Problem with oldarchitecture - Fails in Load testing when a number of users access the app simultaneously - Single point of Failure - SSL costing - Slow response time
  • 22.
    Architecture AWS CloudFront Web Clients Mobile Clients AWS S3 Bucket Elastic Load balancer EC2App instance EC2 App instance RDS MySql trytokr.s3.amazonaws.com Tokr-Ohio-EBD-xxxxxxxxxxxx.elb.us-east.com https://www.trytokr.com Origins AWS Certificate Manager Automatic SSL certificate deployment and renewal Static Resources Dynamic Resources
  • 23.
    Success stories withnew architecture - With the help of load balancer, load on the EC2 instances is equally divided - With the help of Cloudfront, speed of the website has been improved by 40% approximately - 99.99% uptime since relaunch (100% after Launch day) - Business impact: Lower hosting cost, improved consumer experience
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 33.
    What types ofcontent does Amazon CloudFront support?
  • 34.
    How does AmazonCloudFront speed up my entire website?
  • 35.
    Does Amazon CloudFrontwork with non-AWS origin servers?
  • 36.