Search code examples
ruby-on-railsrubyamazon-s3amazon-cloudfront

Amazon s3/Cloudfront Ruby on rails video streaming


I am building a ruby on rails website that will store and stream videos. I am using carrierwave and amazon s3 to upload and store the videos. If I am not mistaken, I can stream the files directly from s3 to my website.
So can anyone explain why does it seem that everyone uses cloudfront along with s3. What are the benifits?
What will be the average cost of such a storage/serving solution. I will be streaming the videos via html5 so i will not be looking at encoding solutions


Solution

  • The main advantage to CloudFront is that it's a CDN. So the content is positioned closer to your customers, rather than just in Amazon's main data stores. You can use CloudFront with or without S3. It has a concept of an origin, which is basically the master server for your content. That master server can be S3 or a non-Amazon server.

    For pricing, you should look at the CloudFront pricing details, and optionally the pricing for S3 (if you use that as origin).

    You can use the calculator to estimate the actual cost. Let us know if you want help with that.