i have been fighting in my spare time set up Amazon Cloudfront to take some of the hit off my server (i can then run it more efficiently and then save money) i wished i could have used VPS.net‘s akamai offerings but seeing as the idea was to try and save money it would have defeated the purpose. anyway shall post some thoughts now briefly and will later post some more info on how i got things going.
Amazon Cloudfront is a PoP CDN and uses its S3 service as its origin so you have to manually make sure you have your content loaded up to s3 to make use of it, W3 Total Cache takes care of this and even in the sneak peak i had of the next version supported expires setting and gzip, more on that next time. the actual setup of s3 and cloudfront couldnt have been much easier, i got my Amazon Web Services (AWS) account up and running and enabled s3 and cloudfront. i created my bucket for hosting files and setup the cloudfront distribution attached to the bucket in no time, even setting up the CDN Cname record was quick and easy.
next is uploading content for now i am using W3 Total cache to take care of this but i have had one or 2 issues with url’s not being rewritten properly that i have yet to address, there are however many tools that can be setup to run via cron or in the background to sync your files to S3 s3cmd or s3sync are 2 that come to mind first. Amazon have no origin pull which i think is there first negative.
next hiccup i had was when setting up the site i changed the logo file because i had previously set expires for a week (and for some reason it registered as a year :S) i was stuck with an old file until i decided to just rename the file and force the change. there is a big problem here – i couldnt invalidate the cache on cloudfront as is normal with most other cdn providers, this is a big minus point – the only way to invalidate cache was to delete and recreate the cloudfront distribution which then left me at the mercy of dns propogation for changes.
next thing is gzip, cloudfront wont automatically send files as gzip encoding unless your pre gzip it or set the headers, this means you have to have 2 of all your CSS and JS files one compressed the other uncompressed and then rewrite your css and js rules appropriately depending on browsers this is a large overhead (Luckily solved in upcoming version of W3 Total Cache)
that said Cloudfront is decently fast, its extremely cheap although dont forget to factor in storage costs and it can also host html files with some providers such as akamai wont do on there basic object caching services
its early days and i wish i had a full blown cdn like akamai but cloudfront wins the day for me for the cheap pay as you go costs which work out well for me