MaxCDN Blog

Updates & Insights on all Things CDN

How To Streamline Your Traffic with NetDNA’s Full Site Acceleration

With the launch of EdgeRules™ and HTTP 1.1 to the origin, you can take advantage of Full Site Acceleration on NetDNA's CDN.  This will optimize all traffic between your origin servers, our edge servers, and most importantly: your customers.

NetDNA CDN Full Site Acceleration

  As with any infrastructure change, let's test the update before pushing it live. This post covers 3 quick steps to safely enable Full Site Acceleration for your site.  

Step 1: Prepare Your Web Server

The key to a safe migration is making a new hostname to access your content, having the CDN pull from the new location, and finally updating DNS to use the CDN. First, add the new hostname (such as origin-www.yourdomain.com) to your web server's configuration: ApacheNginxIIS
Make sure you can access your site from both www.yourdomain.com and origin-www.yourdomain.com.
 

Step 2: Create a Pull Zone

Next, open the NetDNA Control Panel and create a new Pull Zone. Use the new hostname (origin-www.yourdomain.com) as the origin server, and add the public URL (www.yourdomain.com) as a custom CDN domain.
If you need to update your Custom CDN Domain later, use Pull Zones > Settings.

Notice the CNAME entry we generate for you (i.e., fullsite.yourcompany.netdna-cdn.com). Don't make any DNS changes yet -- we have testing to do.  

Step 3: Test the CDN

To test the CDN, change the hostname settings on your local machine.
First, get the Edge Anycast IP by running:
Next, update your hosts file to use this IP for www.yourdomain.com. On Mac/Linux add this line to ~/etc/hosts:
On Windows, the file location is different, so follow these instructions.
You can measure page load time locally (with Chrome or Firebug performance tools), or use an external service like WebPageTest:
  Use a WebPageTest script to change the DNS settings and navigate to the URL (more about scripting on WPT):
 

Ready? Change your DNS

Once all your tests have passed, point your DNS entry for www.yourdomain.com to the NetDNA CNAME (i.e., yourdomain.yourcompany.netdna-cdn.com). Set a low TTL (5 minutes, 300 seconds) in case you need to switch back. Once you've confirmed everything is working, increase the TTL to 24 hours (86400 seconds) or more. Lastly, make sure to 301 redirect yourdomain.com to www.yourdomain.com, so all traffic is served from the CDN: ApacheNginxIIS That's it! Your entire site is being served from the edge. To see how NetDNA can help you accelerate your site please contact sales.
  • theavidcruiser

    Will this work with WordPress driven sites? Thanks,

    • http://blog.justindorfman.com jdorfman

      @theavidcruiser:disqus yes it will. You would have to write some custom hooks that will purge the cache (on the CDN) when creating/updating/deleting a Page or Post.

  • diegocerdan

    Very useful service! But what would happend when the user does a POST request with some date. It would hit the original server?

    • http://blog.justindorfman.com jdorfman

      Yes if the request or object is not in cache it will hit the origin.

      • diegocerdan

        So if the POST data or url are different the request would hit the origin.

        • http://blog.justindorfman.com jdorfman

          correct.

Categories

Brand New MaxCDN Tools

Compare the first and last byte speed of 2 websites in 5 seconds and more:

Start Testing