Increased Browser Rendering limits for Cloudflare Workers
Browser Rendering now supports 10 concurrent browser instances per account and 10 new instances per minute, up from 2 concurrent instances, enabling more browser automation tasks to run from Cloudflare Workers. Users can manage concurrent sessions with Queues or Workflows.
Browser Rendering now supports 10 concurrent browser instances per account and 10 new instances per minute, up from the previous limits of 2.
This allows you to launch more browser tasks from Cloudflare Workers.
To manage concurrent browser sessions, you can use Queues or Workflows:
index.jsjsexport default {
async queue(batch, env) {
for (const message of batch.messages) {
const browser = await puppeteer.launch(env.BROWSER);
const page = await browser.newPage();
try {
await page.goto(message.url, {
waitUntil: message.waitUntil,
});
// Process page...
} finally {
await browser.close();
}
}
},
};index.tstsinterface QueueMessage {
url: string;
waitUntil: number;
}
export interface Env {
BROWSER_QUEUE: Queue<QueueMessage>;
BROWSER: Fetcher;
}
export default {
async queue(batch: MessageBatch<QueueMessage>, env: Env): Promise<void> {
for (const message of batch.messages) {
const browser = await puppeteer.launch(env.BROWSER);
const page = await browser.newPage();
try {
await page.goto(message.url, {
waitUntil: message.waitUntil,
});
// Process page...
} finally {
await browser.close();
}
}
},
};Source: original entry ↗
More from Cloudflare
Follow Cloudflare to get its new changes in your feed and email digest.
Cloudflare One Client for Windows hotfix - trusted certificate chains
A new GA release for Windows Cloudflare One Client is available, addressing an issue with building trusted certificate chains.
Cloudflare One Client for macOS - Trusted Certificate Chain Fix
A new GA release of the macOS Cloudflare One Client is available. This hotfix addresses an issue with building trusted certificate chains.
Cloudflare One Client for Linux
A new GA release of Cloudflare One Client for Linux is now available. This hotfix addresses an issue with building trusted certificate chains.