SlideShare a Scribd company logo
1 of 32
Getting to 2nd Base with your Content Delivery Network ,[object Object],[object Object]
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Overview 20 Minutes
Overview ,[object Object],[object Object],[object Object]
Typical Setup
Typical Setup
CDN Storage $$$
Origin Pull CDN lingo for “reverse proxy”
Response Headers ,[object Object],[object Object],[object Object],http://www.askapache.com/htaccess/apache-speed-etags.html
Revalidation Requests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],$$$ $
Review Origin Logs Requests URL Size 28 /images/logo.gif 2 KB 17 /images/nav_tabs.png 5 KB 4,613 /images/annual_report.ppt 16 MB 31 /images/flames.gif 13 KB
Avoid Double Paying ,[object Object],[object Object],[object Object]
Avoid Double Paying ,[object Object],[object Object],[object Object],- ish
Cache  HTML  Pages
Cache  HTML  Pages
Cache  HTML  Pages Page built just for Mike
Cache  HTML  Pages Serve generic version to the CDN Use client-side logic for personalization
Cache HTML Pages Replace generic sections with tailored versions Cookies, JavaScript
Cache HTML Pages Track short history of user interactions Fresh data only where needed Ajax, Cookies, JavaScript
Cache HTML Pages Use tracking pixels for page views Real time data with Ajax, or fake it Ajax, Cookies, JavaScript
Cache HTML Pages ,[object Object],[object Object],[object Object],[object Object]
Cache HTML Pages
Cache HTML Pages TTLs of 3 mins to 1 hr Psst… under 60 seconds is okay, too.
Cache HTML Pages 92%
Thank You ,[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object]
HTTP Headers cURL, telnet, Charles, Fiddler, Firebug, etc.
CDNs Fail ,[object Object],[object Object],[object Object],[object Object]
CDNs Fail
CDNs Fail ,[object Object],[object Object],JetS3t, Cyberduck, Transit, S3 Browser, S3Fox Plug-in, s3sync.rb, APIs, etc.
Multiple CDNs ,[object Object],[object Object],[object Object]

More Related Content

What's hot

Google BigQuery Best Practices
Google BigQuery Best PracticesGoogle BigQuery Best Practices
Google BigQuery Best PracticesMatillion
 
Multi model-databases 29-10-2014 LJC
Multi model-databases 29-10-2014 LJCMulti model-databases 29-10-2014 LJC
Multi model-databases 29-10-2014 LJCArangoDB Database
 
Real Time Data Analytics with MongoDB and Fluentd at Wish
Real Time Data Analytics with MongoDB and Fluentd at WishReal Time Data Analytics with MongoDB and Fluentd at Wish
Real Time Data Analytics with MongoDB and Fluentd at WishMongoDB
 
Webinar: Introducing the MongoDB Connector for BI 2.0 with Tableau
Webinar: Introducing the MongoDB Connector for BI 2.0 with TableauWebinar: Introducing the MongoDB Connector for BI 2.0 with Tableau
Webinar: Introducing the MongoDB Connector for BI 2.0 with TableauMongoDB
 
Making Sense of Time Series Data in MongoDB
Making Sense of Time Series Data in MongoDBMaking Sense of Time Series Data in MongoDB
Making Sense of Time Series Data in MongoDBMongoDB
 
Quick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloQuick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloSonja Madsen
 
Gtm server-side tagging. Why do we need it
Gtm server-side tagging. Why do we need it Gtm server-side tagging. Why do we need it
Gtm server-side tagging. Why do we need it YuliiaTkachova
 
Creating data centric microservices
Creating data centric microservicesCreating data centric microservices
Creating data centric microservicesArangoDB Database
 
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Sonja Madsen
 
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDBIntroducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDBMongoDB
 
An Introduction to MongoDB Compass
An Introduction to MongoDB CompassAn Introduction to MongoDB Compass
An Introduction to MongoDB CompassMongoDB
 
Big query the first step - (MOSG)
Big query the first step - (MOSG)Big query the first step - (MOSG)
Big query the first step - (MOSG)Soshi Nemoto
 
Teradata QueryGrid to MongoDB Lightning Introduction
Teradata QueryGrid to MongoDB Lightning IntroductionTeradata QueryGrid to MongoDB Lightning Introduction
Teradata QueryGrid to MongoDB Lightning IntroductionMongoDB
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations Shawn DeWolfe
 

What's hot (20)

Intro to Baqend
Intro to BaqendIntro to Baqend
Intro to Baqend
 
Datageeks
DatageeksDatageeks
Datageeks
 
Google BigQuery Best Practices
Google BigQuery Best PracticesGoogle BigQuery Best Practices
Google BigQuery Best Practices
 
Caching By Nyros Developer
Caching By Nyros DeveloperCaching By Nyros Developer
Caching By Nyros Developer
 
Multi model-databases 29-10-2014 LJC
Multi model-databases 29-10-2014 LJCMulti model-databases 29-10-2014 LJC
Multi model-databases 29-10-2014 LJC
 
Real Time Data Analytics with MongoDB and Fluentd at Wish
Real Time Data Analytics with MongoDB and Fluentd at WishReal Time Data Analytics with MongoDB and Fluentd at Wish
Real Time Data Analytics with MongoDB and Fluentd at Wish
 
Webinar: Introducing the MongoDB Connector for BI 2.0 with Tableau
Webinar: Introducing the MongoDB Connector for BI 2.0 with TableauWebinar: Introducing the MongoDB Connector for BI 2.0 with Tableau
Webinar: Introducing the MongoDB Connector for BI 2.0 with Tableau
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Using Embulk at Treasure Data
Using Embulk at Treasure DataUsing Embulk at Treasure Data
Using Embulk at Treasure Data
 
Making Sense of Time Series Data in MongoDB
Making Sense of Time Series Data in MongoDBMaking Sense of Time Series Data in MongoDB
Making Sense of Time Series Data in MongoDB
 
Quick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloQuick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins oslo
 
Gtm server-side tagging. Why do we need it
Gtm server-side tagging. Why do we need it Gtm server-side tagging. Why do we need it
Gtm server-side tagging. Why do we need it
 
Creating data centric microservices
Creating data centric microservicesCreating data centric microservices
Creating data centric microservices
 
Fluentd - Unified logging layer
Fluentd -  Unified logging layerFluentd -  Unified logging layer
Fluentd - Unified logging layer
 
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
 
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDBIntroducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
 
An Introduction to MongoDB Compass
An Introduction to MongoDB CompassAn Introduction to MongoDB Compass
An Introduction to MongoDB Compass
 
Big query the first step - (MOSG)
Big query the first step - (MOSG)Big query the first step - (MOSG)
Big query the first step - (MOSG)
 
Teradata QueryGrid to MongoDB Lightning Introduction
Teradata QueryGrid to MongoDB Lightning IntroductionTeradata QueryGrid to MongoDB Lightning Introduction
Teradata QueryGrid to MongoDB Lightning Introduction
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations
 

Viewers also liked

Take My Logs. Please!
Take My Logs. Please!Take My Logs. Please!
Take My Logs. Please!Mike Brittain
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentMike Brittain
 
Metrics-Driven Engineering
Metrics-Driven EngineeringMetrics-Driven Engineering
Metrics-Driven EngineeringMike Brittain
 
Metrics-Driven Engineering at Etsy
Metrics-Driven Engineering at EtsyMetrics-Driven Engineering at Etsy
Metrics-Driven Engineering at EtsyMike Brittain
 
Web Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyWeb Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyMike Brittain
 
Continuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYCContinuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYCMike Brittain
 
Continuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsContinuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsMike Brittain
 
Web Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyWeb Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyMike Brittain
 
Simple Log Analysis and Trending
Simple Log Analysis and TrendingSimple Log Analysis and Trending
Simple Log Analysis and TrendingMike Brittain
 
On Failure and Resilience
On Failure and ResilienceOn Failure and Resilience
On Failure and ResilienceMike Brittain
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsMike Brittain
 
From Building a Marketplace to Building Teams
From Building a Marketplace to Building TeamsFrom Building a Marketplace to Building Teams
From Building a Marketplace to Building TeamsMike Brittain
 
The Real Life Social Network v2
The Real Life Social Network v2The Real Life Social Network v2
The Real Life Social Network v2Paul Adams
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyMike Brittain
 
26 Disruptive & Technology Trends 2016 - 2018
26 Disruptive & Technology Trends 2016 - 201826 Disruptive & Technology Trends 2016 - 2018
26 Disruptive & Technology Trends 2016 - 2018Brian Solis
 

Viewers also liked (15)

Take My Logs. Please!
Take My Logs. Please!Take My Logs. Please!
Take My Logs. Please!
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous Deployment
 
Metrics-Driven Engineering
Metrics-Driven EngineeringMetrics-Driven Engineering
Metrics-Driven Engineering
 
Metrics-Driven Engineering at Etsy
Metrics-Driven Engineering at EtsyMetrics-Driven Engineering at Etsy
Metrics-Driven Engineering at Etsy
 
Web Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyWeb Performance Culture and Tools at Etsy
Web Performance Culture and Tools at Etsy
 
Continuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYCContinuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYC
 
Continuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsContinuous Deployment: The Dirty Details
Continuous Deployment: The Dirty Details
 
Web Performance Culture and Tools at Etsy
Web Performance Culture and Tools at EtsyWeb Performance Culture and Tools at Etsy
Web Performance Culture and Tools at Etsy
 
Simple Log Analysis and Trending
Simple Log Analysis and TrendingSimple Log Analysis and Trending
Simple Log Analysis and Trending
 
On Failure and Resilience
On Failure and ResilienceOn Failure and Resilience
On Failure and Resilience
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
 
From Building a Marketplace to Building Teams
From Building a Marketplace to Building TeamsFrom Building a Marketplace to Building Teams
From Building a Marketplace to Building Teams
 
The Real Life Social Network v2
The Real Life Social Network v2The Real Life Social Network v2
The Real Life Social Network v2
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
 
26 Disruptive & Technology Trends 2016 - 2018
26 Disruptive & Technology Trends 2016 - 201826 Disruptive & Technology Trends 2016 - 2018
26 Disruptive & Technology Trends 2016 - 2018
 

Similar to How to Get to Second Base with Your CDN

Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 8
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while savingmdc11
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningBrian Huff
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceArjan
 
W-JAX Performance Workshop - Web and AJAX
W-JAX Performance Workshop - Web and AJAXW-JAX Performance Workshop - Web and AJAX
W-JAX Performance Workshop - Web and AJAXAlois Reitbauer
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesDeeptiJava
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesStoyan Stefanov
 
AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for ScalabilityTuenti
 
Ajax For Scalability
Ajax For ScalabilityAjax For Scalability
Ajax For Scalabilityerikschultink
 
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax ApplicationsTSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applicationsguestc75cdc
 
Performance anti patterns in ajax applications
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applicationsSergeyChernyshev
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By DesignTim Morrow
 
Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018
Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018
Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018Amazon Web Services
 
Skalowalna architektura na przykładzie soccerway.com
Skalowalna architektura na przykładzie soccerway.comSkalowalna architektura na przykładzie soccerway.com
Skalowalna architektura na przykładzie soccerway.comSpodek 2.0
 
A little journey into website optimization
A little journey into website optimizationA little journey into website optimization
A little journey into website optimizationStelian Firez
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 

Similar to How to Get to Second Base with Your CDN (20)

Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while saving
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
W-JAX Performance Workshop - Web and AJAX
W-JAX Performance Workshop - Web and AJAXW-JAX Performance Workshop - Web and AJAX
W-JAX Performance Workshop - Web and AJAX
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status Codes
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
Website optimization
Website optimizationWebsite optimization
Website optimization
 
AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for Scalability
 
Ajax For Scalability
Ajax For ScalabilityAjax For Scalability
Ajax For Scalability
 
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax ApplicationsTSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
 
Performance anti patterns in ajax applications
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applications
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By Design
 
Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018
Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018
Building Your First Serverless Data Lake (ANT356-R1) - AWS re:Invent 2018
 
Skalowalna architektura na przykładzie soccerway.com
Skalowalna architektura na przykładzie soccerway.comSkalowalna architektura na przykładzie soccerway.com
Skalowalna architektura na przykładzie soccerway.com
 
A little journey into website optimization
A little journey into website optimizationA little journey into website optimization
A little journey into website optimization
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Speed!
Speed!Speed!
Speed!
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 

Recently uploaded

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

How to Get to Second Base with Your CDN

Editor's Notes

  1. Thanks So earlier this year I started kicking around ideas for a talk about CDNs, and I thought “How about I go through an outline of everything I’ve learned about CDNs over the last 4 years”?
  2. And then I got an email from Steve and Jesse saying… That sounds great!
  3. You’ve got 20 minutes. How’s that sound?
  4. And I said, “Perfect”. So this is the short version. I’m going to quickly talk about just a few topics that hopefully will be of use to you. I’m going to start with a little groundwork.
  5. In a typical setup for your CDN, your user makes requests for HTML pages directly to your web server. That page includes references to various other assets, like images, stylesheets, and javascript.
  6. Those assets are loaded from your CDN. Files delivered faster from the CDN because they are closer to your end user. Assuming that your CDN bandwidth is cheaper than bandwidth at your datacenter, you stand to save money by delivering content through the CDN. How do your files get onto the CDN?
  7. Traditionally, you would push your files onto the CDN’s storage network, avail to all cache servers. If you have frequently changing files, or are handling user-gen content, this can become a hassle. Additionally, you get billed for storage on the CDN.
  8. Instead, I prefer to use a service called origin-pull. This is CDN lingo for reverse-proxy. As users make requests for files from the CDN, the CDN fetches those files from your webserver (the origin) and then returns them to the end user. The CDN caches those files to handle subsequent requests without having to re-fetch from your server. The benefit is that you simply serve files from your origin server as you would if the CDN wasn’t in place. It’s like a transparent layer between you and your user.
  9. Now, you control your content in the CDN by setting response headers. You should already recognize these because you already use them to control content in the browser’s cache. They work the same for CDNs. An important point to be made about these headers is that they are pretty simple to configure for static files. This happens in your web server config. But for dynamic content, your application code is responsible for generating these headers. Let’s look at an example.
  10. This is the conversation that the CDN has with your server to re-fetch a file that has expired from cache. The CDN says, “I need a new copy of global.css, but only if it’s different than the version I already have.” Your origin server either says, “OK, here’s a new 35 K file”, or “no problem, just keep serving the latest version, which you already have in storage.” (ZERO K). If you’re not handling this negotiation in your application code, you’re wasting bandwidth, money, and time to re-send this file to the CDN every time it expires from the cache. So make sure you are handling revalidation properly for dynamic content.
  11. You should periodically review server logs for any files that are being accessed too often. These generally stick out pretty badly. Three cached, one not (unexpected file type added by editors) Server logs good for finding mis-configured headers (origin-pull) So is this a problem? It’s still being delivered to the user. BUT, we’re double-paying for delivery.
  12. See … we are paying for bandwidth to deliver from the CDN to the user, but we’re also paying for bandwidth from the origin server to the CDN. These prices are arbitrary, but they show a common scenario where CDN bandwidth is cheaper than origin bandwidth. It costs us more than double what it normally should to serve this from the CDN.
  13. So we go back and fix the caching headers for powerpoint files. Assuming a ratio of 200 cache hits to 1 miss, we see that the price of origin bandwidth becomes almost negligible. So look through your server logs, find bad caching, and avoid double paying for delivery.
  14. For the second half, I want to talk about caching HTML pages. Previously we looked at a setup where HTML was served directly from your web server, and images were served through the CDN. But now we’re going to use the CDN to cache HTML requests as well.
  15. Point your www hostname at CDN, and the CDN proxies those requests to your web server which we have renamed “origin”. Just like we did for images and other files, we need to specify caching headers for HTML that we serve from origin.
  16. So here’s a sample web page that we might want to cache. Your sites probably have some of these features: - Personalized content - User-feedback Real-time data This is a page built specifically for me. We obviously don’t want to cache my version of this page for the next 100 visitors to see. So how do we deal with this?
  17. We can take out the personalized sections and serve a generic page to the CDN, which then goes out to our users. Using logic on the client-side, we tailor the page for whoever is looking at it.
  18. We strip out my name from the page, and serve sign-up and registration links at the top of the page … even if I’m already signed in. Reading my username from a cookie, we can replace the sign-in links with our personalized welcome message. Similarly, store ad targeting details (demographic data) in a cookie and write in your ad tags on the client side.
  19. For many sites… users view a lot more pages than they interact with. Most pages will look fine even though they’re technically a few minutes old. Track a short history of these events and the pages where they occurred in a cookie. When a user returns to a page where they submitted some kind of update, use Ajax to fetch a fragment of HTML that can be used to overwrite that section of the cached page. These changes, however, won’t be obvious to other users until the version of the file on the CDN expires and then is updated from origin.
  20. It’s very easy to update view counts at the point when you generate an HTML page for a user, but when dealing with cached HTML you don’t generate most of those pages anymore. Use tracking pixels to log view counts to your origin server. When a user loads a cached version of the page, you can either use ajax to fetch the real-time count from your server, or just fake the increasing count on the client side.
  21. Once you’re running your www host through the CDN, there are suddenly a lot of requests that become candidates for caching. Search results, ajax responses, and public APIs can all potentially be cached, as long as you use GETs (and not POSTs) to retrieve them.
  22. If you’ve got large areas of your site that you would never want to cache, split them out to separate hostnames and serve those directly from your origin server. This way you page caching where you need it, and it’s not in the way where you don’t want it.
  23. For full page caching, I generally use expirations of between 3 minutes and an hour. TTLs should make sense for how often content might change on your pages, along with users expectations for change. Short TTLs are used for areas of the site that change often or where users are interacting. If you’re serving breaking news, stick to those short TTLs. Long TTLs can be used for pages that contain more general information.
  24. I highly recommend taking a look at this. On the last site where I used HTML caching, 92% of our pages were served directly from the CDN. Only about one of every ten requests hit our web servers, mostly for POSTs. That didn’t just save us money on bandwidth, it saved money that we would have otherwise invested in additional web servers to handle the traffic.
  25. So that’s what I have time for today. I’m planning to post additional information on my site… some tips that I couldn’t fit into this presentation. I’ll take questions for the remainder of the time. And of course, please feel free to ask questions later today or tomorrow.
  26. Take-aways: - Review objects you are serving by CDN, make sure they are caching -- especially headers for dynamic objects - Consider caching HTML pages -- talk to your vendor about it, let them help (find someone technical) - Add redundancy to your CDN delivery, plan for an outage - Look out for double paying for delivery. Last tip -- keep up with your vendor: - Review any documentation for juicey tips you missed the first time through. - Ask questions… talk to someone other than a sales person who can help you with implementation questions. - Ask for stuff. If you don’t like something about the service, reporting, or features, ask for them to add it (no matter how ridiculous) - Re-commit. If you are pushing more traffic than you initially committed to, ask for a price break in exchange for committing to a longer term. Thank you - hope it was useful. Slides available online, along with additional articles on my site. Some time for questions, but if you have anything that comes up after this, please don’t hesitate to find me afterward or send me email.
  27. Take-aways: - Review objects you are serving by CDN, make sure they are caching -- especially headers for dynamic objects - Consider caching HTML pages -- talk to your vendor about it, let them help (find someone technical) - Add redundancy to your CDN delivery, plan for an outage - Look out for double paying for delivery. Last tip -- keep up with your vendor: - Review any documentation for juicey tips you missed the first time through. - Ask questions… talk to someone other than a sales person who can help you with implementation questions. - Ask for stuff. If you don’t like something about the service, reporting, or features, ask for them to add it (no matter how ridiculous) - Re-commit. If you are pushing more traffic than you initially committed to, ask for a price break in exchange for committing to a longer term. Thank you - hope it was useful. Slides available online, along with additional articles on my site. Some time for questions, but if you have anything that comes up after this, please don’t hesitate to find me afterward or send me email.
  28. Will be talking about response headers, here is how to look at them if you’re not used to looking at these.
  29. A second CDN might also be cheaper… top-tier CDNs cost more money. This is a case I worked on a year ago, serving video content. Popularity spikes for new content (humps then decline) Business perspective, eyeballs on new content. Archives less important. Same could go for paid subscribers vs. free/anonymous users… or premium vs. user-generated. Videos with low viewership served from cheaper CDN, or from origin. Unpopular content and large files drops out of cache Avoid double paying.
  30. If no secondary CDN, then origin is your failover. Make sure you have the capacity. Outage earlier this year, this graph is of one of our app servers (doubles as origin). Traffic more than doubled. Note sharp drop for 10 minutes… users getting confused and leaving the site.
  31. Cloud storage: Super cheap option if you can handle pushing files into CDN storage. Both have CDNs in front. No contracts, pay as you go. $0.15 / GB storage ~300 MB site images, store for 5 cents. Site mostly running during an outage. Delivery prices (amazon is 0.22 in asia) Lots of tools available to help move files around. Can’t go wrong with these prices.
  32. A second CDN might also be cheaper… top-tier CDNs cost more money. This is a case I worked on a year ago, serving video content. Popularity spikes for new content (humps then decline) Business perspective, eyeballs on new content. Archives less important. Same could go for paid subscribers vs. free/anonymous users… or premium vs. user-generated. Videos with low viewership served from cheaper CDN, or from origin. Unpopular content and large files drops out of cache Avoid double paying.