SlideShare una empresa de Scribd logo
1 de 17
Eric Winter
eric@webicus.com
webicus internet services
 Motivation
 Introduction to Amazon CloudFront
 Basic architecture
 How it works/how its used
 Operations – interacting with CloudFront
 Tools
 Demo
 Program using CloudFront
 Results
 The Jonas Brothers made me do it….
 Content management web site
 High number of (static) assets/page
 Geographically diverse users (but domestic only)
 Download time generally slow, with high variance
 Conclusion: Give it a try
 Why
 Improves site response time
 Easy to use
 Reduces response time variation
 Cheap as dirt
 Reliable
 Especially worthwhile if you have
 heavy content
 a weak server
 a geographically diverse audience
 Why not
 Yet another level of caching
 Some implementation/maintenance costs
 Motivation
 Introduction to Amazon CloudFront
 Basic architecture
 How it works/how its used
 Operations – interacting with CloudFront
 Tools
 Demo
 Program using CloudFront
 Results
 “Amazon CloudFront is a web service for content
delivery. It integrates with other Amazon Web Services
to give developers and businesses an easy way to
distribute content to end users with low latency, high
data transfer speeds, and no commitments.”
 CloudFront is a CDN (content distribution network)
 Tightly integrated with S3
 CloudFront is not S3
 S3 is designed to easily store data
 e.g. offsite backup
 S3 is the backend/system of record for CloudFront
 CloudFront is designed specifically to improve static
content delivery
 e.g. serving your home page images, css files, etc.
 Serving large files
 CloudFront moves your S3 content to the ‘edge’
geographically closer to your end user thereby
reducing latency
 SFO, VA, NYC, Ireland, Hong Kong
 Pull model
 Content pulled to edge upon first request
 Content expires in 24hrs (default)
 Edge server not aware of origin server content changes.
 Heavy static content served by CloudFront edge server
 Missing or expired content pulled from S3
 Original files go into an Amazon S3 bucket
 I recommend naming the bucket something obvious
like site.com and have it’s structure track your site’s
directory structure.
 Create a “distribution” to register that bucket with
Amazon CloudFront
 For simplicity structure the bucket w/ the same ACL
 Your static files are now available on CloudFront via
the distribution’s domain name.
 Motivation
 Introduction to Amazon CloudFront
 Basic architecture
 How it works/how its used
 Operations – interacting with CloudFront
 Tools
 Demo
 Program using CloudFront
 Results
 Firefox (plugins)
 S3Fox
 Firebug
 Pagespeed
 Yslow
 Asset references
 Migration tools
 Move content to S3
 Create a distribution
 Reference via CloudFront URL
 Ideally simple API to interact with CDN
 Seamlessly switch between local content and CDN
 Environment sensitive
 Would like to develop with local assets
 Would like to test with local and CDN (CloudFront)
assets
 May want multiple CNAMEs
 static1.example.com
 static2.example.com
 Etc.
 Private members
 private $useLocal = FALSE;
 private $numHostsMin = 0;
 private $numHostsMax = 3;
 private $sslHost = 'static%d.site.com';
 private $imgDir = 'images';
 private $jsDir = 'jscript';
 private $resourceDir = 'resources';
 private $cssDir = 'style';
 private $assetDir = NULL;
 private $forceTimestamp = TRUE;
 public methods
 Constructor (singleton)
 ENV and CDN_FORCE
 Each returns an URL
 setUseLocal($bool);
 image($assets, $options = array()) ;
 js($assets, $inline = true) ;
 css($assets) ;
 resource($assets) ;
 Usage:
 $cdn= new CdnHelper;
 $cdn->css(“style.css”);
 To S3
 S3Fox – very useful for quickly moving content to
S3/Cloudfront
 API/rails gems/capistrano – more stable way of
migrating content.
 To CloudFront
 CloudFront != S3 (sometimes)
 CloudFront expires in 24hrs by default
 CloudFront does not check S3 if asset is present on CF.
 Create new files and deprecate old ones
 Relatively high traffic site (8k unique visitors, 18k
pageviews/week)
 Dynamic PHP financial sector, mainly financial charts
 Page weight: 440k, 48 requests (lots of small images)
 Verio managed server
 Before
 6-8 seconds for typical page
 After
 1.5-2.5 seconds (as measured by pingdom.com)

Más contenido relacionado

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Destacado

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Usingamazoncloudfront forimprovedresponsetime-100916081009-phpapp01 (1)

  • 2.  Motivation  Introduction to Amazon CloudFront  Basic architecture  How it works/how its used  Operations – interacting with CloudFront  Tools  Demo  Program using CloudFront  Results
  • 3.  The Jonas Brothers made me do it….  Content management web site  High number of (static) assets/page  Geographically diverse users (but domestic only)  Download time generally slow, with high variance  Conclusion: Give it a try
  • 4.  Why  Improves site response time  Easy to use  Reduces response time variation  Cheap as dirt  Reliable  Especially worthwhile if you have  heavy content  a weak server  a geographically diverse audience  Why not  Yet another level of caching  Some implementation/maintenance costs
  • 5.  Motivation  Introduction to Amazon CloudFront  Basic architecture  How it works/how its used  Operations – interacting with CloudFront  Tools  Demo  Program using CloudFront  Results
  • 6.  “Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services to give developers and businesses an easy way to distribute content to end users with low latency, high data transfer speeds, and no commitments.”
  • 7.  CloudFront is a CDN (content distribution network)  Tightly integrated with S3  CloudFront is not S3  S3 is designed to easily store data  e.g. offsite backup  S3 is the backend/system of record for CloudFront  CloudFront is designed specifically to improve static content delivery  e.g. serving your home page images, css files, etc.  Serving large files
  • 8.  CloudFront moves your S3 content to the ‘edge’ geographically closer to your end user thereby reducing latency  SFO, VA, NYC, Ireland, Hong Kong  Pull model  Content pulled to edge upon first request  Content expires in 24hrs (default)  Edge server not aware of origin server content changes.
  • 9.  Heavy static content served by CloudFront edge server  Missing or expired content pulled from S3
  • 10.  Original files go into an Amazon S3 bucket  I recommend naming the bucket something obvious like site.com and have it’s structure track your site’s directory structure.  Create a “distribution” to register that bucket with Amazon CloudFront  For simplicity structure the bucket w/ the same ACL  Your static files are now available on CloudFront via the distribution’s domain name.
  • 11.  Motivation  Introduction to Amazon CloudFront  Basic architecture  How it works/how its used  Operations – interacting with CloudFront  Tools  Demo  Program using CloudFront  Results
  • 12.  Firefox (plugins)  S3Fox  Firebug  Pagespeed  Yslow  Asset references  Migration tools
  • 13.  Move content to S3  Create a distribution  Reference via CloudFront URL
  • 14.  Ideally simple API to interact with CDN  Seamlessly switch between local content and CDN  Environment sensitive  Would like to develop with local assets  Would like to test with local and CDN (CloudFront) assets  May want multiple CNAMEs  static1.example.com  static2.example.com  Etc.
  • 15.  Private members  private $useLocal = FALSE;  private $numHostsMin = 0;  private $numHostsMax = 3;  private $sslHost = 'static%d.site.com';  private $imgDir = 'images';  private $jsDir = 'jscript';  private $resourceDir = 'resources';  private $cssDir = 'style';  private $assetDir = NULL;  private $forceTimestamp = TRUE;  public methods  Constructor (singleton)  ENV and CDN_FORCE  Each returns an URL  setUseLocal($bool);  image($assets, $options = array()) ;  js($assets, $inline = true) ;  css($assets) ;  resource($assets) ;  Usage:  $cdn= new CdnHelper;  $cdn->css(“style.css”);
  • 16.  To S3  S3Fox – very useful for quickly moving content to S3/Cloudfront  API/rails gems/capistrano – more stable way of migrating content.  To CloudFront  CloudFront != S3 (sometimes)  CloudFront expires in 24hrs by default  CloudFront does not check S3 if asset is present on CF.  Create new files and deprecate old ones
  • 17.  Relatively high traffic site (8k unique visitors, 18k pageviews/week)  Dynamic PHP financial sector, mainly financial charts  Page weight: 440k, 48 requests (lots of small images)  Verio managed server  Before  6-8 seconds for typical page  After  1.5-2.5 seconds (as measured by pingdom.com)