Cutting Your Bandwidth Costs

08/11/2008 19:43:03
tags: web, server

Previously, I used the SDF Public Access UNIX System as my web host. I was happy with the service I received for the price ($36 for a lifetime of use!), but I wanted to try something new.

I am currently using NearlyFreeSpeech.NET as my web host, which offers pretty good rates. Currently, the cost is $1.00 per gigabyte of bandwidth, and $0.01 per megabyte per month of storage.

Certainly a reasonable price, and the $0.02 they credited my account has lasted me for several days of testing while I set up my account.

That said, Amazon offers a cheaper solution with S3 at $0.15 per gigabyte per month of storage, and $0.20 per gigabyte of bandwidth. So I have configured a set-up that allows me to host files at my own domain on Amazon’s servers at the lower cost.

I updated my DNS records so that files.fletcherpenney.net is a CNAME alias that points to s3.amazonaws.com. I created a bucket under my S3 account named files.fletcherpenney.net. Now, whenever I create a file in that bucket, it is available at http://files.fletcherpenney.net/name_of_file.

For security reasons, it appears the best approach is to only give read access to individual files that you want people to download. If you give read access to a folder, then anyone can list the contents of that folder (which may or may not be what you want them to do.)

As for managing S3, I am currently experimenting with S3 Firefox Organizer. So far, it has worked well for me.

Thus far, I can now store larger files on Amazon’s server, and provide access to them on my sub-domain for pretty low prices. But to cut costs on larger files, Amazon has built in BitTorrent features.

By serving the torrent file, http://files.fletcherpenney.net/name_of_file?torrent, visitors will download the file using a BitTorrent client. Amazon hosts the torrent server, and will serve the file if no other clients are sharing your content.

But, if other users have downloaded your file, and are currently sharing it, the next person to download your file will likely use much less bandwidth from Amazon, cutting your costs. For popular files, this cost savings could really add up…

I tested the BitTorrent approach, but don’t really have any files that I plan on serving this way at the moment. But it definitely looks like something worth trying!

Similar Pages