how a content delivery network can help speed up your website
DESCRIPTION
In this day and age, time is money—both for website developers and site visitors. Page load times can be the difference that impacts search engine rankings, ad revenue, and overall sales. Content Delivery Networks (CDNs) will cut the load time of assets between 20-50%, especially for users outside of the United States which amounts to an improved customer experience. By speeding up CDNs, with geographically distributed servers, you can help deliver the fastest possible download for all users. In the past, CDNs were cost prohibitive and mostly reserved for sizable organizations who could afford to pay thousands of dollars per month. Recently, there has been an overall shift in CDNs that even the lowest traffic web sites can afford.TRANSCRIPT
#drupalCDN
How a CDN Can Help Speed Up Your Website
Andrew M RileyDirector of Drupal
Development@AndrewMRiley
#drupalCDN
Agenda
ExampleThe CDN Module
Using a CDNWhy you should
#drupalCDN
Goal
At the end of this presentation you will:1. Understand why you and your clients should use a content delivery network2. Be able to set up a CDN for your Drupal site.
#drupalCDN
ExampleThe CDN Module
Using a CDNWhy you should
#drupalCDN
Anatomy of a Request
1. DNS Lookup 2. Connect 3. Send 4. Wait 5. Load
Server TransferClient Client/Server Client
More Info: http://j.mp/QSQQNR
#drupalCDN
What is a CDN?
One vs Many
#drupalCDN
CDN History
Around for over 15 years
Few players at first
Initially extremely expensive
Initially focused on large file distribution
#drupalCDN
Photo Source: http://j.mp/NfLona
CDN Today
Many players in the game
From Free to Expensive
Covers video streaming, assets, etc
Includes new technology like P2P
#drupalCDN
So Why?
1. DNS Lookup 2. Connect 3. Send 4. Wait 5. Load
Server TransferClient Client/Server Client
#drupalCDN
ExampleThe CDN Module
Why you should
#drupalCDN
Integration Methods
CDNCDN
Your Server
CDN
Your Server
Origin Pull Push
#drupalCDN
The right one?
Integration Method
Analyze your traffic and correlate it with POPs
Cost
P2P Support
Media types
#drupalCDN
Environments
Development - probably doesn’t need one
Staging - should have one
Production - of course!
#drupalCDN
Common Pitfalls
Multi-Environment Conflict
File same name
Invalidating Objects
Command Propagation/Lag
Stacking CDNs
#drupalCDN
Photo Source: http://j.mp/PrYuCh
Browser Testing
1. DNS Lookup 2. Connect 3. Send 4. Wait 5. Load
Server TransferClient Client/Server Client
#drupalCDN
Service/Remote Testing
Both Free and Pay options
Use this for load time testing
Remote Desktop tends to give you more options
#drupalCDN
ExampleUsing a CDNWhy you should
#drupalCDN
http://drupal.org/project/cdn
Origin Pull
Easiest Method
Pulls from your server on first load
Can sometimes have SEO implications
CDNCDN
Your Server
#drupalCDN
File Conveyor
aka Push
Should work with *any CDN
Allows for file pre-processing
Requires system access for daemon
Doesn’t have to come from your server
CDN
Your Server
#drupalCDN
Excluding Paths
You don’t want to CDN everything
Avoid JS and Fonts (CORS IE < 8)
Exclude custom generated images/data
Module authors: hook_cdn_blacklist() and hook_cdn_blacklist_alter()
#drupalCDN
Far Future Expiration
Will change some URLs
Has special requirements
Speeds up loading for return visitors (http://j.mp/PNz6Z3)
#drupalCDN
DNS Prefetching
Speeds up the initial HTTP request
Adds a link tag to your pages
1. DNS Lookup 2. Connect 3. Send 4. Wait 5. Load
Server TransferClient Client/Server Client
#drupalCDN
SEO Issues
If using origin, map your Canonical URL
Update your robots.txt
#drupalCDN
The CDN Module
Using a CDNWhy you should
#drupalCDN
Log In #drupalCDN
Create Bucket #drupalCDN
Create Bucket #drupalCDN
Create Bucket #drupalCDN
Create Bucket #drupalCDN
Create Bucket
(Click the info icon for your bucket)
#drupalCDN
Setup Drupal Module #drupalCDN
Test Your CDN
Log out of your site
Load up the network view
Reload your page
Check CSS and other assets
Check for breaks too!
#drupalCDN
Photo Source: http://j.mp/SfWrmQ
Summary
CDNs can fit all site sizes
They’ll reduce server load
They’ll reduce load time
Cost isn’t really a factor any longer
#drupalCDN
Photo Source: http://j.mp/RccQYb
#drupalCDN
Mediacurrent helps organizations architect custom websites by leveraging our proven processes and deep expertise in Drupal.
@mediacurrent mediacurrent.com