I have some static files that is hosted on storage server.
The files is surfed to visitors through different domain name and the domain name and IP is exposed to public.
I would like to hide the files origin domain and IP from visitors by using cloudflare workers.
The files will not cached on cloudflare but they will surf through cloudflare proxy when i use worker for that purpose.
My concern now in the bandwidth restriction when using cloudflare worker because they will be a huge number of TBs going through CF proxy and i need to know is there any limitation when doing that on cloudflare worker paid plan?
+1 would like to know answer. Also TransformStream and fully buffered file size limits for upload/download.
Replying to both, with regards to bandwidth limits there are no actual limits in bandwidth (provided it doesn’t exceed CPU and RAM usage with some processing due to the size of each request). There are some limits on extremely high usages (that increase by plan level) which aren’t exactly specified since they are always changing due to various factors.
I would suggest, especially for @mattdlockyer’s specific question to open a ticket with Support, they can ask internally.
I would also report back here the ticket numbers so that @cloonan can direct them to the best people internally and/or can pitch in.
You should review Cloudflare’s TOS regarding the caching and proxying of traffic. It is intended to be used for normal website traffic. If you are looking to build a file locker or other service for delivering content that is outside of a “normal” website in significant quantities the Pay as you Go Agreement specifically doesn’t allow that and you’d want to talk to sales about a contracted agreement which met your use case.
Because the interwebs are a wide and varied place, defining that isn’t explicit… but a local band who put up a few of their songs on a website would likely not be considered in violation, but someone who built a music streaming or download service might even if the bandwidth utilization was equivalent in both instances.
Makes more sense now.
I have a related support ticket here, if you could get someone other than a bot to answer
Hi @mattdlockyer, will find that and add myself to it. In the meantime, if you receive an automatic response, please reply and indicated you’re still having the issue.
@matteo @OliverGrant , Thank for info. I know that paying for cloudflare worker is kindda pay for CPU, but also when we request to download a file using cloudflare worker as a proxy to original file location then the file will downloaded as a chunked file making many request depending on the file size. And every request will be billed by cloudflare worker. So this mean i am paying for downloading file and the price for what i pay is increase depending on file size. Unless of course if i pay for one request not matter what is the size of that file.
You pay per user request, so as long as you don’t exceed the maximum reqs per Worker execution (I believe it’s 50, not sure though) you don’t pay more.
Thanks @matteo , please help me understand this:
If i downloaded a 100 MB file using cloudflare worker as a proxy, how many requests can i make on download?
Also is this counted toward the 50 ms limit?
Because it may take up-to hours to download that file by bad connection users.
We need to split the Worker runtime to the actual download time.
First the 50 ms is CPU time, not real time. Secondly the Worker stops running once the file has been passed to the response, it doesn’t actually handle the download to the user.
That would be one request.
Yes, but also no. Downloading 100 MB without processing gives no problems, I can download various GBs.
@matteo , I will pay for request i made and the CPU usage so this is not an issue per what you said.
My main concern now is the bandwidth usage because from what i understand when i mask my original server IP and file origin URL using cloudflare workers the whole bandwidth will go through cloudflare which it may be a huge bandwidth. Unless there some thing cloudflare team do that make worker doesn’t use the valuable bandwidth resources of CF.
I doesn’t want to redesign my download process relying on CF and find that i may be kicked and banned after days of usage due to high bandwidth usage on CF worker.
Thanks again for your help.
I can’t say that you will or you won’t be banned. I don’t work for Cloudflare and I don’t set the policies.
Contact support and ask them.