Whole site acceleration

Introduction

Whole site acceleration (also referred to as full site acceleration) is a way how to use CDN (Content Delivery Network) to accelerate your site.

Dynamic sites

For dynamic sites (i.e. using for example PHP or Ruby) such as CMS and e-shops it is usual to use CDN for static content only such as images, fonts, CSS files and JavaScript files (usually big in size) and don't use CDN for HTML files (small in size, consisting of HTML code and containing for example dynamic database results) but serve HTML files from the original server. It works well in terms of speed because HTML files are small and can be delivered quickly worldwide. It is the most common CDN usage. Please note that our CDN edge servers just cache origin content they don't interpret any programming language such PHP or Ruby.

Static sites

With static sites (i.e. don't using any programming language such as PHP or Ruby) you can utilize the same strategy as with dynamic sites and also serve HTML files from the original server but it also makes good sense to cache HTML files in CDN network. By utilizing the latter strategy your site will be responding completely from CDN and you will benefit from more speed.

CDN service - push or pull

You have two options for a CDN service, CDN Static Push (CDNsun hosts the original content) or CDN Static (you host the original content). Please refer to Overview of CDN services for more details. We recommend CDN Static Push as the CDN integration is easier.

Your DNS and second-level domains

With whole site acceleration you need to set up a CNAME record (e.g. a CNAME for mycompany.com) and thus you need to update your DNS. Please note that some DNS providers don't support a CNAME record for second-level domains, e.g. mycompany.com (because it is against RFC 2181). If you are unable to create a CNAME record for a second-level domain with your DNS provider then it is impossible to accelerate your site with our CDN if it runs on a second-level domain, e.g. mycompany.com. Please note that we allow CDN services with Service Domain (i.e. CNAME) a second-level domain, e.g. mycompany.com but some DNS providers don't (but some do). In the following we assume that your site is running on the www.mycompany.com domain (i.e. a third-level domain).

Integration using CDN Static Push

You need to do the following steps.

  1. Create a storage.
  2. Upload your site to the storage.
  3. Create a CDN Static Push service with Origin Storage from step 1 and with Service Domain www.mycompany.com. If you need HTTPS then most probably you are looking for a CDN service with your custom SNI (LE) SSL (in this case for www.mycompany.com).
  4. Follow the CDN service DNS instructions at the Services/How-To page and add a CNAME record for www.mycompany.com to your DNS configuration (and remove the old DNS A or CNAME record for www.mycompany.com). Please note that it can take up to 48 hours to propagate this change in your DNS configuration to all DNS servers in the Internet. Please consult the DNS update with your DNS provider before making changes.
  5. That's all.

Create a storage

Please refer to Creating a storage for more details.

Upload your site

Please refer to Accessing a storage for more details.

Create a CDN Static Push service

Please refer to Creating a CDN Static service for more details.

Integration using CDN Static

You need to do the following steps.

  1. Set up your site on additional virtual host different from www.mycompany.com, for example on cdn-origin.mycompany.com.
  2. Create a CDN Static service with Origin Domain cdn-origin.mycompany.com and with Service Domain www.mycompany.com. If you need HTTPS then most probably you are looking for a CDN service with your custom SNI (LE) SSL (in this case for www.mycompany.com).
  3. Follow the CDN service DNS instructions at the Services/How-To page and add a CNAME record for www.mycompany.com to your DNS configuration (and remove the old DNS A or CNAME record for www.mycompany.com). Please note that it can take up to 48 hours to propagate this change in your DNS configuration to all DNS servers in the Internet. Please consult the DNS update with your DNS provider before making changes.
  4. That's all.

Virtual host

You need to add a new virtual host to your Apache or Nginx configuration on your server as well as add a new A or CNAME record for cdn-origin.mycompany.com to your DNS configuration. Please ensure that the cdn-origin.mycompany.com is returning exactly the same content as www.mycompany.com before setting up a CNAME for CDN in your DNS.

Create a CDN Static service

Please refer to Creating a CDN Static service for more details.

Notes

  • Please note that our CDN honors all HTTP response headers sent from origin so please make sure that you have the correct cache control HTTP response headers set on origin because otherwise your content may not being cached on CDN edge servers.
  • If you need to set up a HTTP to HTTPS redirect on CDN edge servers then please submit a technical support ticket below and we will configure it internally and send you integration instructions in no more than 72 hours. Please share with us the CDN service Service Domain or Service Identifier or its ID.
  • Please note that with whole site CDN acceleration your site is still up and running even when its origin temporarily fails. This feature is called failover please read more here. On the other hand if you server HTML files from your origin server (typical with dynamic sites) and your server fails then your site is down no matter of CDN.
  • Please note that CDNsun storages just store content they don't interpret any programming language such PHP or Ruby.

What next?

Read about the following topics.

Contact Us

  ______   _    _    _    _   
 /_   _// | || | || | \  / || 
   | ||   | || | || |  \/  || 
  _| ||   | \\_/ || | .  . || 
 /__//     \____//  |_|\/|_|| 
 `--`       `---`   `-`  `-`