denchi
CDCloudflare Developers
•Created by denchi on 4/6/2024 in #workers-help
Notifying big number of clients about R2 file changes
I have a R2 bucket that one client uploads files to using a Worker. Then, I have a couple 1000 other clients that should be informed about these changes as soon as possible (within 10-60 seconds) so they can download the updated files.
What would be the best way to achieve this? Currently I have the clients poll for changes once a minute or so, which works but doesn't really scale well. I need a setup that works well with 1M+ clients :NyanThinking:
4 replies
CDCloudflare Developers
•Created by denchi on 3/17/2023 in #workers-help
128 MB Workers memory limit when using R2
I'm trying to understand the 128 MB memory limit for Workers and what it means for my use-case.
The documentation says
Only one Workers instance runs on each of the many global Cloudflare network edge servers. Each Workers instance can consume up to 128 MB of memory.
Is there any way to monitor how much memory is actually used when my Worker is handling one request?
Also, I have a very simple use-case with a worker that supports GET
and PUT
to put files directly into and read files directly out of a R2 bucket. Those files might be big. Is any significant memory allocated in the Worker for those files during that process? For example, if I have 1000 concurrent requests of people trying to download a file that is 100 MB big, could that cause issues? Would I likely run into any limits?9 replies
CDCloudflare Developers
•Created by denchi on 3/15/2023 in #workers-help
Question about Worker number limits
6 replies