Martin 0x522E
CDCloudflare Developers
•Created by Martin 0x522E on 10/23/2023 in #workers-help
Is sending to WebSockets from a DO fully blocking?
We have a simple DO that clients connect to via WS and we use hibernation. The DO has an endpoint that our backend can hit to send out a broadcast to all connected clients.
Sometimes the trigger http call times out, even after 5 retries with backoff. My first attempt to fixing this was to change the trigger endpoint to just schedule an alarm, which then handles the sending, but that didn't help.
I assume that is because the DO is single-threaded and so, if the alarm is running, all incoming requests are blocked.
Today I noticed that this happened even though only ~10 connections were open, so the only explanation I have is that one of them is semi-broken, or just very slow, and that the send() call is fully blocking.
Is that the case? If so, why? This seems to a unnecessarily strict, as sending a WS message could just put it into an outbound queue.
16 replies
CDCloudflare Developers
•Created by Martin 0x522E on 8/3/2023 in #general-help
Is there a way to make cloudflare follow redirects?
My backend returns a redirect to another URL and it would be much better (especially in terms of caching) when Cloudflare could just follow the redirect and then return the response instead of just returning the redirect response.
Is there a way to accomplish this? Maybe with a special header?
3 replies
CDCloudflare Developers
•Created by Martin 0x522E on 6/20/2023 in #pages-help
Is it still not possible to create durable objects inside a pages project?
After the recent blog post about workers and pages moving together this would work soon
See also https://stackoverflow.com/questions/75473236/how-can-you-create-a-cloudflare-durable-object-in-a-pages-project
3 replies
CDCloudflare Developers
•Created by Martin 0x522E on 6/9/2023 in #general-help
Remote Browser Isolation outside of CF for Teams
I have a use-case for using isolated remote browser instances for a SaaS product. Is there any way I can get access without an enterprise plan?
6 replies