Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

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

share|improve this answer
    
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 '11 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 '11 at 9:16
add comment

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.

share|improve this answer
    
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 '11 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 '11 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 '11 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 '11 at 9:25
add comment

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.

share|improve this answer
    
This is the exact amount of storage: 9.7656 GB –  user69334 Feb 4 '11 at 9:12
    
You were talking about bandwidth before, not storage. Which do you mean? –  Mike Scott Feb 4 '11 at 9:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.