Improve site performance and branding with Amazon CloudFrontPosted by Matt Thommes on November 19, 2008 | Post type: Gain Amazon S3 was created to handle the distribution of static files with improved scalability. Amazon CloudFront takes this concept to the next level by harnessing geographical redundancy to deliver content with the best possible performance. If you already host files on S3, you'd be wise to consider the advantages of CloudFront to improve your site's performance, no matter where your visitors access it from. As demand increases for your popular S3 content, CloudFront makes sure your files are redundantly mirrored to the closest geographical location of your site's visitors. This ensures your content is delivered as fast as possible. How CloudFront worksWhen you create a public S3 bucket, you're given a URL from which to access files. Let's pretend our bucket name is "paininthetech." The public S3 URL would look like this:
This is the base URL for that bucket. To access files in that bucket, you just append the file name to the end of the URL. For example:
Anyone attempting to access that file (or any web pages linking to or loading that file) will receive the file as normal. The benefit is that you're protected against heavy traffic spikes, which would normally slow down (or completely crash) a web server. So, hypothetically, 100,000 people could be trying to access that file at the same moment, and none of them should experience any delays or problems. CloudFront now takes this concept to the next level. Remember our bucket name and base URL for "paininthetech?" We're gonna take this bucket name, and give it an entirely new URL, which is generated by Amazon. This is called creating a new distribution. Our distribution URL for our "paininthetech" bucket could look something like this:
(Note: this example is completely made-up. None of these URL's will resolve.) This new URL is our CloudFront URL. It is effectively the same as referencing To access that same
Now you are delivering not only scalable content to your visitors, but also content delivered in the fastest possible manner. Add a touch of brandingAn added bonus to CloudFront is you can customize your new CloudFront URL's. Rather than using the Amazon-generated, random character URL, we can create a URL that is associated with our site! We can turn this:
... into this:
This is achieved by adjusting the CNAME for the domain This latest URL is ideal because it references our own web presence, rather than the generic Further informationThis post was meant to simply overview the capabilities provided by Amazon S3 and the new CloudFront. For more detailed information on CloudFront, as well as examples, resources, and pricing, please visit Amazon's CloudFront homepage. I also had the easiest time setting up CloudFront with one of my S3 buckets by following this step-by-step tutorial on using CloudFront with Firefox's S3Fox extension. About the author(s)Matt Thommes is an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from a suburb of Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us. Comments
|
Quick Link to this postTTIP.me/2074 |