For a client I was asked today to run some of our software on S3/Cloudfront. Amazon released Cloudfront as beta a few days ago, but as this client is releasing a new, media rich, platform this week, it seemed only smart to at least test it out.
If Cloudfront wouldn’t work as expected for now (because of it’s beta status), we could always move to using S3 urls until the Cloudfront release.
Starting to use S3 from our own CDN (Infiniscale) seemed quite simple; I simply had to rewrite the file/directory drivers of our frame to support S3/Cloudfront. As I have no idea how to support direct authentication to Amazon urls (if that is even possible), I made a Cloudfront driver instead of an S3 driver, as the client is ok with full access to all files, no authentication.
As I have been working on our own panel to support most of the Amazon products, this would be a good one to add. Some nice and easy way to add buckets, appoint some of them to be used as CDN nodes etc etc. The tools delivered by Amazon are quite tech and the software written by other folks is not that good mostly (for instance; S3Fox is great, but I have noticed it to be very instable, on different computers and different networks).
The writing of the driver took about 1 hour and it was working fine for small tests. But when I started with the big testing, I ran into quite a lot of problems. For instance, when my connection wasn’t fast enough, I would get back all kinds of errors which really mean very much. And good ‘ol Google had little answers about them either. The Amazon manuals tell you that, for instance, InvalidArgument means, well Invalid argument passed. Yeah, I know that. But I am using standard software make by them ; what can it be…
Eventually I had to debug some stuff and fix it on a lower level. After that it seemed to work nicely. All files are automatically sent to the S3 Cloudfront buckets and show up there when I call my methods for retrieval.
The video files and images are very very fast on Cloudfront. That part works really well; you get uncached stuff almost instantly to your computer, which rocks. Sometimes it seems to miss a beat though; I’ll go into the Amazon forums (I typed forest here ….) and ask what that could be.
Again, they have something very nice here. Something which could worth gold when used correctly.
I’ll keep you updated to see if it’ll work in real life, as the site will be launched soon and then the pain might/will really start. Luckily I have a combined mode as well, which allows the system to use 2 (or more) filesystems at a time, allowing us to maintain both local and S3 storage.
You must be logged in to post a comment.