Clarification about cache and free plan
Hello all, I am operating a small web server through a cloudflare tunnel and am trying to make sure my cache is set up properly. I have a cache rule set up to make sure only the correct pages on the site are cached, and that is the only configuration I have done from the default.
My question is do I need to be worried about tiered cache and reserve cache or does the free plan have some cache allowance where I can continue to use cache without having to pay for cache reserve?
Right now my site has been live for 3 days and I have about 110 MB of cache according to the dashboard.
My main concern is getting suddenly hit with egress fees or some other problem because I went over some cache limit or something.
23 Replies
Cloudflare doesn't have egress fees or cache limits in terms of usage (well, other then the 512mb per object max limit) for free or pay as you go plans.
tiered cacheSmart Tiered Cache is free
reserve cacheCache Reserve will always charge you though, it's billed in rounded up increments, the min is like ~5.1 usd/month or something like that and often not worth it unless your origin is super super slow
So if I continue with the default normal cache I won't get charged for any egress fees? I'm not really concerned about performance, my main concern was being charged by cloudflare
free plan is truly free unless you specifically subscribe to addons like Argo Smart Routing/Cache Reserve
Okay great, yeah I don't need anything that the default service doesn't provide
Thank you for the help!
are there any limits on free? eg using 10tb of bandwidth daily
Main thing is just the clause about non-html
https://www.cloudflare.com/service-specific-terms-application-services/#content-delivery-network-terms
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.As long as you're not doing that, or if you are, you're using R2/Stream/specific products, then there's no exact limit. Sales may reach out to you after a point to upgrade, but 10tb daily is ~310tb/mo which isn't that much
thanks for the clarification :heart:
if someone would to use cloudfare for serving live streams, what do you think its the monthly limit for the free plan? we currently use free plan with argo, paid plans don't really add value, but if we break tos we will upgrade.
Serving live streams through cdn/proxy without using r2/stream/etc? No idea what the limit would be, their wording in the ToS there is "you must use those products" "to serve video". They used to have more strict automation which blocked videos after a point and such, but they false fired and caused issues, and I believe it's reportedly all human now, with emails/warnings and not just sudden blocks.
The only way to be exempt from that clause though is to use the specific products or go Enterprise though
So my server will be serving some amount of video and image content, but mostly will be serving text content or links to remote content. Does that fall under this requirement where I should be thinking of special considerations?
The "disproportionate percentage" in the terms is what helps you there, big difference between trying to launch the next youtube vs just having a few images or a single video/two on your site. It matters more overall size too
next youtube 😭
I'm sure there's more aspects to it that they aren't forthcoming with since it's kind of a T&S thing. For example, if you're consuming a lot of bandwidth where its expensive to do so like asia pacific vs in the US where CF has good peering with lots of ISPs/practically free
Unlimited* is a funny game, but you shouldn't run into any trouble if your main usecase is just a normal website/html and the main focus isn't livestreaming/videos/any activity that is outlined not to do in the terms.
I like referring to this CF's persons comment: https://discord.com/channels/595317990191398933/1128753516081582192/1129499373722673243
and yea regardless of everything else, they should reach out/talk to you and not just instantly banned/off the internet
chaika i know this may be off topic, but are there any cloudfare products beside argo smart routing, that will improve something in our case? we serve hls streams worldwide, each has a average of 3mbps and we use about 10tb to 20tb monthly
improve? hmm, those are livestreams?
yes
Improve is a bit vague, could technically include waf/smart rate limiting/etc, but if you mean specifically the streams themselves, other then trying out Cloudflare Stream, nothing really comes to mind, not really my area of knowledge though. Lots of fun things you can do with videos w/ r2 & caching
*by improving i mean performance eg transit times / ttfb and better error rate
before we had argo it had an 1 in 30 error rate when connecting, with argo it improved to 1 in 50 and transit time from 600ms to 400ms
maybe magic wan? did you ever used it?
super enterprise (which means upwards of a few thousand/month min) and has lots of modes to setup, gre/tunnels to the nearest CF location probably wouldn't help much. Having a direct link to CF if your current provider doesn't could help, but you could also just switch providers for that
the other direction would be to have servers in other geolocations and then throw LB in front to route to them, going to have lower ttfb/less chance of issues going shorter distances. If it's livestreaming you still have to sync the content of course, not sure how beneficial that would be
hmmm, okay thanks for the help and the quck responses! are there any other cdn providers that we could use in our scenario, that you used and had a positive experience / you heard good about them?
Bunny.net doesn't have a clause about video (i.e you can use it for anything you want), you pay per gigabyte though. They've got some livestreaming stuff too but never tried it
hmm, fundementally it would make sense though if you're fine with some buffering, to replicate live stream to a closer server (one concurrent stream) to serve to many visitors, an interesting idea to maybe try if not difficult
nope, we cant do that, we actually have some live cameras that have rtsp and then we take rtsp and do pass trough rtsp -> hls on our servers, and then we serve with cloudfare globally
so because we have cameras in Bucharest and around it, we can only have servers here
I'm sure it's possible on some level, just might be difficult, stream the hls to other servers which stream to clients via CF. Would increase buffering/effective latency but lower actual latency, and potentially errors since it's a shorter path
Stil not sure how much that would help in reality though.
It wouldn't help at all if all the cameras, your servers, and your clients are in/around Bucharest though, might make sense to look at your own software for optimizations and playing with encoding settings
thats actually a very solid idea
i will speak to the team and see if its worth implementing, most of our users are 🇺🇸 / 🇪🇺 / 🇦🇺