Overview of the Migration to Cloudflare Containers
Browser Run's recent migration to Cloudflare Containers marks a significant infrastructure overhaul aimed at improving scalability, reliability, and performance. Previously, Browser Run shared infrastructure with Browser Isolation (BISO), leading to inefficiencies. The larger container images of BISO increased startup latency, while its usage patterns created resource contention, given the fundamentally different workloads of both services. These limitations necessitated a new approach to resource allocation and workload management.
By leveraging Cloudflare Containers, the team effectively separated Browser Runs infrastructure from BISO. This decision mitigated the scaling bottlenecks and latency issues that previously hampered the platform. The adoption of Durable Object-enabled Containers provided the foundation for improved global distribution and faster spin-up times for browser instances, enabling a smoother user experience for both developers and AI agents.
Performance Improvements Achieved
Post-migration, Browser Run achieved a 4x increase in concurrency, now supporting up to 120 simultaneous browser instances. Additionally, the rate of browser spin-ups has reached 60 per minute, a significant improvement over prior limits. These enhancements drastically reduce resource contention, ensuring that high-demand scenarios are handled more efficiently.
Another critical metric saw a reduction in response times for Quick Actions by more than 50%. This improvement underscores the enhanced processing speed and reduced latency made possible by the optimized containerized environment. The performance gains are both quantitative and qualitative, as users experience fewer delays and higher reliability during peak usage periods.
Migration Methodology
The migration process was executed incrementally to minimize disruptions. Initially, a Worker was introduced into the request path to route a subset of traffic to the new containerized browsers. This dual-path strategy allowed for real-time performance monitoring and issue resolution, ensuring a smooth transition without impacting end-users.
This gradual rollout also provided the opportunity to identify and address pain points within the infrastructure. By maintaining dual support for both BISO and Cloudflare Containers during the migration, the team ensured operational continuity while validating the benefits of the new architecture in production.
Scalability and Reliability Enhancements
Cloudflare Containers offer a more resilient and scalable foundation for Browser Run. Unlike the shared infrastructure with BISO, the new setup enables better resource isolation, reducing contention and improving system stability under variable workloads. This isolation is particularly beneficial given Browser Runs short, spiky usage patterns.
Furthermore, the global distribution of containerized instances addresses prior latency issues. By geographically aligning resources closer to end-users, the platform now delivers a more consistent performance worldwide. This improvement is critical for applications requiring real-time browser interactions, such as end-to-end testing and AI-driven web tasks.
Broader Implications for Development and Deployment
Beyond performance metrics, the migration has streamlined the development and deployment pipeline. The team can now ship fixes and features faster, aligning with a more agile development approach. This agility stems from the modularity and flexibility of the containerized environment, which simplifies the integration of updates without compromising system stability.
Additionally, by building on Cloudflares platform, the team gains firsthand experience with the infrastructure, enabling proactive issue resolution. This approach not only benefits Browser Run but also informs the broader development of Cloudflares container technologies, creating a feedback loop that enhances both the product and its underlying platform.