Serving audio files with static site on Cloudflare Pages

Hi all,

I am being handed off a static site that serves a modest amount of audio files – these are .m4a, roughly 1-6 MB in size, ~60 files currently. The number may grow, but not substantially. I am assessing Cloudflare Pages as a platform for serving this site and its media files.

I am concerned with bandwidth expense if traffic to these files suddenly spikes. Is this something I need to worry about? Does Cloudflare Pages offer anything in terms of rate limiting, DDoS protection, or a spend limit that would shut off traffic that could help me here?

It’s my understanding that each Pages asset get cached on the Cloudflare CDN. Is it acceptable to serve these files on Cloudflare Pages, or does Cloudflare expect me to serve them on R2 instead?

From poking around it seems like the Cloudflare Self-Serve Subscription Agreement used to include the clause below as Section 2.8, but it has been removed.

Cloudflare Self-Serve Subscription Agreement

“Use of the Services for serving video or a disproportionate percentage of pictures, audio files, or other non-HTML content is prohibited, unless purchased separately as part of a Paid Service or expressly allowed under our Supplemental Terms for a specific Service”

Here are a couple older relevant threads I’ve referenced but they don’t quite answer my question:

What is the maximum Bandwidth usage limit

Limit Bandwidth for Free Plan?

Thanks for your help!

1 Like

It has rather been moved to a different section:

As for what is “disproportionate”, no one knows, as Cloudflare doesn’t want to say.

My take:
R2 includes 10 million reads per month. As long as you stay below that (and assuming you are on a paid worker plan), I’d just go with keeping the files in Pages. I don’t think Cloudflare has any interest in forcing you to add complexity to your app if it makes exactly 0$ difference in your bill.

1 Like

@Laudian Thanks for taking the time to respond and point out the updated sections in the service agreement. Your reasoning makes sense to me.

If anyone is looking in the future, that R2 pricing for 10 million reads / month free limit is currently listed at the links below.

R2 Pricing
Developer Platform Pricing

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.