Skip to content

Managing Rackspace Cloud Files & CDN

Peter Krautzberger edited this page Jul 2, 2014 · 5 revisions

This page is obsolete and kept for historical reference only.

Note: for further questions, consult the Rackspace documentation.

Understanding 'activating CDN delivery'

Rackspace Cloud Files is primarily a file storage service and so CDN delivery of stored files has to be 'activated' either on the webinterface or via a tool like Cyberduck.

Since CDN delivery has been activated for the entire mathjax container, CDN delivery is automatically active for all files uploaded into the container. In other words, there's no need to activate CDN delivery any further.

Compression

Rackspace can compress at the CDN edge: while files are stored uncompressed on Cloud Files, the CDN will respond to accept-encoding headers from browsers by delivering compressed files from the CDN edge locations.

Note: this compression is restricted to html-, javascript- and css- files.

Additionally, we could compress files manually and set the content-encoding header, but this isn't used in the current setup due to IE problems with such a setup.

http header settings at Rackspace

Rackspace sets most http headers correctly upon upload to Cloud Files. Several custom headers can be set (see rackspace blog post).

Again, manipulating headers is best done via Cyberduck.

Changing metadata of the font files

Whenever you upload font files to Rackspace Cloud Files, you will have to modify the http-headers for these font files. Currently (i.e. 2.0-latest) this means two things:

  • Update the content-type header as follows:
    • For .eot files: application/vnd.ms-fontobject
    • For .otf files: font/opentype
    • For .woff files: application/font-woff
    • svg: image/svg+xml (should already be set correctly by Rackspace)
  • Add a custom header to eot, otf, woff and svg font files:
    • Access-Control-Allow-Origin with value *

Practical advice:

  • Cyberduck makes it easy to set these headers, see its documentation for Rackspace.
    • descend to the respective folders (eot etc.)
    • select all files at once
    • click Info->metadata and modify/add the header for all selected files simultaneously.

SSL access

Rackspace offers https-access but just like Amazon CloudFront, no cnames.

Additionally, the encrypted address differs from the unencrypted one as in the following example:

https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js
vs
http://c328740.r40.cf1.rackcdn.com/mathjax/latest/MathJax.js

Edge purge

Rackspace allows edge-purge. This is restricted to 25 files a day but can be done per container through customer support.

TTL settings

Rackspace allows time-to-live of up to 50 years. Note: Rackspace does not charge for traffic from Cloud Files to the edge locations, so we don't need to do anything for now.

Clone this wiki locally