views:

442

answers:

8

As a hobby, I'm writing a web application that will use some bandwith. Imagine I implement a feature that will produce custom 50 megabyte downloads for each interested user and maybe a megabyte or ten for uninterested visitors. I hope it will be popular but I don't want to have to take out a second mortgage on the house to pay for a month's bandwidth bill on the off chance I get dugg/yigged/abusively spidered and wind up transferring OMGWTFGB/mo.

I'm thinking about pushing most of the bandwidth out through S3 or S3+CloudFront. Google App Engine has a nice feature that limits the amount of money your application can spend per day. Assuming I stay away from GAE and my application is efficient enough that it won't just mercifully crash on its own, is there a good way for my application to say "buzz off" as soon as it's costing me more than I want to pay?

I understand I could hire myself part-time if I could convince a million-hits-a-day site like StackOverflow to host AdSense ads and give me the revenue. Underwhelming! And the ads would be on my own much less popular site. Since I have no way of knowing whether ad revenue or donation buttons will actually pay for the bandwidth, I'm looking for something like a CDN that allows for download budgeting, or a software component that will read the CDN's billing interface and shut down or throttle the site if it's spending too quickly.

+6  A: 
  1. Look at NearlyFreeSpeech. They charge you out of a pre-paid account and only for bandwidth used, and suspend the app if funds run out.

  2. It's actually harder to get a digg effect that runs into one's wallet than people think. Depending on the bandwidth usage of your app, would a couple of thousands of hits per day really make that big of a dent?

Oren Trutner
it would depend on the app as well, don't you think? like a heavy bloated flash app versus a simple asp/php app. I remember a presentation i saw once about youtube where their biggest bandwidth hog was thumbnail gallery after a user search
dassouki
prepaid, nice...
joeforker
+6  A: 

Run some ads.

If it gets popular, you get ad revenue to offset the cost of the bandwidth.

Robert
+1  A: 

Add a donation button for paypal or other service of your choosing to help offset potential costs.

Run some ads will help as well, google adwords is easy to sign up for.

Aduljr
I've never known an app to get sufficient donations to make it worthwhile. Paint.net, which is the greatest free program I have ever used, has a donate button. The author claims to have gotten a paltry sum from donations... I appreciate development and think it is nice in theory, not trying to critisize you, just think it isn't a viable way to earn money.
Kyle B.
A: 

Who is hosting it? There are some hosts that simply won't let you go over your allotment. At least, this is how I understand it.

I host PHP applications with GoDaddy. I get a ton of bandwidth -- I've never gotten close to my allotment but suppose I did? They stop serving the pages and I believe I get a warning before that gets close. But again, I've never come close so this is a bit of speculation. I would get charged but they do have Bandwidth overage protection. Perhaps your host has that?

Frank V
+1  A: 

Brent Ozar - Upgraded My Web Host

This is a very good post on this subject and how to deal with it. You may find it helpful.

DavidStein
A: 

If you are providing something of value to your users, why not charge them for it? That could help offset the costs even if your traffic is low. You could do a freemium service so some users could still use the site for free. There are a whole host of other issues you have to consider when charging for a product, but even if it's a side hobby, you could learn valuable lessons that would be applicable to your other work.

Tai Squared
+4  A: 

IMO, efficient use of caching can cure about half of the bandwidth woes people face. Cache-Control directives are gems if used properly.

And I forgot to mention before, efficient use of HTTP Compression can also save a lot of bandwidth. Most modern browsers have the ability to decompress both GZIP and Deflate encoded pages. I have observed that in IIS server, setting the level of Static Compression to 10 and Dynamic Compression to 5 has significantly decreased the file size while not putting a significant load on my CPU. More info here.

desigeek
Not to mention server-load benefits. Proper caching provides dramatic benefits.
joeforker
+1  A: 

Cloud hosting (Azure, Amazon S-3) was built for scalability. They coin it 'utility computing' where you pay for what you use.

From a purely monetary perspective, this is something most free websites have been dealing with. There are a lot of great artcles about the 'death of free' on the internet and other viable business models. Ad-supported models are dying off too as social networking sites are gobbling up impressions and people are becoming more attune to tuning them out. You may wish to persue a freemium model (one which you offer a teaser free version, and charge a higher version for something else). Other models like micropayments (think iTunes App Store) may work too.

If all else fails, you could become a 'street pharmacist' for a few weeks and pay your bills until you get bought out :)

Kyle B.