SlideShare a Scribd company logo
Using Content Delivery Networks
with Drupal
TriDUG – March 2015
What areCDNs
A content delivery network or content distribution
network (CDN) isalarge distributed system of
serversdeployed in multipledatacentersacrossthe
Internet. Thegoal of aCDN isto servecontent to
end-userswith high availability and high
performance.
Traditional Delivery
Theserver in theimage
representseither a
singleserver or asingle
datacenter with aproxy
front end (e.g. Varnish /
nGinx )
CDN Delivery
Theseserversrepresent
different datacenters
that can belocated in
different areasof the
world.
Clientsget served
information from the
best site.
Why UseaCDN
● Increasethenumber of usersthat can accessthesite
without degradation.
● Ensurequality user experienceby having all or parts
of apageloaded from serverscloseto them
● Lower theimpact of usersaccessing largefiles
CDN Basics
● Theterm origin refersto thesourceserver
● CDN clustersinstancesaredefined by aspecial DNS
host name, e.g. <dist id>.cloudfront.net
● TheCDN'sDNSentry will berouted thru an
(expensive) load balancing routing system that
determinesthebest server to servicetherequest.
● DNSsettingsand URL rewriting areused to cause
clientsto get theinformation from thecluster.
● Filescached on theCDN all have“expiration” times
that can beset/controlled in variousmanners.
Anatomy of A CDN Request
● Client browser requestsaCDN cached fileviaan
embedded URL or just entering theURL.
● TheCDN'sload balancing routerswill determinetheCDN
server to usebased on clientslocation, etc.
● TheCDN server selected looksto seeif thisfileexists.
● If thefileexists, it checksthe“expiration” date.
● If thefileexistsand hasnot expired, it returnsthecache
version. Theorigin server doesno work.
● Otherwise, if possible, theCDN will ask theorigin server
for afresh copy of thefileand send it to theclient.
CDN Services
● Akamai Technologies
● Amazon CloudFront
● WindowsAzureCDN
● EdgeCast Networks
● RackspaceCloud Files
● Vimeo
● YouTube
● ...and many more
Selecting aCDN Service
● Dependson your needs, e.g. Mediaonly, web only,
and thelike.
● Regionsyou need served.
● Dependson theclient'spricerangeand quality of
serviceneeds.
● HTTPSsupport / costs
(Note: Googleand other search enginesarestarting to
givepreferenceto sitesthat areavailableviaHTTPS)
Common waysCDNs
areused with Drupal
● Mediaand largefiledelivery (e.g. YouTube, Vimeo,
and others)
● Static filedelivery (CSS, Images, JS, and thelike)
● Full anonymoussitecaching
MediaDelivery
● SiteDNSpointsto origin
● Content pointsto CDN DNS
when needed
● Filesareadded viaCDNsadmin
interface
Pros
● Largefilesdelivered efficiently
● Normal Drupal behavior
Cons
● CDN delivered filesmay haveto
bemanually set up/managed.
Static FileDelivery
● SiteDNSpointsto origin
● CDN modulecan automatically
rewritestatic URLsto CDN
DNS
● Filesareautomatically cached
Pros
● Server load reduced
● Set and (almost) forget
Cons
● Can beadelay updating files
that areREPLACED.
Full SiteDelivery
● SiteDNSpointsto CDN cluster
● No special moduleslikeCDN
needed, filesareautomatically
added to thecache.
Pros
● Supportsmost clientswith least
impact on origin
Cons
● Morecomplex set up
● Need to defineprocessesto allow
content managersto refresh
updated content
Challengesto using CDNsand Drupal
● CDNsservecached content based on URLs
● User based Drupal sitescan havedifferent content
displayed using thesameURL, e.g. /user
● Content editorswant to seechangesimmediately
and not wait for cacheto refresh
● Network managerswant cacheto last along timeto
lower server load
Selecting aCDN mode
A quick ruleof thumb for deciding between Full site
delivery and Static filedelivery is:
● Doesyour sitesupport individual users?
Yes- UseStatic filedelivery
No – UseFull site
Note: CDNsalso havevarioussettingsthat may let
you createahybrid site, e.g. deliver certain areasvia
CDN but let Cart or Forum or... areasbestatic only.
SomeUseful Modules
● CDN isuseful for setting up static fileservices
http://drupal.org/project/cdn
● CloudFront Refresh (my module:) )
http://drupal.org/sandbox/cgmonroe/2454357
● AdvancedAggregation – Doesabetter job of css
and javascript aggregation
http://drupal.org/project/advagg
A CaseStudy
● A collegehasacoach who lovesto set sports
records... likeaplayer scoring 130+ point in agame,
which leadsto massiveload on their main web site.
● Thecommunicationsdepartment isvery proactivein
updating thecontent and want visitorsto seethings
immediately
● Themain websiteisaccessed by anonymoususers
with theexception of variouscontent manager
● They want to support HTTPSto get the“Google”
ranking boost.
Strategy Used
● UseCloudFront CDN serviceasafull sitedelivery
service.
● UseServer NameIndication Certificatesto allow
HTTPSon multipleDNSnames
● Use“origin” DNSentry to bypassCDN for content
editors
● Writeacustom moduleto allow content to easily be
refreshed on theCDN cluster
Set up CloudFront Distro
Set up CloudFront Distro
Set UpApplicationAWSUser
Set up DNS
● Thewww.college.edu siteisset up with aCNAME
entry thepointsto theCloudfront.net DNSentry
● The“edit” siteusesorigin.college.edu and pointsto
theserver'sIPaddress
Setup theCertificates
● Get and SNI SSL certificatewith all theDNSnames
you want thesiteto beknown as. E.g.
origin.college.edu and www.college.edu
● Install thecertificateon theAmazon CF Distribution
(seeAmazon docs)
● Install thecertificateon theorigin server
.htaccessSetup
To set aspecific expiresheader / time... look for thesection likethisand modify asneeded.
NOTE: Drupal pagesexpiretimebased on Pagecachetimesetting in config->devel-
>performance.
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Short expires for testing.
  ExpiresDefault "access plus 1 minutes"
  <FilesMatch .php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers setby mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non­Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>
.htaccessSetup
Redirect login'sto origin site:
 # Redirect logins to non­CDN site
  RewriteCond %{HTTP_HOST} !^origin.college.edu [NC]
  RewriteRule ^user/login$ https://origin.college.edu/user/login [R=301,L]
  RewriteCond %{HTTP_HOST} !^origin.college.edu [NC]
  RewriteRule ^user$ https://origin.college.edu/user [R=301,L]
.htaccessSetup
If you usecustom fonts, you will need to prevent CORS
security errors, usethefollowing. NOTE: needsto be
tweaked if you want to limit to specific sites.
<IfModule mod_headers.c>
   Header set Access­Control­Allow­Origin *
#  SetEnvIf Origin "^(.*.college.edu)$" 
ORIGIN_SUB_DOMAIN=$1
#  <FilesMatch ".woff$">
#    Header set Access­Control­Allow­Origin "%
{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
#  </FilesMatch>
</IfModule>
Settings.php Setup
Thefollowing codeletstheCDN support HTTPS. Needsto bein
thesettings.php file.
if (isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) &&
     $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] == 'https') {
  $_SERVER['HTTPS'] = 'on';
  $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
}
// The following are only needed if the 'non­CDN' site can be 
// accessed by more than 1 host name E.g., initially an internal
// DNS entry and then moved to a client DNS entry.
if ( isset($_SERVER['HTTP_HOST']) && 
      $_SERVER['HTTP_HOST'] == 'college­origin.longsight.com') {
  $_SERVER['HTTP_HOST'] = 'origin.college.edu';
}
Setup CloudFront Refresh Module
● Get thenew CloudFront Refresh modulefrom itssandbox:
http://drupal.org/sandbox/cgmonroe/2454357 
● Get dependancies:
http://drupal.org/project/libraries(if needed)
http://drupal.org/project/awssdk
● Follow theCloudFront Refresh install instructions
CloudFront Refresh
● Tracksupdated nodesand
sendsinvalidaterequest
when sitecacheiscleared
● Allowsmanually entering
URL to refresh non-html
files
● Statuspageto track refresh
requests
● Someother codeto improve
CDN hit rates
Results
● Entiresiteisserviced viaCDN with low hit rateon
main server
● Fast responseeven under load
● Content editor can instantly seethechangesthey are
editing becauseloginsget redirected to theorigin
site.
● CloudFront Refresh modulemakeiseasy for
updatesto be“pushed” out to CDN.
SomeTroubleshooting/Testing Tips
● curl -I -L http://www.college.edu/<path>
Thisgetstheheadersfor thepath with expiretimeand other
information. For example, you can check theexpiretimeon
pagescoming from theorigin server.
● Chrome/ Firebug network load tab
Thiscan beused to determinewhat isbeing loaded from
which server (or not being loaded).
● Think ahead.
CDNsaresimilar to DNSserverswith propagation delays. If a
siteisgoing to havemajor changes, set theorigin expiretime
to alow valueaday or so before.
Questions?

More Related Content

What's hot

Gluster Webinar: Introduction to GlusterFS
Gluster Webinar: Introduction to GlusterFSGluster Webinar: Introduction to GlusterFS
Gluster Webinar: Introduction to GlusterFS
GlusterFS
 
AWS Workshop 101
AWS Workshop 101AWS Workshop 101
AWS Workshop 101
lynn80827
 
Hadoop Meetup Jan 2019 - Hadoop On Azure
Hadoop Meetup Jan 2019 - Hadoop On AzureHadoop Meetup Jan 2019 - Hadoop On Azure
Hadoop Meetup Jan 2019 - Hadoop On Azure
Erik Krogen
 
caching2012.pdf
caching2012.pdfcaching2012.pdf
caching2012.pdf
KarthikS573262
 
Evaluating NoSQL Performance: Time for Benchmarking
Evaluating NoSQL Performance: Time for BenchmarkingEvaluating NoSQL Performance: Time for Benchmarking
Evaluating NoSQL Performance: Time for Benchmarking
Sergey Bushik
 
Globus Endpoint Setup and Configuration - XSEDE14 Tutorial
Globus Endpoint Setup and Configuration - XSEDE14 TutorialGlobus Endpoint Setup and Configuration - XSEDE14 Tutorial
Globus Endpoint Setup and Configuration - XSEDE14 Tutorial
Globus
 
Multi-Region Cassandra Clusters
Multi-Region Cassandra ClustersMulti-Region Cassandra Clusters
Multi-Region Cassandra Clusters
Instaclustr
 
Using advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JUsing advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/J
MariaDB plc
 
GlusterFS Architecture - June 30, 2011 Meetup
GlusterFS Architecture - June 30, 2011 MeetupGlusterFS Architecture - June 30, 2011 Meetup
GlusterFS Architecture - June 30, 2011 Meetup
GlusterFS
 
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFSHadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Erik Krogen
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
Michal Špaček
 
Hbase: an introduction
Hbase: an introductionHbase: an introduction
Hbase: an introduction
Jean-Baptiste Poullet
 
Cassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWSCassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWS
Adrian Cockcroft
 
Ceph Day Beijing: Containers and Ceph
Ceph Day Beijing: Containers and Ceph Ceph Day Beijing: Containers and Ceph
Ceph Day Beijing: Containers and Ceph
Ceph Community
 
How to Design a Scalable Private Cloud
How to Design a Scalable Private CloudHow to Design a Scalable Private Cloud
How to Design a Scalable Private Cloud
AFCOM
 
Webinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS Storage
Webinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS StorageWebinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS Storage
Webinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS Storage
GlusterFS
 
Red Hat Global File System (GFS)
Red Hat Global File System (GFS)Red Hat Global File System (GFS)
Red Hat Global File System (GFS)
Schubert Zhang
 
PostgreSQL Disaster Recovery with Barman
PostgreSQL Disaster Recovery with BarmanPostgreSQL Disaster Recovery with Barman
PostgreSQL Disaster Recovery with Barman
Gabriele Bartolini
 
Dustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveDustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep Dive
Gluster.org
 

What's hot (19)

Gluster Webinar: Introduction to GlusterFS
Gluster Webinar: Introduction to GlusterFSGluster Webinar: Introduction to GlusterFS
Gluster Webinar: Introduction to GlusterFS
 
AWS Workshop 101
AWS Workshop 101AWS Workshop 101
AWS Workshop 101
 
Hadoop Meetup Jan 2019 - Hadoop On Azure
Hadoop Meetup Jan 2019 - Hadoop On AzureHadoop Meetup Jan 2019 - Hadoop On Azure
Hadoop Meetup Jan 2019 - Hadoop On Azure
 
caching2012.pdf
caching2012.pdfcaching2012.pdf
caching2012.pdf
 
Evaluating NoSQL Performance: Time for Benchmarking
Evaluating NoSQL Performance: Time for BenchmarkingEvaluating NoSQL Performance: Time for Benchmarking
Evaluating NoSQL Performance: Time for Benchmarking
 
Globus Endpoint Setup and Configuration - XSEDE14 Tutorial
Globus Endpoint Setup and Configuration - XSEDE14 TutorialGlobus Endpoint Setup and Configuration - XSEDE14 Tutorial
Globus Endpoint Setup and Configuration - XSEDE14 Tutorial
 
Multi-Region Cassandra Clusters
Multi-Region Cassandra ClustersMulti-Region Cassandra Clusters
Multi-Region Cassandra Clusters
 
Using advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JUsing advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/J
 
GlusterFS Architecture - June 30, 2011 Meetup
GlusterFS Architecture - June 30, 2011 MeetupGlusterFS Architecture - June 30, 2011 Meetup
GlusterFS Architecture - June 30, 2011 Meetup
 
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFSHadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
 
Hbase: an introduction
Hbase: an introductionHbase: an introduction
Hbase: an introduction
 
Cassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWSCassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWS
 
Ceph Day Beijing: Containers and Ceph
Ceph Day Beijing: Containers and Ceph Ceph Day Beijing: Containers and Ceph
Ceph Day Beijing: Containers and Ceph
 
How to Design a Scalable Private Cloud
How to Design a Scalable Private CloudHow to Design a Scalable Private Cloud
How to Design a Scalable Private Cloud
 
Webinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS Storage
Webinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS StorageWebinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS Storage
Webinar Sept 22: Gluster Partners with Redapt to Deliver Scale-Out NAS Storage
 
Red Hat Global File System (GFS)
Red Hat Global File System (GFS)Red Hat Global File System (GFS)
Red Hat Global File System (GFS)
 
PostgreSQL Disaster Recovery with Barman
PostgreSQL Disaster Recovery with BarmanPostgreSQL Disaster Recovery with Barman
PostgreSQL Disaster Recovery with Barman
 
Dustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveDustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep Dive
 

Viewers also liked

Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
cgmonroe
 
Content Delivery Networks
Content Delivery NetworksContent Delivery Networks
Content Delivery Networks
Kshitij Agarwal
 
A Social Content Delivery Network for Scientific Cooperation: Vision, Design...
A Social Content Delivery Network for Scientific Cooperation: Vision,  Design...A Social Content Delivery Network for Scientific Cooperation: Vision,  Design...
A Social Content Delivery Network for Scientific Cooperation: Vision, Design...
Simon Caton
 
What’s the Difference between an Application Delivery Network and a Content D...
What’s the Difference between an Application Delivery Network and a Content D...What’s the Difference between an Application Delivery Network and a Content D...
What’s the Difference between an Application Delivery Network and a Content D...
CDNetworks
 
Content Delivery Network
Content Delivery NetworkContent Delivery Network
Content Delivery Network
dbadiani
 
CDN - Content Delivery Network
CDN - Content Delivery NetworkCDN - Content Delivery Network
CDN - Content Delivery Network
Jobin Joseph
 
How a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your WebsiteHow a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your Website
Mediacurrent
 
The Evolution of the Content Delivery Network
The Evolution of the Content Delivery NetworkThe Evolution of the Content Delivery Network
The Evolution of the Content Delivery Network
Cisco Service Provider
 
Joomla Content Delivery Networks
Joomla Content Delivery NetworksJoomla Content Delivery Networks
Joomla Content Delivery Networks
Mike Carson
 
Tvb Media Comparisons 2010 Persons
Tvb Media Comparisons 2010 PersonsTvb Media Comparisons 2010 Persons
Tvb Media Comparisons 2010 Persons
Tatia O'Connor
 
Space Camp - Barcelona - English
Space Camp - Barcelona - EnglishSpace Camp - Barcelona - English
Space Camp - Barcelona - English
Xavier Alabart
 
Language Policy In Papua And Zambia
Language Policy In Papua And ZambiaLanguage Policy In Papua And Zambia
Language Policy In Papua And Zambia
Thomas Salmon
 
Study Abroad In A Transparent World
Study Abroad In A Transparent WorldStudy Abroad In A Transparent World
Study Abroad In A Transparent World
PennySchouten
 
I days v3
I days v3I days v3
I days v3
Dag Forsén
 
Blood components case study presentation july 2013
Blood components case study presentation july 2013Blood components case study presentation july 2013
Blood components case study presentation july 2013
jaccalder
 
φε το βιβλίο που μου έκανε συντροφιά 3
φε το βιβλίο που μου έκανε συντροφιά 3φε το βιβλίο που μου έκανε συντροφιά 3
φε το βιβλίο που μου έκανε συντροφιά 3Ellh
 
Comidase bebidas com_texto
Comidase bebidas com_textoComidase bebidas com_texto
Comidase bebidas com_texto
Ministério da Educação
 
Solucion lectura 3[1]
Solucion lectura 3[1]Solucion lectura 3[1]
Solucion lectura 3[1]
guest531f33
 

Viewers also liked (18)

Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
 
Content Delivery Networks
Content Delivery NetworksContent Delivery Networks
Content Delivery Networks
 
A Social Content Delivery Network for Scientific Cooperation: Vision, Design...
A Social Content Delivery Network for Scientific Cooperation: Vision,  Design...A Social Content Delivery Network for Scientific Cooperation: Vision,  Design...
A Social Content Delivery Network for Scientific Cooperation: Vision, Design...
 
What’s the Difference between an Application Delivery Network and a Content D...
What’s the Difference between an Application Delivery Network and a Content D...What’s the Difference between an Application Delivery Network and a Content D...
What’s the Difference between an Application Delivery Network and a Content D...
 
Content Delivery Network
Content Delivery NetworkContent Delivery Network
Content Delivery Network
 
CDN - Content Delivery Network
CDN - Content Delivery NetworkCDN - Content Delivery Network
CDN - Content Delivery Network
 
How a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your WebsiteHow a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your Website
 
The Evolution of the Content Delivery Network
The Evolution of the Content Delivery NetworkThe Evolution of the Content Delivery Network
The Evolution of the Content Delivery Network
 
Joomla Content Delivery Networks
Joomla Content Delivery NetworksJoomla Content Delivery Networks
Joomla Content Delivery Networks
 
Tvb Media Comparisons 2010 Persons
Tvb Media Comparisons 2010 PersonsTvb Media Comparisons 2010 Persons
Tvb Media Comparisons 2010 Persons
 
Space Camp - Barcelona - English
Space Camp - Barcelona - EnglishSpace Camp - Barcelona - English
Space Camp - Barcelona - English
 
Language Policy In Papua And Zambia
Language Policy In Papua And ZambiaLanguage Policy In Papua And Zambia
Language Policy In Papua And Zambia
 
Study Abroad In A Transparent World
Study Abroad In A Transparent WorldStudy Abroad In A Transparent World
Study Abroad In A Transparent World
 
I days v3
I days v3I days v3
I days v3
 
Blood components case study presentation july 2013
Blood components case study presentation july 2013Blood components case study presentation july 2013
Blood components case study presentation july 2013
 
φε το βιβλίο που μου έκανε συντροφιά 3
φε το βιβλίο που μου έκανε συντροφιά 3φε το βιβλίο που μου έκανε συντροφιά 3
φε το βιβλίο που μου έκανε συντροφιά 3
 
Comidase bebidas com_texto
Comidase bebidas com_textoComidase bebidas com_texto
Comidase bebidas com_texto
 
Solucion lectura 3[1]
Solucion lectura 3[1]Solucion lectura 3[1]
Solucion lectura 3[1]
 

Similar to Using Content Delivery Networks with Drupal

ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...
ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...
ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...
AWS User Group Kochi
 
[WSO2Con USA 2018] Architecting for Container-native Environments
[WSO2Con USA 2018] Architecting for Container-native Environments[WSO2Con USA 2018] Architecting for Container-native Environments
[WSO2Con USA 2018] Architecting for Container-native Environments
WSO2
 
AWS Cloudfront Fundamentals
AWS Cloudfront FundamentalsAWS Cloudfront Fundamentals
AWS Cloudfront Fundamentals
Piyush Agrawal
 
Cdn Strategy - BelugaCDN Services
Cdn Strategy - BelugaCDN ServicesCdn Strategy - BelugaCDN Services
Cdn Strategy - BelugaCDN Services
ericlevis012
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh kumar, CSM
 
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Srikanth Prathipati
 
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
jaredwsmith
 
The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)
Venugopal Gummadala
 
Mastering VPS Customization for Ultimate Control and Flexibility_.pptx
Mastering VPS Customization for Ultimate Control and Flexibility_.pptxMastering VPS Customization for Ultimate Control and Flexibility_.pptx
Mastering VPS Customization for Ultimate Control and Flexibility_.pptx
CasperLAWRENCE
 
Redis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for RedisRedis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for Redis
OpenEBS
 
CloudFlare CDN + Drupal
CloudFlare CDN + DrupalCloudFlare CDN + Drupal
CloudFlare CDN + Drupal
Adam Weingarten
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
Primend
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
App Deployment on Cloud
App Deployment on CloudApp Deployment on Cloud
App Deployment on Cloud
Ajey Pratap Singh
 
Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...
Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...
Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...
Amazon Web Services
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
sparkfabrik
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
Docker-Hanoi
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
CodeOps Technologies LLP
 
7 Ways to Manage Multiple Websites on a VPS Hosting
7 Ways to Manage Multiple Websites on a VPS Hosting 7 Ways to Manage Multiple Websites on a VPS Hosting
7 Ways to Manage Multiple Websites on a VPS Hosting
PC Doctors .NET
 
Windows Azure Caching
Windows Azure CachingWindows Azure Caching
Windows Azure Caching
Pavel Revenkov
 

Similar to Using Content Delivery Networks with Drupal (20)

ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...
ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...
ACDKOCHI19 - Journey from a traditional on-prem Datacenter to AWS: Challenges...
 
[WSO2Con USA 2018] Architecting for Container-native Environments
[WSO2Con USA 2018] Architecting for Container-native Environments[WSO2Con USA 2018] Architecting for Container-native Environments
[WSO2Con USA 2018] Architecting for Container-native Environments
 
AWS Cloudfront Fundamentals
AWS Cloudfront FundamentalsAWS Cloudfront Fundamentals
AWS Cloudfront Fundamentals
 
Cdn Strategy - BelugaCDN Services
Cdn Strategy - BelugaCDN ServicesCdn Strategy - BelugaCDN Services
Cdn Strategy - BelugaCDN Services
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
 
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
 
The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)
 
Mastering VPS Customization for Ultimate Control and Flexibility_.pptx
Mastering VPS Customization for Ultimate Control and Flexibility_.pptxMastering VPS Customization for Ultimate Control and Flexibility_.pptx
Mastering VPS Customization for Ultimate Control and Flexibility_.pptx
 
Redis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for RedisRedis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for Redis
 
CloudFlare CDN + Drupal
CloudFlare CDN + DrupalCloudFlare CDN + Drupal
CloudFlare CDN + Drupal
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 
App Deployment on Cloud
App Deployment on CloudApp Deployment on Cloud
App Deployment on Cloud
 
Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...
Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...
Amazon RDS for Microsoft SQL: Performance, Security, Best Practices (DAT303) ...
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
 
7 Ways to Manage Multiple Websites on a VPS Hosting
7 Ways to Manage Multiple Websites on a VPS Hosting 7 Ways to Manage Multiple Websites on a VPS Hosting
7 Ways to Manage Multiple Websites on a VPS Hosting
 
Windows Azure Caching
Windows Azure CachingWindows Azure Caching
Windows Azure Caching
 

More from cgmonroe

Structured SEO Data Overview and How To
Structured SEO Data Overview and How ToStructured SEO Data Overview and How To
Structured SEO Data Overview and How To
cgmonroe
 
Structured SEO Data: An overview and how to for Drupal
Structured SEO Data:  An overview and how to for DrupalStructured SEO Data:  An overview and how to for Drupal
Structured SEO Data: An overview and how to for Drupal
cgmonroe
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
cgmonroe
 
Tips on Securing Drupal Sites
Tips on Securing Drupal SitesTips on Securing Drupal Sites
Tips on Securing Drupal Sites
cgmonroe
 
Becoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search APIBecoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search API
cgmonroe
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals asheville
cgmonroe
 
Solr facets and custom indices
Solr facets and custom indicesSolr facets and custom indices
Solr facets and custom indices
cgmonroe
 
HTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCEHTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCE
cgmonroe
 
Using the Features API
Using the Features APIUsing the Features API
Using the Features API
cgmonroe
 
The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.
cgmonroe
 
Drupal Workflow Concepts
Drupal Workflow ConceptsDrupal Workflow Concepts
Drupal Workflow Concepts
cgmonroe
 
TriDUG WebFM Presentation
TriDUG WebFM PresentationTriDUG WebFM Presentation
TriDUG WebFM Presentation
cgmonroe
 

More from cgmonroe (12)

Structured SEO Data Overview and How To
Structured SEO Data Overview and How ToStructured SEO Data Overview and How To
Structured SEO Data Overview and How To
 
Structured SEO Data: An overview and how to for Drupal
Structured SEO Data:  An overview and how to for DrupalStructured SEO Data:  An overview and how to for Drupal
Structured SEO Data: An overview and how to for Drupal
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
 
Tips on Securing Drupal Sites
Tips on Securing Drupal SitesTips on Securing Drupal Sites
Tips on Securing Drupal Sites
 
Becoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search APIBecoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search API
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals asheville
 
Solr facets and custom indices
Solr facets and custom indicesSolr facets and custom indices
Solr facets and custom indices
 
HTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCEHTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCE
 
Using the Features API
Using the Features APIUsing the Features API
Using the Features API
 
The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.
 
Drupal Workflow Concepts
Drupal Workflow ConceptsDrupal Workflow Concepts
Drupal Workflow Concepts
 
TriDUG WebFM Presentation
TriDUG WebFM PresentationTriDUG WebFM Presentation
TriDUG WebFM Presentation
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 

Using Content Delivery Networks with Drupal

  • 1. Using Content Delivery Networks with Drupal TriDUG – March 2015
  • 2. What areCDNs A content delivery network or content distribution network (CDN) isalarge distributed system of serversdeployed in multipledatacentersacrossthe Internet. Thegoal of aCDN isto servecontent to end-userswith high availability and high performance.
  • 3. Traditional Delivery Theserver in theimage representseither a singleserver or asingle datacenter with aproxy front end (e.g. Varnish / nGinx )
  • 4. CDN Delivery Theseserversrepresent different datacenters that can belocated in different areasof the world. Clientsget served information from the best site.
  • 5. Why UseaCDN ● Increasethenumber of usersthat can accessthesite without degradation. ● Ensurequality user experienceby having all or parts of apageloaded from serverscloseto them ● Lower theimpact of usersaccessing largefiles
  • 6. CDN Basics ● Theterm origin refersto thesourceserver ● CDN clustersinstancesaredefined by aspecial DNS host name, e.g. <dist id>.cloudfront.net ● TheCDN'sDNSentry will berouted thru an (expensive) load balancing routing system that determinesthebest server to servicetherequest. ● DNSsettingsand URL rewriting areused to cause clientsto get theinformation from thecluster. ● Filescached on theCDN all have“expiration” times that can beset/controlled in variousmanners.
  • 7. Anatomy of A CDN Request ● Client browser requestsaCDN cached fileviaan embedded URL or just entering theURL. ● TheCDN'sload balancing routerswill determinetheCDN server to usebased on clientslocation, etc. ● TheCDN server selected looksto seeif thisfileexists. ● If thefileexists, it checksthe“expiration” date. ● If thefileexistsand hasnot expired, it returnsthecache version. Theorigin server doesno work. ● Otherwise, if possible, theCDN will ask theorigin server for afresh copy of thefileand send it to theclient.
  • 8. CDN Services ● Akamai Technologies ● Amazon CloudFront ● WindowsAzureCDN ● EdgeCast Networks ● RackspaceCloud Files ● Vimeo ● YouTube ● ...and many more
  • 9. Selecting aCDN Service ● Dependson your needs, e.g. Mediaonly, web only, and thelike. ● Regionsyou need served. ● Dependson theclient'spricerangeand quality of serviceneeds. ● HTTPSsupport / costs (Note: Googleand other search enginesarestarting to givepreferenceto sitesthat areavailableviaHTTPS)
  • 10. Common waysCDNs areused with Drupal ● Mediaand largefiledelivery (e.g. YouTube, Vimeo, and others) ● Static filedelivery (CSS, Images, JS, and thelike) ● Full anonymoussitecaching
  • 11. MediaDelivery ● SiteDNSpointsto origin ● Content pointsto CDN DNS when needed ● Filesareadded viaCDNsadmin interface Pros ● Largefilesdelivered efficiently ● Normal Drupal behavior Cons ● CDN delivered filesmay haveto bemanually set up/managed.
  • 12. Static FileDelivery ● SiteDNSpointsto origin ● CDN modulecan automatically rewritestatic URLsto CDN DNS ● Filesareautomatically cached Pros ● Server load reduced ● Set and (almost) forget Cons ● Can beadelay updating files that areREPLACED.
  • 13. Full SiteDelivery ● SiteDNSpointsto CDN cluster ● No special moduleslikeCDN needed, filesareautomatically added to thecache. Pros ● Supportsmost clientswith least impact on origin Cons ● Morecomplex set up ● Need to defineprocessesto allow content managersto refresh updated content
  • 14. Challengesto using CDNsand Drupal ● CDNsservecached content based on URLs ● User based Drupal sitescan havedifferent content displayed using thesameURL, e.g. /user ● Content editorswant to seechangesimmediately and not wait for cacheto refresh ● Network managerswant cacheto last along timeto lower server load
  • 15. Selecting aCDN mode A quick ruleof thumb for deciding between Full site delivery and Static filedelivery is: ● Doesyour sitesupport individual users? Yes- UseStatic filedelivery No – UseFull site Note: CDNsalso havevarioussettingsthat may let you createahybrid site, e.g. deliver certain areasvia CDN but let Cart or Forum or... areasbestatic only.
  • 16. SomeUseful Modules ● CDN isuseful for setting up static fileservices http://drupal.org/project/cdn ● CloudFront Refresh (my module:) ) http://drupal.org/sandbox/cgmonroe/2454357 ● AdvancedAggregation – Doesabetter job of css and javascript aggregation http://drupal.org/project/advagg
  • 17. A CaseStudy ● A collegehasacoach who lovesto set sports records... likeaplayer scoring 130+ point in agame, which leadsto massiveload on their main web site. ● Thecommunicationsdepartment isvery proactivein updating thecontent and want visitorsto seethings immediately ● Themain websiteisaccessed by anonymoususers with theexception of variouscontent manager ● They want to support HTTPSto get the“Google” ranking boost.
  • 18. Strategy Used ● UseCloudFront CDN serviceasafull sitedelivery service. ● UseServer NameIndication Certificatesto allow HTTPSon multipleDNSnames ● Use“origin” DNSentry to bypassCDN for content editors ● Writeacustom moduleto allow content to easily be refreshed on theCDN cluster
  • 22. Set up DNS ● Thewww.college.edu siteisset up with aCNAME entry thepointsto theCloudfront.net DNSentry ● The“edit” siteusesorigin.college.edu and pointsto theserver'sIPaddress
  • 23. Setup theCertificates ● Get and SNI SSL certificatewith all theDNSnames you want thesiteto beknown as. E.g. origin.college.edu and www.college.edu ● Install thecertificateon theAmazon CF Distribution (seeAmazon docs) ● Install thecertificateon theorigin server
  • 24. .htaccessSetup To set aspecific expiresheader / time... look for thesection likethisand modify asneeded. NOTE: Drupal pagesexpiretimebased on Pagecachetimesetting in config->devel- >performance. # Requires mod_expires to be enabled. <IfModule mod_expires.c>   # Enable expirations.   ExpiresActive On   # Short expires for testing.   ExpiresDefault "access plus 1 minutes"   <FilesMatch .php$>     # Do not allow PHP scripts to be cached unless they explicitly send cache     # headers themselves. Otherwise all scripts would have to overwrite the     # headers setby mod_expires if they want another caching behavior. This may     # fail if an error occurs early in the bootstrap process, and it may cause     # problems if a non­Drupal PHP file is installed in a subdirectory.     ExpiresActive Off   </FilesMatch> </IfModule>
  • 25. .htaccessSetup Redirect login'sto origin site:  # Redirect logins to non­CDN site   RewriteCond %{HTTP_HOST} !^origin.college.edu [NC]   RewriteRule ^user/login$ https://origin.college.edu/user/login [R=301,L]   RewriteCond %{HTTP_HOST} !^origin.college.edu [NC]   RewriteRule ^user$ https://origin.college.edu/user [R=301,L]
  • 26. .htaccessSetup If you usecustom fonts, you will need to prevent CORS security errors, usethefollowing. NOTE: needsto be tweaked if you want to limit to specific sites. <IfModule mod_headers.c>    Header set Access­Control­Allow­Origin * #  SetEnvIf Origin "^(.*.college.edu)$"  ORIGIN_SUB_DOMAIN=$1 #  <FilesMatch ".woff$"> #    Header set Access­Control­Allow­Origin "% {ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN #  </FilesMatch> </IfModule>
  • 27. Settings.php Setup Thefollowing codeletstheCDN support HTTPS. Needsto bein thesettings.php file. if (isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) &&      $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] == 'https') {   $_SERVER['HTTPS'] = 'on';   $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'; } // The following are only needed if the 'non­CDN' site can be  // accessed by more than 1 host name E.g., initially an internal // DNS entry and then moved to a client DNS entry. if ( isset($_SERVER['HTTP_HOST']) &&        $_SERVER['HTTP_HOST'] == 'college­origin.longsight.com') {   $_SERVER['HTTP_HOST'] = 'origin.college.edu'; }
  • 28. Setup CloudFront Refresh Module ● Get thenew CloudFront Refresh modulefrom itssandbox: http://drupal.org/sandbox/cgmonroe/2454357  ● Get dependancies: http://drupal.org/project/libraries(if needed) http://drupal.org/project/awssdk ● Follow theCloudFront Refresh install instructions
  • 29. CloudFront Refresh ● Tracksupdated nodesand sendsinvalidaterequest when sitecacheiscleared ● Allowsmanually entering URL to refresh non-html files ● Statuspageto track refresh requests ● Someother codeto improve CDN hit rates
  • 30. Results ● Entiresiteisserviced viaCDN with low hit rateon main server ● Fast responseeven under load ● Content editor can instantly seethechangesthey are editing becauseloginsget redirected to theorigin site. ● CloudFront Refresh modulemakeiseasy for updatesto be“pushed” out to CDN.
  • 31. SomeTroubleshooting/Testing Tips ● curl -I -L http://www.college.edu/<path> Thisgetstheheadersfor thepath with expiretimeand other information. For example, you can check theexpiretimeon pagescoming from theorigin server. ● Chrome/ Firebug network load tab Thiscan beused to determinewhat isbeing loaded from which server (or not being loaded). ● Think ahead. CDNsaresimilar to DNSserverswith propagation delays. If a siteisgoing to havemajor changes, set theorigin expiretime to alow valueaday or so before.