just in case if anyone wants to know, it's in documentation " Each incoming HTTP request or WebSocket message resets the remaining available CPU time to 30 seconds. This allows the Durable Object to consume up to 30 seconds of compute after each incoming network request, with each new network request resetting the timer. If you consume more than 30 seconds of compute between incoming network requests, there is a heightened chance that the individual Durable Object is evicted and reset."
I want to know if it's possible to have a cache for CF workers such that if I come up against the rate limiter, I can just get my response from the cache even if it's stale just to have something returning.
sure so I can setup a cron job to hit the r2 to cache worker responses. I'd then be hitting R2 first always to see if the response is cached there and if not/"stale hit" then hit the worker, and just in case the worker comes back with an rate limiting error I can just use what I got from R2.
hey guys, i have a cloudflare worker that does only redirections. for example mydomain.com/path1 then it searches the KVs value for /path1 and redirects to that URL. But i noticed that i get less visitors on my domain after that. do you maybe know what the issue could be?
the domain gets really low number of requests with the worker. its about 50 requests daily now, before it was about 200 hundred i even removed the worker and got more requests directly the enxt day
Please do not post your question in multiple channels per the rules at #welcome-and-rules. It creates confusion for people trying to help you and doesn't get your issue or question solved any faster.
Hey, when I want to create a worker it always includes my email address in a subdomain like this: name.mail.workers.dev, is there a way to create a worker without having it include my email?
Workers aren't based on node.js, they're based on V8 - the JS Engine Chrome and Node.js uses. There is some node compat they've added back in: https://developers.cloudflare.com/workers/runtime-apis/nodejs/ but fundamentally they're never going to have a file system, and currently no node networking support (although I think they were working on that, at least as of the moment it'd be only tcp outgoing, not tcp incoming, or udp in/out), not possible to have generic web servers like express and such, and workers are under pretty strict limitations of needing to startup within 500ms at most, max 128mb of memory and max size of 10 mb on paid