Search code examples
videocdncloudflare

Can I use CloudFlare as a video provider?


I'm creating a website where people can upload and watch videos. I'm expecting 1000 simultaneous viewers at all times (on average). The problem is that all the CDNs I've looked at charges about $0.06/GB. This means that 0,17 MB/s (720p) x 1000 users x 60 seconds x 60 minutes / 1024 = $36 an hour to host!

Am I missing something?

Over at CloudFlare you don't pay for the bandwith. Does this mean that I can get it really cheap at CloudFlare. Isn't that too good to be true?


Solution

  • Yes, you're missing the point that Cloudfare will only cache "static and small" files, with these extensions: https://support.cloudflare.com/hc/en-us/articles/200172516-What-file-extensions-does-CloudFlare-cache-for-static-content- as you can see, mp4 and similar are not on the list.

    So, assuming most of the cost is bandwith, you will have the same, but a faster website as some resources will be served by cloudfare CDN.

    It all depends on how many videos will you have, but usually a dedicated server will offer much more storage (and enough bandwith) for a fixed monthly fee. The problem is that 1000 simultaneous viewers is too much for a single server serving the files.