Skip to main content

CDN - Speed your site

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:

Comparison Article - Cloud Front 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

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

============================================================================
Akamai:

Akamai is one of the most famous CDNs which support many of the Fortune 50 sites. Akamai delivers between 15-30% of all Web traffic. Though Akamai is the leader, if your work is restricted to the US, there is no need to spend on Akamai as you can go for other efficient but cheap alternatives, such as the ones mentioned in this list.



Comments

Popular posts from this blog

IPv4 header to requests when a client is using IPv6

  What is Pseudo IPv4? As a stopgap to accelerate the adoption of IPv6, Cloudflare offers Pseudo IPv4 which supports IPv6 addresses in legacy applications expecting IPv4 addresses. The goal is to provide a nearly unique IPv4 address for each IPv6 address, using Class E IPv4 address space, which is designated as experimental and would not normally see traffic. To learn more see  here . Options Add header:  Add additional Cf-Pseudo-IPv4 header only Overwrite headers:  Overwrite the existing Cf-Connecting-IP and X-Forwarded-For headers with a pseudo IPv4 address Cloudflare

Intrusion detection system

An   intrusion detection system   ( IDS ) is a device or   software application   that monitors network or system activities for malicious activities or policy violations and produces reports to a management station.  IDS come in a variety of “flavors” and approach the goal of detecting suspicious traffic in different ways. There are network based (NIDS) and host based (HIDS) intrusion detection systems. Some systems may attempt to stop an intrusion attempt but this is neither required nor expected of a monitoring system.  Intrusion detection and prevention systems (IDPS) are primarily focused on identifying possible incidents, logging information about them, and reporting attempts. In addition, organizations use IDPSes for other purposes, such as identifying problems with security policies, documenting existing threats and deterring individuals from violating security policies.  IDPSes have become a necessary addition to the security infrastru...

Amazon AWS - Cloudfront configuration

Amazon Cloudfront Dynamic Content Delivery HTTP GET and HEAD   requests are currently supported by Amazon CloudFront. Over time, we will add support for POST requests.   Our sample setup You can convert your existing blog or setup a new blog from scratch to use cloudfront. For demonstration purpose, I'm going to setup a new blog called www.contentdeliverynetworklog.com and serve the whole blog via cloudfront as follows: Blog domain name:   www.contentdeliverynetworklog.com   (CNAME to cloudfront) Blog origin domain name:   cp.contentdeliverynetworklog.com . To fetch web content from this origin web server. Static asset domain name:   s0.contentdeliverynetworklog.net   (CNAME to cloudfront). Static asset origin domain name:   origin.contentdeliverynetworklog.net . Custom origin IP address for both static/dynamic assets:   75.126.153.203 Caching ruleset for your dynamic and static assets: I am going to use a combination of Batca...