Is there a separate pricing for the browser rendering api? I can't find anything on how much it will
Is there a separate pricing for the browser rendering api? I can't find anything on how much it will cost
While you won’t be billed for the Browser Rendering API yet, we want to be transparent with you about costs you start buildingBut from their
Running Serverless Puppeteer with Workers and Durable Objects blog post back from 09/28/2023 it will cost $0.10/browser sessionbeta in the dashboard too. IDKscreenshot code - linkCannot read properties of undefined (reading 'fetch')


wrangler devRun 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
Running Serverless Puppeteer with Workers and Durable ObjectsbetascreenshotunitsRequestsTimeCompute DurationgetRandomSessionconnectionIdconst sessionsIds = sessions
.filter(v => {
return !v.connectionId; // remove sessions with workers connected to them
})
.map(v => {
return v.sessionId;
});queue()queue()page.goto"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"test": "vitest"
}