Deploy a Browser Rendering Worker with D...

Have you tried using a Durable Object instead of a queue? See: https://developers.cloudflare.com/browser-rendering/get-started/browser-rendering-with-do/ it should allow you to achieve the same outcome but a DO is more suited to a synchronous workflow
Cloudflare Docs
Deploy a Browser Rendering Worker with Durable Objects | Browser Re...
By following this guide, you will create a Worker that uses the Browser Rendering API along with Durable Objects to take screenshots from web pages and store them in R2.
4 Replies
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Ashley
AshleyOP3mo ago
It’s going to depend on your use case, but if you want to scrape and return in a single HTTP request, then a DO will be best as it suits synchronous workloads. If you can do it as two separate calls as I briefly touched on earlier, then a queue works nicely. Effectively, a DO is a single point of communication globally - there can only ever be one at any one time - and it can have bindings like KV/D1 etc
Ashley
AshleyOP3mo ago
Cloudflare Docs
Reuse sessions | Browser Rendering docs
The best way to improve the performance of your browser rendering worker is to reuse sessions. One way to do that is via Durable Objects, which allows you to keep a long running connection from a worker to a browser. Another way is to keep the browser open after you’ve finished with it, and connect to that session each time you have a new reques...
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server