Filed in by ej | December 1, 2008 10:46 am
Cloud Files is a new product offering from Rackspace/Mosso that is an inexpensive, scalable, dyanmic storage system. We’ve partnered with Limelight Networks’ Content Delivery Service to bring you an incredibly easy way to publish your content over a world-class, industry leading CDN.
The core storage system is designed to provide a safe, secure, automatically re-sizing, and network accessible way for you to store your data. You can store files ranging in size from a single byte up to 5 gigabytes and you can store as much as you want and only pay for what you use. With Cloud Files there is no over-buying/under-utilizing storage space. All data is secure and private and only accessible to that user account. This is a great solution for storing system backups, copies of your digital media such as photos and videos, or as a storage system available to multiple computers.
By combining the core storage system with Limelight Networks’ CDN, you now have an easy way to distribute your data to everyone. Limelight Networks has 18 edge locations over the globe with media-grade optical networks connecting them. They provide CDN service to over 1300 businesses(1) who rely on their network to be performant and continuously available. Our partnership with them is not a one-off solution; when you publish content through them it is distributed across their entire infrastructure just like all of their other customers.
How it works
In the Mosso web-interface, it’s as simple as creating a Container (the storage compartment for your data), upload your Objects (the files you want to serve over CDN), and mark the Container as “public”. The Container is then assigned a unique URL that you can combine with your Object names to embed in web pages, email messages, blog posts, etc. For example, you could upload all of your family photos to a Container called “images”. When you publish that Container, it will be assigned a unique URL like, “http://cdn.cloudfiles.mosso.com/c1234”. You could then share out a link to one of your photos like “http://cdn.cloudfiles.mosso.com/c1234/IMG_3432.jpg”. When that link is accessed, the photo is served from the CDN; it’s that simple!
When that URL is accessed, the FQDN “cdn.cloudfiles.mosso.com” resolves to Limelight Networks’ CDN. When they see the request for “c1234/IMG_3432.jpg”, they immediately serve the content from their cache if it exists. If the photo doesn’t exist in their cache, the call back to Cloud Files for that Object and then serve it and cache it for the next request. Data is cached in the CDN for a configurable amount of time (the default is 1 day).
When the CDN fetches the object for the first time, it is cached at an edge location that is geographically the closest to the requester. As that file is requested from other geographic locations, the CDN propagates that file to other edge locations so that users are always accessing the file from the closest geographic location to them. This is the magic that a true CDN provides. Content is served to users from the closest edge location reducing latency and speeding up the end-user’s experience.
Once you CDN-enable a Container, any new Objects you upload to that Container are also available for access over the CDN just like the example above. There is no complicated “access control list” that needs to be set on each Object you upload or re-setting the “public” attribute.
If at some point you no longer want your content accessible over the CDN, you can mark the Container as “private”. Any data currently cached in the CDN will continue to be served, but when the CDN cache expires, the data will not be re-fetched/cached from Cloud Files.
What about CNAMES? I don’t want to use !
A request we anticipate some users will want will be the ability to provide a custom name for the CND URL. For instance, you might not want to use “http://cdn.cloudfiles.mosso.com/c1234/image.jpg” but would rather use a name in your own domain such as “http://img.me.com/image.jpg” in your web sites. Since this is not currently a supported feature of Cloud Files, we’d like to suggest an alternate way for you to use your own custom domain with Cloud Files.
You can use a custom URL in your own domain by using a concept called URL re-writing. So let’s say you CDN-enable a Cloud Files Container and it is assigned “http://cdn.cloudfiles.mosso.com/c1234”. Most popular web servers support a feature called URL re-writing that can be configured so that a request for “http://img.me.com” is actually redirected to “http://cdn.cloudfiles.mosso.com/c1234”. With this re-writing scheme, a request to an image would be automatically redirected to the Container’s CDN URL which in turn is served by the CDN. Anyone familiar with the Apache mod_rewrite module could use something like this:
RewriteRule ^http://img\.me\.com/(.*)$ [R,L]
So with this basic technique, you are in full control of how visitors access the content you publish with the Cloud Files CDN. This technique can be used to capture web log hits, restrict access to specific users, or direct hits back to your local web server if you decided not to use Cloud Files CDN.
Source URL: http://blog.rackspace.com/cloud-files-with-limelight-networks/
Copyright ©2015 The Official Rackspace Blog unless otherwise noted.