Using Amazon S3 as an Image Hosting Service

In Reducing Your Website's Bandwidth Usage, I concluded that my best outsourced image hosting option was Amazon's S3 or Simple Storage Service.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2007/03/using-amazon-s3-as-an-image-hosting-service.html


Dreamhost (for $9.99/month) gives me 2.7 TERAbytes of bandwidth, and 233 GIGAbytes of disk space.

I hate to say you get what you pay for, but I’m a Dreamhost customer and their downtime has me in a bit of a funk about recommending them for anything lately.

These are nice tools for S3, also:
https://jets3t.dev.java.net/cockpit.html
http://s3sync.net/wiki

FYI, S3 account page update. This is with only 4 images public (images from the last 3 posts)

3/7/2007, 3am:

$0.02 with 0.063 GB served

3/7/2007, 2pm:

$0.37 with 1.806 GB served

I think I’ll be using a mixture of imageshack.us for older posts, and amazon S3 for newer posts that need more bandwidth than the 100 MB / hour limit of imageshack.us.

So you going to give him a bit of money for his obviously hard work :slight_smile:

I’m sold, but you forgot to include your Amazon referrer code in the links to make some of those hosting costs back. :slight_smile:

BTW, I’d love to see the result of these mods on your general traffic profile after a week or two.

Awesome write up, I’m inspired to move my images to Amazon S3 servers also. I didn’t know Amazon.com prices were so cheap and I bet they will only get cheaper.

I’m thinking of doing a online backup of my computer also since it is so cheap. Doesn’t anybody else do this already?

If you use Amazon’s S3 service, make sure you absolutely create a cname that points to their domain (as mentioned a few posts up). Otherwise, you’ll have adblockers and other spam plugins ignore your images because they’re coming from a domain other than codinghorror.com

“There’s no concept of folders in S3. You can only emulate folder structures by adding Objects with tricky names like subfolder/myfile.txt. And you can’t rename Buckets or Objects, as far as I can tell.”

That doesn’t sound like anything a decent frontend couldn’t take care of.

Jeff, we know you love components:

IBiz S3 Integrator

http://www.nsoftware.com/ibiz/s3/default.aspx

how do you make a website

S3 sounds good for relatively low transfer usage.

Is there something wrong with my math or am I missing something else here? It seems that once you get over 10 Gb/month (1/3 Gb/day), you’re paying more than $2/month.

The Economy Plan from GoDaddy (for example) gives you 250 Gb/month for $3.19 - $3.99, depending on the length of your contract.

From you previous post [http://www.codinghorror.com/blog/archives/000807.html] I gathered that your image transfer rates are more than 2/3 Gb/day (which is the break-even point between GoDaddy and S3).

I must be missing something.

This is all well and good but has anyone seen a comparison of latency times? Absolute time from browser image request to completion of download is the most important factor for many sites. You need your site to load in a snappy way, especially if it is image heavy. Infinite free to low cost image storage is of no value if we can’t get better performance than hosting the images ourselves.

As we’ve seen from studies the past six months people have little patience for a page load.

I would expect s3 to have better latency than godaddy, but I’d like to see some numbers. :slight_smile:

I second Joe’s comment… it’d be great to see a comparison of the performance of S3/regular hosts/the free image sharing services!

Btw, do check this out: http://www.hackszine.com/blog/archive/2007/03/howto_recover_text_from_blurre.html?CMP=OTC-7G2N43923558

Might want to color over your account number instead.

Do you know if there are any bandwidth usage monitoring apps for S3? It would be nice to quickly know if your usage was going to cause a big bill at the end of the month.

A big of googling turns up this rather damning quote:

“Aside from that, the performance is absolutely terrible outside of the US, which I really noticed since I’ve been in Taipei. In addition to that, it’s simply not reliable. There are extended and unannounced periods of downtime, so you shouldn’t be using it in production (except maybe for redundancy or backup purposes).”

http://bob.pythonmac.org/archives/2006/12/06/cachefly-vs-amazon-s3/

Good posting on this, and points out that S3 is US-centric. More than half my members are outside the US so that kind of rules out S3 right there. Cachefly sounds interesting though.

@Joe, as someone who tested Cachefly i can testify that they are absolutely horrible. They are also pretty much useless outside of the states, their customer support is poor to non existing etc.

They say they distribute your content everywhere and serve it up from nearest location, in reality they monitor your use, if you have a image that gets hit frequently from the states and less so from europe, the image will always be served from the states, and they do this using 302 redirects to the states from the EU hosting farms introducing even more delay into the whole process. Only when you get a lot of hits on a image/file from the EU will they send it to their EU hosting centres, in my testing this is totally random I’ve hit a file 500 times from London and it just kept serving from the states, requests sent to them for clarification never got a reply.

I’d avoid cachefly at all costs.

I’d also be keen to hear about performance of S3, my dreamhost account does give me lots of storage and lots of b/w but the hosts they serve the files on are often terribly slow with huge load averages and very poor performance serving HTTP

side note for jeff:
http://dheera.net/projects/blur.php
mosaicing your account number in the image is not a good idea if you want to hide it.