Question regarding using cloudflare for delivering large files

We are planning to make our own cdn in which we will cache all the content with cloudflare edge caching in free plan and we will deliver files like videos, images, pdf documents, word documents etc. But I am having a doubt that is their any issue while delivering this things from cache as i seen this thread in which cloudflare decreased their performance but I also seen someone doing the same here it is (The Discord CDN) so please can anyone clear my doubt that is it allowed or not as our server is of slow speed and we can’t deliver every resource to everyone if it’s allowed I mean if its legal in terms of cloudflare then only we will do or else we will plan to get a new server.

You can not use the CF cache to distribute media files far as I am aware.

Why so? I mean what’s the issue? and is it allowed to cache static html pages?

html, javascript, images etc… but not media files such as mp3 or mp4 etc…

Someone else will probably know the specifics and/or have the direct link to the part in the ToS

From the Cloudflare Self-Serve Subscription Agreement:

2.8 Limitation on Serving Non-HTML Content
The Services are offered primarily as a platform to cache and serve web pages and websites. Unless explicitly included as part of a Paid Service purchased by you, you agree to use the Services solely for the purpose of (i) serving web pages as viewed through a web browser or other functionally equivalent applications, including rendering Hypertext Markup Language (HTML) or other functional equivalents, and (ii) serving web APIs subject to the restrictions set forth in this Section 2.8. 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. If we determine you have breached this Section 2.8, we may immediately suspend or restrict your use of the Services, or limit End User access to certain of your resources through the Services.

Discord is an Enterprise Customer so they’re able to negotiate different terms.

2 Likes

And what about PDF and Word files?
and What way you suggest to deliver resources like mp4, mp3

Will they allow same thing in pro plan?

As far as I know, Enterprise Customers pay for bandwidth (albeit at a negotiated flat rate) - what they use that bandwidth for is up to the customer. So no, the Pro Plan does not allow you to serve “a disproportionate percentage of non-HTML content”.

So what should I do to deliver static files faster from my server only?

Do you have large files like 1GB of PDFs like graphics content, etc.?
Are they being cached, or not?

Kindly, see here for some more information:

And configure caching headers, HTTP/2 at the origin host, get at least 1Gbps connection or 10Gbps, etc. and consider below:

Not 1GB they are just for the users who don’t want to read articles they are 2mb or max to max 20mb.

This is a really tricky question imo.

CF have never really been keen to support mp3 in any respect, whether it be downloading or streaming.

They have gone all in on video however and I’m sure the CF recommendation would be to use their Stream service and deliver video that way.

When it comes to MP3 you are “on your own” and can very quickly break the ToS, so again, it depends on how you want to distribute the audio. As mp3 direct downloads or streams?

Streams use a service like Soundcloud and for Downloads (if you know someone with a developer account and spare API keys you can use Soundcloud also, but they have closed that down and if you dont have one now you cant get new ones). If Soundcloud API is not an option you could try using Dropbox? Otherwise you will need a server to host your MP3s and ensure you Grey Cloud that DNS entry so that it doesn’t use the proxy service.

Not great solutions, video is better catered for, as long as you are happy to Stream.

Audio we are still in the wild west pretty much unfortunately.

ok Thank you so much I will deliver audios from gdrive or maybe from some other service.
And also tell me that are 2mb-20mb pdfs are allowed or not?
and is Cloudflare R2 released and how it will be implemented in wordpress or discourse or flarum?

Pro plan = self serve

Thus, refer to @albert reply:

1 Like

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