Could CF / R2 interfere with legit traffic?

i know for a fact i will have a big spike in downloads roughly a week from now. i don't get too much traffic yet but it will be about 3000 users downloading the same ~50 files at once. will r2 be okay with this? i don't want cf firewall or some hidden r2 rate limits to kick in and cause real users to not be able to recieve their downloads
7 Replies
Cyb3r-Jak3
Cyb3r-Jak38mo ago
Yeah there should be no problem with it. I don't know the size of your files but I would recommend using a custom domain to take advantage of caching
celestial
celestial8mo ago
yep it's on a custom domain through r2 and i have rules set up to cache on that subdomain most files are in the 10-150mb range would caching be completely impossible if I switched to serving through workers api? been meaning to get some more advanced analytics going but there's no way to use callbacks on say a file download event via r2
Cyb3r-Jak3
Cyb3r-Jak38mo ago
You'd have to use the cache API in workers but it would still work. It is the only way to know if know what files have been downloaded.
celestial
celestial8mo ago
So to clarify, CF on its own will not cache responses from a worker (let's say test.com/image.png , no query params, just a straight "filepath") if I don't directly use the Cache API, but it will do it for me if I go through the r2 subdomain?
Cyb3r-Jak3
Cyb3r-Jak38mo ago
Correct. Workers run in front of the cache so the only way to cache is with the cache API. A custom domain for R2 will use your zone's cache settings
celestial
celestial8mo ago
So I would then be manually placing objects in some arbitrary CF cache, and serving them myself from said cache in the worker's responses? Would this be significantly slower than the default caching behavior, or about the same speed?
Cyb3r-Jak3
Cyb3r-Jak38mo ago
You can stick the cache responses after you have returned a response to the user so there shouldn't be any significant speed difference
Want results from more Discord servers?
Add your server
More Posts
Since this afternoon Error when deploying all our nuxt applicationsApp: xavi-blog-nuxt-wp.pages.dev 20:00:23.177 Deploying your site to Cloudflare's global networkBuilding a simple spam workerHi there, I am trying to build a simple spam worker which would go through an array of email domainsWhat is the CPU limit for hourly crons?My worker is unbounded, and the cron is running hourly, which I believe means it should have a relatGitHub - rasviitanen/rustysignal: Signal...Hey guys trying to build a Signalling Server with Rust based on this repo: https://github.com/rasviiHackathon: Access to Workers Browser Rendering API neededHey folks, we are currently doing a hackathon and really need access to the Workers Browser RenderinI mean, that's pretty unusual, soI mean, that's pretty unusual, so without a reproduction it would be hard to tell why. There is docuis it possible to cache the responses of a URL, for all requests, even if it’s their first timeIn order to save costs, will it be possible to cache every GET request for a period of time.Where will my Cloudflare pages be served?I'm planning on using cloudflare pages for my static app. But from what REGION will it transfer dataPages build times have gone from 20 mins to 35+ minsLast week we started seeing our pages build step time increase by about 15 minutes with no code chanIn my traffic reports, it shows 45.88% of requests being something labeled as "txt."That seems odd. What does it consider as "txt"? HTML is farther down the list. What would that typic