At the same time, the terms of service for CDN (Service-Specific Terms - Cloudflare) mentions that videos, pictures and other large files are not eligible to be delivered through the CDN unless using one of Cloudflare’s specific paid services such as R2.
To me the terms of service restriction seems to be intended for large files, which videos and images generally are. However, images are also specifically mentioned as the use-case for static assets, and short video clips are small in size and can easily fit within the 25MiB static asset limits, so they might count as “other files”. It is also not clear to me if Workers already count as a paid service and thus the ToS restrictions do not apply and are irrelevant anyway.
Am I allowed to use a Worker to serve images and small video clips as static assets?
That’s not how I understand the CDN specific terms.
Let’s look at the whole blurb:
Cloudflare’s content delivery network (the “CDN”) Service can be used to cache and serve web pages and websites. Unless you are an Enterprise customer, Cloudflare offers specific Paid Services (e.g., the Developer Platform, Images, and Stream) that you must use in order to serve video and other large files via the CDN. Cloudflare reserves the right to disable or limit your access to or use of the CDN, or to limit your End Users’ access to certain of your resources through the CDN, if you use or are suspected of using the CDN without such Paid Services to serve video or a disproportionate percentage of pictures, audio files, or other large files. We will use reasonable efforts to provide you with notice of such action.
I’m neither a Cloudflare staff nor a lawyer. But I don’t see the above as contradicting the Workers info you posted above.
Note the disproportionate percentage (of static assets wrt the HTML content).
The general understanding is that as long as the static assets in question (including images and even videos) are decorative or presentational parts of the website being served by the CDN, the usage should be fine… even if using a ton of traffic.
On the other hand, providing a website primarily for users to download/stream/upload these same static assets will likely technically be a breach of the terms, even if overall CDN traffic used isn’t a huge amount… as the percentage of traffic used by these assets will be orders of magnitude greater than that of the actual HTML pages.
Thanks for your insights! I guess some of it might be up to interpretation, for example the “disproportionate percentage” wording is technically only applied to the pictures, audio files, and other large files, and not videos themselves.
My use-case is tutorial-style videos, so the primary function of the website would be to show the video clips. However, if I use Workers (or maybe their paid version for $5/month), as far as I can tell that still falls under the “Paid Services” exception mentioned by the CDN terms of service so even videos might be fine. At the same time, the limit of 20k files 25MiB each would be 500GB total; given that the R2 free limit is 10GB, and I doubt the intention is to let people use all of that for free as static assets…
I’m probably far away from completing my project, so for development hopefully using static assets is fine. Maybe I can also have a couple videos as static assets accessible for anyone visiting the website, but host all the rest on R2 and make them accessible only through user accounts. (Ultimately I’m just trying to ease my fears of being attacked or something and some bot doing millions of queries, which is why the static assets with no serve limits seemed amazing).
Well, I don’t see why “other large files” will not include videos.
The “Paid services” is not just any paid service, but the appropriate paid service depending on what’s causing the “disproportionate” usage: eg Images or R2 subscription if your disproportionate traffic comes from serving images, R2/Stream if you’re serving a ton of videos, etc.
So (and I’ve seen this before), you could even be on the $250/month Business plan, but still come afoul of the “disproportionate traffic” clause if you’re not using the appropriate paid product (in addition to the standard CDN “Business” plan) to serve such traffic.
That’s actually how I ended up here, I didn’t figure out which category would both fit my question and allow me to support them on a free plan But I’ll take a look again.