History: Amazon CloudFront
Source of version: 11 (current)
Copy to clipboard
! Amazon CloudFront This is to setup a ((Content delivery network)) You need an account with Amazon # Create Distribution ** Delivery Method: __Download__ ** Choose __Custom Origin__ *** Origin DNS Name is the domain name of your site ex.: info.tiki.org *** Protocol Policy: __HTTP Only__ (unless you know what you are doing) *** HTTP Port: leave at the default __80__ (unless you know what you are doing) ** Allowed Connections: __HTTP and HTTPS__ ** CNAMEs: leave empty unless you know what you are doing ** Default Root Object: leave empty if your siteis at the root. Otherwise, put the subdirectory (ex.: 7x/) ** Loggin: __Off__ ** Comments: You can put a comment here to distinguish this distribution from the others. ** Distribution Status: __Enabled__ ** Click "continue" # Wait a while for the distribution to be active # Find out your domain name which should be something like abcde12345.cloudfront.net # visit __http://abcde12345.cloudfront.net/img/icons/error.png__ (using the exact domain name provided by cloudfront) ** This should confirm if it's working. It can take a bit of time before DNS has propagated. If you see a little image, it means the CDN is active. # go the performance admin panel of your Tiki instance ** tiki-admin.php?page=performance *** Content Delivery Network: __http://abcde12345.cloudfront.net/__ *** Content Delivery Network (in SSL): __https://abcde12345.cloudfront.net/__ # Then "view source" of pages rendered by Tiki and you should see __abcde12345.cloudfront.net__ in the code # Empty your cache by visiting tiki-admin_system.php?do=all ! Q & A Q: Everything I've read says you have to upload to S3 (which is separately chargeable) all the files you want to be available, have you done this for the tiki sites and if so what folders/files did you decide should be CDN'd or does the Custom Origin option avoid the use of S3? A: Custom Origin is much simpler. No need to upload your files to S3. CloudFront takes care of fetching a copy from the original site. Using S3 would be a lot of work because you would have to keep your files in sync. While this could work for images, this is especially problematic for generated files like minified CSS files. Q: The limited Tiki documentation for CDN says its only for static images and jquery code: would just this subset being CDN'd make any significant difference? A: Yes, because these files are needed for everyone, whatever the page they visit, vs the download of 1 file. If you do Yahoo! YSlow and Google PageSpeed analysis, you will see that images, JS and CSS are a huge factor. Q: I use file storage for File Galleries etc - so CDN'ing these could be really useful for improving downloads for some users - but I guess it would not be possible to somehow CDN these? A: Not with code in Tiki7, but that's a great idea. Q: When Tiki is set up for CDN, I assume it automatically adds the amazon domain prefix - but presumably only to designated folders (for static images and jquery code?) what is the exact scope of this? A: Javascript, CSS and some but not all images (no reason not to do them all, just needs to be coded). See the HTML source of a page such as http://themes.tiki.org/Sample+page and look for cloudfront.net [http://www.webpagetest.org/result/110512_QP_KAJF/1/performance_optimization/#use_of_cdn|For example, IE specific files and some of the images are not covered.]