How much cost one can save if he integrate Cloudflare with Amazon S3 for Video Streaming backend?

We are developing a video streaming site

For that we want to use Amazon S3 storage

Since S3 data transfer fees are very high , we decided to integrate S3 with Cloudflare

But it’s difficult to calculate cost reduction % . Please help us about how much cost will be saved is we use Cloudflare.

Here is our use case

100 Videos uploaded via S3 Api … Each having size of 500 MB.(Region LONDON)

=> So 100 x 500 = ~ 5GB storage used

each and every video requested (GET) 1000 times

=> 100 * 1000 = 1,00,000 GET requests

each and every video viewed 1000 times

=> So (500 x 1000) x 100 = ~ 5 TB bandwidth used

So the Total cost without Cloudflare is $450

If we use Cloudflare how much % we able to save ?

Have you looked at Cloudflare Stream pricing? You can’t be sure that the files will remain in the cache, especially at 500MB each which is at the top end of the maximum size.


Our maximum video file size is 200 MB

What is maximum duration of the cache ?

Is it possible to increase it?

There is no guarantee, they try to honor your cache-control header, but if they have other files with higher priority the files will be evicted without notice.


As @Matteo mentioned, streaming looks much more cost effective. Remember that not every edge server at every Cloudflare datacenter shares their cache. You could very well have videos purged pretty quickly and need to be pulled from S3 quite frequently.

1 Like

If you are looking at building a streaming service to use Cloudflare you really should have a discussion with our Enterprise sales team. In addition to having access to advanced features and configuration options which aren’t available on self service plans, Cloudflare solutions engineers can help provide guidance on best practices, bandwidth alliance partners and other options which can help you control costs and maximize performance for your end users.


Also a true statement and good option depending on the type of service you are trying to build and options needed. :slight_smile:

1 Like

Stream is probably not an option -> Do Cloudflare Streaming Player supports ADs for monotization?

1 Like

+1 on Bandwidth Alliance partners. For only 5GB of data, you can host that just about anywhere for dirt cheap.

Digital Ocean is a partner, and their Spaces service is S3-compatible with built-in CDN. Combine that with Cloudflare, and your cost should be $5/month.

Or am I missing something? I see Spaces includes 1TB of bandwidth, but I’m assuming this waived if it’s going through Cloudflare.

1 Like

Thanks for the answers all of you. Digital ocean spaces only able to handle 200 request/ sec

Not if passing through their CDN though, which can reduce the latency after the first request in most areas.

1 Like

Their documentation implies the 200/sec is a limitation for traditional Spaces. But if you enable Spaces CDN, this isn’t an issue.

“If you plan to push more than 200 requests/second to Spaces, we recommend that you use the Spaces CDNor use more Spaces.”

Unfortunately, it looks like they still don’t support CNAMEs. Though your cost still comes to $5/month which includes 1TB outbound, and another $10/month per additional TB.

EDIT: Reading the quote more closely, they say “TO” Spaces. It doesn’t say “FROM” Spaces is an issue. Regardless, they say their CDN eliminates this limit.

1 Like

Thanks for your answer guys .the concern with cloud flare stream is there is no mobile native players .

That’s the issue. Web views will create problems…

1 Like

There is to note that the CDN counts as outbound obviously, but also the CDN fill counts, so the first request at each edge node will incur in double bandwidth cost.

1 Like

I’m reading up on that now. Bummer. Hopefully setting CDN’s TTL to 1 Week will do a lot to offset that.

Theoretically if the video are uploaded and then left there the load should be a single pull. Surely much more affordable than S3 or GCS.

1 Like

What about backblaze b2 ? They telling free data transfer with cloud flare ?

Is it good ?

That looks pretty slick. I use Backblaze for backing up my computers and love it.

With 10GB free storage and free data transfer, it seems too good to be true.

I don’t think it’s S3-compatible, but it’s a similar system. At least it supports CNAMEs. It’ll just be up to you how to secure the bucket.

Oops, your initial Storage calculation of 100 videos @500 MB each should come out to 50GB.

I just added B2 to my Backblaze plan and added a CNAME record.

I’m not excited about the file path being:

I’m also not excited that you need to add a blocking rule to stop someone using your domain as a CNAME for their files, such as:
This can probably be done through Firewall Rules to block a URI that doesn’t contain your subdomain and your bucket name.

1 Like