0

I hava asked this question before, but have been unable to get a clear answer or spammy ones.

A client runs a website with limited bandwidth per month (10gb) but wants his users to be able to download hq videos.

Now if he would rent hosting space on amazon, for example, the downloads would still go through his website. So would this eat his bandwidth then. And how can we solve this?

3 Answers 3

1

I would suggest that you host it on something like youtube or vimeo, and then embed it on the website.

2
  • not if the use is commercial. I know a lot of people abuse the policies on various video hosting sites but they don't allow it. I'm from ExposureRoom and we're the only ones that have free hosting (for non-commercial) and paid hosting/streaming from commercial use.
    – Shiv Kumar
    Feb 3, 2011 at 19:54
  • I stand corrected- but there are other sites which allow commerical videos, however all/most have to be paid for.
    – AliGibbs
    Feb 4, 2011 at 9:16
1

You didn't write if the website is run on Apache or not, but if yes, it's easily solvable. If he uses amazon s3, the traffic won't go through the webserver:

  1. He needs to create a bucket at the S3 service and upload the HQ files

  2. He needs to add an mod_rewrite rule to his apache configuration (.Htaccess file), like:

    RewriteRule ^hq/(.*)$ http://bucket-name.s3.amazonaws.com/$1

This will redirect all the traffic from

http://example.com/hq/video.avi

to

http://bucket-name.s3.amazonaws.com/video.avi

This will be done in a response that tells the client to send another request to the target location to retrieve the resource from there (see HTTP response status code 302).

Only if you’re using a proxy (using the P flag, see also mod_proxy) your server would request the resource from remote and pass it to the client, resulting in doubling the in- and output.

4
  • That should be a permanent redirect, not a temporary one -- the content will always be hosted from Amazon -- so you should add "[R=301]" to the end of the RewriteRule line.
    – Mike Scott
    Feb 3, 2011 at 17:41
  • No because then the amazon url would be indexed rather than his own. So it should be a 302. You would use a 301 if you were moving the URL that it is accessed from.
    – JamesRyan
    Feb 3, 2011 at 17:47
  • @Mike A permanent redirect is not a good idea especially if the assets are to be protected (controlled for the main website).
    – Shiv Kumar
    Feb 3, 2011 at 19:51
  • Thanks guys. This is the answer I was looking for. Will use a temporary redirect then, as the assets are protected. Jelmar.
    – user69334
    Feb 4, 2011 at 9:25
0

First, there's no such thing as a "gb", so you clearly have problems distinguishing upper and lower case, and it's thus unclear whether your client has 10Gb or 10GB of bandwidth -- and it makes a significant difference. However, even with 10GB, it's nowhere near enough. A minimal bitrate for well compressed HD video would be around 2Mbit/sec. That's 15MB per minute, so 10GB would let your client's users download about 11 hours of video. Except that if his data rate is for the aggregate of inbound and outbound traffic, rather than the higher of the two, we have to allow for the download from Amazon as well, so that's 5.5 hours. Basically, he can have two users download one movie each, and that's it for the month.

How to solve it: serve the video directly from Amazon, and pay them for the bandwidth. Bandwidth from Amazon costs 15 cents per GB, (less for high volumes), so that 10GB-worth of bandwidth would only cost $1.50 from Amazon. You'd end up paying around 40 cents a time for a movie to be downloaded. If he puts the links on his website, but they link to content hosted on Amazon, then the downloads won't go through his website.

2
  • This is the exact amount of storage: 9.7656 GB
    – user69334
    Feb 4, 2011 at 9:12
  • You were talking about bandwidth before, not storage. Which do you mean?
    – Mike Scott
    Feb 4, 2011 at 9:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .