DNN Speed - CDNs, Site Caching & Speed With CloudFlare or AWS CloudFront



Southern Fried DNN
 
Southern Fried DNN
This page of notes, links and additional resources accompanies a presentation given at the 2013 DNN community events
2013 Southern Fried DNN event in Charlotte NC 
2013 DNN Con event in Palm Beach FL
where the DotNetNuke community gathered together for a day of DotNetNuke tips, tricks, networking and fun!

If you would like to see the visual element of the presentation, view the PREZI here SouthernFried DNN Presentation by Ryan Moore - CDNs, Site Caching & Optimization with CloudFlare and Cloud Front


Session Topic:

An introductory session to present the concept of a Content Delivery Network and how using CDNs can speed up your site with the click of a button. 

Learn about general concepts for speeding up DNN sites, speed testing tools, the CDN basics, security and server load benefits, setup steps and pros/cons. 

We will compare and contrast CDN and caching services primarily from two different providers: CloudFlare.com and Amazon Web Services Cloud Front.

  1. Introductions to Thank Sponsors, Introduce Speaker
  2. QR Code to Download Materials/Links
  3. Is Your Website Slow?
  4. Resources & Options For Speed
  5. Page Load & Speed Testing Tools
  6. What is a CDN?
  7. CDN Downsides
  8. Comparison Review: CloudFlare CDN & Caching Service
  9. Comparison Review: AWS Cloud Front
  10. Other CDN & Optimizing Providers
  11. Closing & Questions


Is Your DNN Website Slow? Want your website page loads to be "snappy"?


We discuss the ideas of speed vs performance vs resources and issues such as network latency, slow SQL server or query issues, server resources, bad skin/image issues and more.

The following is a list of articles and tips for the FIRST things to do to help your DNN site regardless of other tasks that you consider. Articles include the core basics on DNN optimization from the best source, Mitchell Sellers, as well as others with good recommendations for getting your DNN instance running its best.

Using Page Load and Speed Testing Services

Several online tools can help you get an idea of your current site speed in terms of page load, issues on the page, and trace route and load times.

  • http://tools.pingdom.com/fpt/
    Use the page load tool from PingDom to see how quickly a page loads, see the resources as they load and see any that can use improvement.
  • http://pagespeed.googlelabs.com/
    https://developers.google.com/speed/pagespeed/insights
    The PageSpeed service from Google also does a similar type of review
  • http://loads.in/
    The service from LoadsIn allows you to test the speed of a page, see screenshots of each second as it loads, AND you are able to determine an estimated load time of that same site if loaded from many international locations. This helps you really see the before and after load time when you setup your CDN
  • http://yslow.org/
    More help on diagnosing items on the page that cause it to load slowly
  • http://www.yougetsignal.com/tools/visual-tracert/
    Visual Trace Route shows you with points and paths on a Google Map the number of steps to reach a particular server/domain from their site, or from your IP, a fun tool to use when explaining distance and hops to clients.


What is a CDN?


A Content Delivery Network is a caching service that serves up your images, JS, CSS, HTML from a geographically distributed network of servers. When a user request your site, the CDN serves up the content from the closest location to cut down on load time.

Let's say you have a file on your server http://www.domain.com/Portals/0/scripts/CoolStyles.CSS
a trace route can show you the steps that it takes a particular user, on their internet connection to request that file from your server.

When a request for a specific file is made by a user, the server closest to that user (in terms of the minimum number of nodes between the server and the user) is dynamically determined. This optimizes the speed with which the content is delivered to that user. 

When on a CDN, the steps are reduced because (hopefully) they are closer to your location, AND they're serving a cached copy of your file so that the request load is not on your server.  http://Geographically Located CDN Service Cache >/Portals/0/scripts/CoolStyles.CSS

If many people are requesting the same file, then that repetitive load is removed from your server. So it shifts the load for server resources and bandwidth traffic off of your server, scales quickly and makes the site load super fast for users. WIN

Why Use Caching Services & CDNs


  • Improve website response time - faster site, happier users! Most services create a geographically placed cached copy of your site to present the site locally/faster or optimized, locally faster
  • Low cost actions compared to additional equipment and infrastructure 
  • Keep existing hosting, setup, etc 
  • Can provide added security - Good caching services can modify the HTML, JS, CSS of the cached site to help optimize it, minify and more... CloudFlare can add a security level to it as well
  • Can help with bursts of heavy traffic
  • Stats show you can also have a decline in bounce rate, increased page views per user, etc.
  • Improve SEO - Google Likes Fast Sites! Google has stated that faster sites tend to rank higher in search engine rankings.
  • Can be easy to undo


Downsides to Caching & CDN Services


  • IP Addresses and User Agent in Logs diminishes
  • Adds additional complexity
  • Be careful with DNN Login Access
  • Not ALWAYS the closest
  • Cost can be hidden
  • Since you are offloading more of your content traffic, reviewing log files for statistics becomes less useful and accurate for a picture of your whole site

Now the Good Stuff..

OK, now onto the meat of the resources on two specific options... CloudFlare.com which offers a CDN that bundles in other optimization and security services, and Amazon Web Service's Cloud Flare, a more basic, traditional CDN service.


---------------------------------------------------------------

CloudFlare.com

---------------------------------------------------------------
Cloud flare - Speed up. CDN and secure
CloudFlare protects and accelerates any website online. Once your website is a part of the CloudFlare community, its web traffic is routed through our intelligent global network. We automatically optimize the delivery of your web pages so your visitors get the fastest page load times and best performance. We also block threats and limit abusive bots and crawlers from wasting your bandwidth and server resources.

BENEFITS & FEATURES

  • Cache Content, Minify JS & Optimize
  • 30-60% speed increase
  • Can serve cached content when origin server is down
  • Setup Process is SUPER EASY
  • Connections to 3rd Party Apps
  • Security protection for email addresses
  • Cache With or Without query strings
  • Dynamic content continues from origin server
  • Analytics and Options in Control Panel


DOWNSIDES


  • CloudeFlare MUST be your DNS
  • Dynamic content continues from origin server


CloudFlare Setup is EASY!  

An easy signup form, then you point CloudFlare at your current site, it returns DNS info for you to review and then approve. You then change your DNS servers to CloudFlare and it's taking over. You then setup the levels of magic you want to test out!
 
Note: Since you're changing nameservers, it could take 24-48 hours for you to see that CloudFlare is active for your site

Other Features:

Inject NEW functionality through 3rd party Apps
https://www.cloudflare.com/apps/

Articles on CloudFlare




---------------------------------------------------------------

Amazon Cloud Front

---------------------------------------------------------------

The AWS Cloud Front service is a more traditional CDN service. It is also fast to setup and get started testing with.

Cost is Variable:  http://aws.amazon.com/cloudfront/#pricing

Pay only for the data transfer and requests that you actually use charges actual usage of the service in the 3 areas: Data Transfer,Requests, and Invalidation Requests.
 
Charges less where our costs are less, thus some prices vary across geographic regions and are based on the edge location through which your content is.

BENEFITS & FEATURES


  • CDN Speed Up Delivery to Edge
  • Pay only for data transfer used
  • APIs, Configuration Settings…
  • Combine easily with other AWS
  • Keep your current DNS
  • INSTANT to setup and try!

PROBLEMS WITH DNN SITES


  • CANNOT use it on base domain, must be on "www" site
  • SSL can be an issue, but is supported
  • Cost vary, can be expensive
  • FORM POST not supported


Notes on SSL: 

If you have an SSL on https://www.domain.com you will likely want to separate off to a new certificate for another secure subdomain like https://store.domain.com or https://secure.domain.com because although you can use a Cloud Front secure, it is not the domain, it is Cloud Front's core https://d1dk6sj45ddul.cloudfront.net

Articles:

http://aws.amazon.com/cloudfront/
http://aws.amazon.com/cloudfront/faqs/#What_is_Amazon_CloudFront

Comparison Article - Cloud Front vs CloudFlare

http://dickeyxxx.com/cloudfront-vs-cloudflare

CDN Planet's handy Cloud Front purge (invalidate) cache CHROME plugin tool
http://www.cdnplanet.com/tools/cloudfront-purge-tool/ 

---------------------------------------------------------------

Other CDNs and Optimizing Providers

---------------------------------------------------------------



---------------------------------------------------------------

Google PageSpeed

---------------------------------------------------------------
A further note that Google PageSpeed may be a great service to rely on in the near future. At the moment, for the benefits and the faults that are being discussed, everything is "up in the air" because this service from Google is still in BETA. It will likely have a cost when fully released, but for now is on trial.

PROBLEMS

  • Form posts over 2mb not supported
  • HTTPS secure pages not supported
  • Doesn't support video streaming, flash
  • CANNOT use it on base domain, must be on "www" site
  • Pricing isn't available yet becasue it's still in beta. 

 
How To setup video
http://youtu.be/kymP4y8DitM
quick review/setup article
http://techwalls.com/news/set-up-google-page-speed-cdn-service/