Sign in
Log inSign up

How do big companies effectively store and serve video (over a CDN) - I don't get the math

codegabru's photo
codegabru
·Apr 28, 2020

I am building a course hosting website - I want my users to be able to upload videos which their students will stream. This is how I plan to do it but I don't get the math behind this. I'm surely missing something.

How do I store the video? - AFAIK rn I can use the cheapest object storage anything like S3, GCP etc. = $0.005/GB being the cheapest option.

How do I serve those videos? AFAIK rn I can use a CDN that will cache the videos on the edge and serve it to the students = ~ 0.05/GB being the cheapest option.

Now let's suppose a teacher uploads a 30 min 1080p video that 10000 students will watch.

Size of vid ~ 1.5GB Object storage cost = 0.0075

As 10k students will watch it - then data that will go through the CDN = 15000GB

At that 0.05/GB the CDN pricing will be - 15000GB x 0.05/GB = $750

This is unaffordable, obviously, for anyone hosting and serving the video.

There is definitely something that I'm missing here (almost ready to feel dumb after this is solved). Or is this how much it actually costs?