I'm running `wrangler dev` ```json "scripts": { "deploy": "wrangler deploy", "dev": "wrangler de
I'm running
wrangler dev"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"test": "vitest"
}Run npx-to test your Worker locally before deploying to Cloudflare’s global network.wrangler dev --remote
Browser Rendering is now available to all customers with a paid Workers plan. Each account is limited to running two new browsers per minute and two concurrent browsers at no cost during this period. Check our developers page to get started.- Browser Rendering API GA, rolling out Cloudflare Snippets, SWR, and bringing Workers for Platforms to all users | The Cloudflare Blog
units per months - where one unit = 30 secondsRequests: Alarm DO every 10 seconds = 259,200 pings / month. The first 1 million pings are free = $0 or $0.03888 (if you exceed free tier) - 259,200 requests / 1,000,000 = 0.2592 million requests * $0.15 = $0.03888Time: 30 days * 24 hours/day * 3600 seconds/hour = 2,592,000 secondsCompute Duration: The DO is active for 2,592,000 seconds. Converting to GB-seconds: 2,592,000 seconds * 128 MB / 1 GB = 331,776 GB-s. The first 400,000 GB-s are free = $0 or $4.1472 (if you exceed free tier) - 2,592,000 seconds * 128 MB / 1 GB => 331,776 GB-seconds / 1,000,000 => 0.331776 million GB-seconds * $12.50 = $4.1472
getRandomSession function in the reuse browser example, which filter out the existing connected browser sessions using connectionIdqueue() with single page and closes that immediately. So I should be able to re-use the browser in multiple worker as there might be 10-15 pages without any issue I guess in same browser. Or it's limited to single connection only and I will get error if I try to use a browser which is currently in use on any other worker?page.goto randomly freeze and worker stops processing any more URL from queue() or 15 minutes
A browser instance gets killed if it does not get any command for 60 seconds, freeing one instance.
https://www.google.com/maps/?force=litehttp://maps.google.com/?force=canvasunitsRequestsTimeCompute DurationgetRandomSessionconnectionIdconst sessionsIds = sessions
.filter(v => {
return !v.connectionId; // remove sessions with workers connected to them
})
.map(v => {
return v.sessionId;
});queue()queue()page.gotoA browser instance gets killed if it does not get any command for 60 seconds, freeing one instance.https://www.google.com/maps/?force=litehttp://maps.google.com/?force=canvas