Scaling Browser Run with Cloudflare Containers: A Complete Migration Guide

By

Overview

Browser Run is a powerful platform that lets developers programmatically control headless browser instances on Cloudflare’s global network. Use cases include end-to-end testing, URL security investigations, PDF rendering, screenshot capture, content extraction, and increasingly, enabling AI agents to interact with the web.

Scaling Browser Run with Cloudflare Containers: A Complete Migration Guide
Source: blog.cloudflare.com

Recently, the team rebuilt Browser Run on top of Cloudflare Containers, resulting in dramatic improvements: you can now spin up 60 browsers per minute via the Workers binding and run up to 120 concurrently — a 4x increase over the previous limit. Additionally, Quick Action response times dropped by more than 50%. These enhancements are live today with zero changes required on your part.

This guide walks you through the migration process from a shared infrastructure (Browser Isolation, BISO) to Container‑powered browsers. You’ll learn the step‑by‑step approach used, common pitfalls to avoid, and how to achieve similar scalability for your own projects.

Prerequisites

Before diving into the migration, ensure you have the following:

No manual reconfiguration is needed for existing Browser Run users — the migration is transparent. However, if you’re building a similar solution, you’ll need to prepare your environment for dual support as described below.

Step‑by‑Step Migration Guide

1. Assess Current Infrastructure

Browser Run originally shared resources with Browser Isolation (BISO). While both use similar browser technology, BISO’s container images are much larger, leading to slower startup times and slower feature delivery. More critically, BISO browsers lacked optimal global distribution, hurting latency and resilience. Browser Run’s usage pattern — short, spiky sessions — conflicted with BISO’s long, steady sessions, causing scaling bottlenecks and availability delays.

Begin by documenting your current performance metrics: browser spin‑up rates, concurrency limits, average response times, and global availability. These baselines will help you measure improvement after migration.

2. Insert a Worker for Dual Support

The team started by inserting a Worker in front of incoming request paths. This Worker acted as a traffic router, directing a subset of users to Container‑powered browsers while the rest continued using BISO browsers. This dual‑support phase was critical for comparing performance and isolating bugs without risking full downtime.

Example Worker pseudocode:

// Route a percentage of requests to Container browsers
const useContainer = Math.random() < 0.1; // start with 10%
const target = useContainer ? containerEndpoint : bisoEndpoint;
return await fetch(target, request);

Gradually increase the percentage as you gain confidence. Monitor error rates and latency closely.

3. Performance Comparison

With dual support active, you can directly compare the two approaches. Key metrics to track:

In the Browser Run migration, these comparisons revealed that Container browsers were already delivering sub‑50% lower latency and could handle 4x more concurrent sessions. Such data builds the case for full adoption.

Scaling Browser Run with Cloudflare Containers: A Complete Migration Guide
Source: blog.cloudflare.com

4. Gradual Rollout

Once confidence is high, plan a phased rollout:

  1. Quick Actions first: Switch all Quick Actions endpoints (screenshot, PDF, content extraction) to Containers.
  2. Workers binding – free accounts: Move free‑tier users to Container browsers.
  3. Workers binding – pay‑as‑you‑go accounts: Roll out to PAYG users after validating stability.
  4. Contract customers: Finally, migrate remaining contract customers. No worker redeployments or user changes are required.

Throughout each phase, monitor error budgets, latency SLOs, and customer feedback. The Browser Run team took exactly this approach, ensuring a seamless transition for all users.

Common Mistakes to Avoid

Summary

Migrating Browser Run to Cloudflare Containers unlocked 4x higher concurrency (120 browsers), 50% faster Quick Action responses, and faster feature delivery. The key to success was a gradual, dual‑support rollout: first with a routing Worker, then phased adoption across endpoints and user tiers. By following the same methodology, you can scale your own browser automation workloads on Cloudflare’s platform without disrupting users.

For existing Browser Run users, these improvements are already live — simply continue using the Workers binding as before. For those building similar solutions, use this guide as a blueprint for your migration journey.

Tags:

Related Articles

Recommended

Discover More

Simulate Complex Systems with HASH: A Step-by-Step GuideAchieving Harmony: A Step-by-Step Guide to Scaling Multi-Agent AI SystemsHow to Scale Your Cloud and AI Operations in Europe with Microsoft AzurePython 3.15 Alpha 6 Drops with JIT Speed Boost and New ProfilerGrafana Cloud Now Lets Users Customize Prebuilt Cloud Provider Dashboards for AWS, Azure, and GCP