Skip to Main Content
Product Suggestions
Created by Andrew Ardron
Created on May 15, 2018

Implement CDN for customer sites Part 2


See also: https://prospectsoft.aha.io/ideas/ideas/SPA-I-146. Part 1 sets out to create a CDN manually.

Part 2: CDN's with automation

Once we have a working CDN (see part 1). The next step is to:

  • As part of the process by which a site is made live, automate the setup of CDN endpoints pointing to the domaincode.onprospectsoft.com site
  • because of the time it takes to propogate we may need to think about how to communicate this potential delay ...  maybe have a "CDN ready" flag which is set automatically after checking that the CDN works for some files in the filecache.

 

  • The customer will need to setup their CNAME to point at our azureedge.net CDN e.g. we could use something like domaincode-onprospectsoft.azureedge.net
  • then, when they enter the domain in our UI, we could validate the CNAME exists and is pointing to the right place, and if not dont allow them to add it. or let them add it but not finish the process of putting it live until this all validates.


the CMS editor, both in editing and in previewing the content, will ALWAYS need to load domaincode.onprospectsoft.com rather than the customers primary domain - because otherwise we will always load from the CDN, and the CDN doesnt know anything about our preview mode.

for any customer going to domaincode.onprospectsoft.com you will get the site directly from us, going to the live (your custom) domain will get your site from the CDN (ans will always be the published version).

Probably the hardest bit of all of this is the documentation that explains setting up CNAMES to the customer

Note: we need to consider how to make this work in QA without registering a load of QA CDN domains? Mmaybe we only need a few to work in QA for testing purposes.


  • Attach files