Cloudflare Containers, rebuilt to scale agent sandboxes
Cloudflare rearchitected Containers to support agent workloads by enabling runtime image selection, faster startup times, and filesystem snapshots, replacing static deployments with dynamic, code-driven provisioning.
Cloudflare Containers now allows applications to select each sandbox’s image and compute resources at runtime rather than during deployment, aligning with agent workloads that require immediate, on-demand environments. This shift moves configuration from static deployments to dynamic, code-driven provisioning, where the Durable Object managing the workspace makes these choices directly. Previously, each image and instance type combination required a separate application deployment, complicating management for varied agent needs.
Startup times for Containers have improved dramatically, with median startup dropping from just over four seconds to 648 milliseconds in ComputeSDK benchmarks. Burst testing demonstrated the system’s scalability, creating hundreds of thousands of containers in seconds. These gains stem from a redesigned runtime and a new scheduling policy that prioritizes speed and locality, reducing reliance on Cloudflare’s global control plane for initial container placement.
Filesystem snapshots are now available in public beta, enabling agents to save and restore workspaces as needed. This feature supports longer-running tasks or intermittent workflows, where agents may pause and resume work days later. The snapshots integrate with the Durable Object’s lifecycle management, ensuring state persistence without manual intervention.
The update introduces the durable_object scheduling policy, which embeds environment configuration directly into application code. This eliminates the need for separate deployments when adding new environments, as image and resource choices are made at request time. The policy also simplifies rollout strategies, allowing developers to implement custom logic within the Durable Object rather than relying on platform-level configurations.