Edited by humans. Written by AI. How our editing works
All articles

Cloudflare's Dynamic Workers Promise Speed. At What Cost?

Cloudflare's new Dynamic Workers can spawn a million sandboxes per second. The catch? They only run JavaScript—and they won't stay free forever.

Bob Reynolds

Written by AI. Bob Reynolds

March 30, 20266 min read
Share:
Bold yellow "GOODBYE CONTAINERS" text with "NEW" label and orange hexagonal logo against black background

Photo: Better Stack / YouTube

Cloudflare claims its new Dynamic Workers can spawn a million sandboxes per second. That's the kind of number that makes you check if someone added extra zeros by mistake. They didn't.

Dynamic Workers represent Cloudflare's latest attempt to solve a problem that's been around since the first time someone needed to run untrusted code: how do you execute it safely, quickly, and cheaply? The traditional answer has been containers—Linux boxes that spin up, do their work, and shut down. They work. They're also relatively slow and memory-hungry, which matters when you're trying to run thousands of them simultaneously.

Cloudflare's approach trades the flexibility of full containers for speed. Dynamic Workers run on V8 isolates, the same technology that powers Chrome's tabs. Each isolate is a separate execution environment that shares the same JavaScript engine. The result, according to Cloudflare, is something "100 times faster and more memory efficient than a traditional container."

The Better Stack team tested this claim by building a system that programmatically spawns workers—essentially sandboxes that create other sandboxes. Their setup uses a "loader" binding that allows a parent worker to create and control child workers. Each child runs its own code, maintains its own state, and can be reused or discarded as needed.

The demonstration starts simple: a worker that responds with "hello world from the sandbox." But the architecture allows for considerably more complex operations. They showed workers with custom bindings, npm dependencies like Hono bundled in, and even the ability to intercept outbound requests for credential injection.

The AI Angle

The real use case Cloudflare seems to be targeting is AI /article/cloudflare-just-ai-cloned-nextjs-and-open-source-is-shook-generated code execution. This makes sense given the trajectory of tools like Cursor, Replit Agent, and various coding assistants that need to run code snippets safely before presenting results to users.

The Better Stack demonstration adapted code from the E2B cookbook—E2B being an existing sandbox solution—to run on Dynamic Workers instead. The test involved using Anthropic's Claude Sonnet to calculate pi using the Monte Carlo method and generate a visualization.

Here's where the constraints become visible. E2B's version runs in a Jupyter notebook with full filesystem access. It can create images, save them locally, and hand them back to the user. Dynamic Workers can't do this. They have no filesystem.

The workaround involves Cloudflare's R2 storage service—their answer to Amazon S3. The worker generates an SVG visualization and saves it to R2 instead of a local filesystem. It works, but it's a reminder that "100 times faster" comes with tradeoffs.

The JavaScript-Only Problem

Dynamic Workers only execute JavaScript. This is both their strength and their limitation. The V8 engine is extraordinarily good at running JavaScript quickly. It's not good at running Python, Ruby, Go, or any of the other languages developers actually use.

Cloudflare offers a different product—Cloudflare Sandboxes—for scenarios requiring full OS containers. As the video notes, these are "perfect if you want a full OS container with a file system and the ability to run almost any language and any binary." But they're not as fast. The architecture matters.

For AI code execution, this creates an interesting constraint. Most AI coding assistants today generate Python more readily than JavaScript. The ecosystem of data science, machine learning, and scientific computing libraries lives primarily in Python. Forcing everything through a JavaScript interface adds friction.

The demonstration shows this can work—Claude generated Python code that executed successfully within the JavaScript sandbox. But it's an additional translation layer that wouldn't exist with a more traditional container approach.

Scale Testing

The viral hook of "1 million workers per second" deserves scrutiny. The Better Stack team tested with 10,000 simultaneous workers, which they deployed to Cloudflare's infrastructure rather than running locally. The result: near-instantaneous creation of all 10,000 workers, each with its own ID, each capable of independent communication.

That's legitimately impressive. It's also not a million. Extrapolating from 10,000 to 1,000,000 assumes linear scaling, which distributed systems rarely provide. But even if the actual ceiling is lower, the demonstrated capability suggests Dynamic Workers can handle workloads that would be impractical with traditional containers.

The Free Tier Asterisk

There's a line in the video worth dwelling on: "While they're free now, they won't be free forever. So, even though you can run a million dynamic workers per second, you may want to hold off unless you have deep pockets."

This is standard practice for infrastructure companies. Offer generous free tiers during the launch phase, gather adoption and developer mindshare, then introduce pricing once the technology proves essential to enough workloads. It's not deceptive—it's just the model.

What matters is whether the eventual pricing makes sense for the use case. Running 10,000 concurrent sandboxes might be free today. What does it cost in six months? Cloudflare hasn't said, which means early adopters are building on pricing uncertainty.

Companies like Cloudflare (who already use this for their own Code Mode product) and Zite (for running LLM-generated apps) have presumably negotiated terms. Individual developers experimenting with AI agents may find themselves with an unexpected bill.

What This Actually Enables

Strip away the impressive numbers and the core capability is straightforward: programmatically creating isolated execution environments quickly enough that latency stops being a constraint.

This matters for development preview environments where you want each pull request to spin up its own sandbox automatically. It matters for multi-tenant applications where customer code needs isolation but can't justify dedicated containers. It matters for AI coding tools that need to run generated code without trusting it.

The JavaScript limitation constrains the applicability, but doesn't eliminate it. Many automation tasks, API interactions, and web-focused operations live comfortably within JavaScript's capabilities. The question is whether the 100x performance improvement justifies working within those constraints instead of reaching for a slower but more flexible container.

Dynamic Workers are already in production use. The technology works. The unanswered questions are about pricing, long-term scaling characteristics, and whether the JavaScript-only constraint proves more limiting than Cloudflare expects. History suggests the first two will follow predictable patterns. The third depends on what developers actually build.

—Bob Reynolds

From the BuzzRAG Team

AI Moves Fast. We Keep You Current.

Framework breakdowns, tool comparisons, and AI coding insights — distilled from the best tech YouTube creators. Free, weekly.

Weekly digestNo spamUnsubscribe anytime

More Like This

A URL comparison showing "http://localhost:3000/myapp" with a red X on the left and green checkmark on the right against a…

Vercel's Portless Tool: Weekend Project or Real Solution?

Vercel Labs released Portless to eliminate localhost port conflicts. Does this weekend project solve a real problem, or create new ones?

Rachel "Rach" Kovacs·5 months ago·5 min read
Man wearing headphones with surprised expression next to large green open source keyhole logo against code background

Cloudflare Just AI-Cloned Next.js and Open Source Is Shook

Cloudflare used AI to recreate Next.js in a week. The performance claims are wild, but the real story is what this means for open source's future.

Zara Chen·5 months ago·5 min read
Retro arcade-style graphic with "CLAUDE LOOPS NOT YET" text, orange pixelated creature, and red virus icon with X through…

Claude's Loop Feature Isn't What the Hype Suggests

Anthropic's new loop skill for Claude Code has developers excited, but they're misunderstanding its purpose. Here's what it actually does.

Bob Reynolds·4 months ago·5 min read
Six tech industry experts sit on a stage panel discussing serverless architecture at a GOTO conference event with modern…

AI Coding Tools: Accelerant or Replacement? AWS Insiders Weigh In

AWS engineers and architects discuss how AI tools change software development—from prototyping in 15 minutes to managing 10 trillion Lambda invocations.

Mike Sullivan·5 months ago·6 min read
Man with gray hair and beard smiling at camera against orange gradient background with red 3D starburst graphic and "5X" text

Claude Code's Million-Token Window Changes AI Development

Anthropic's 5x context window expansion enables parallel agent teams and complex migrations. Here's what changes for developers building with AI coding tools.

Dev Kapoor·4 months ago·6 min read
Yellow "80% GONE" text with arrow pointing to pixelated digital elements dissolving on dark background, illustrating code…

PostgREST Promises to Delete Backend Code. Should You?

PostgREST turns Postgres into a REST API with no backend code. Better Stack's demo shows it working in 60 seconds. The question is whether you should.

Bob Reynolds·3 months ago·5 min read
Bold orange and white "CLAUDE DESIGN" text overlays a dark interface screenshot showing grid analytics and UI design tools…

Anthropic's Claude Design: The Latest Bid to Automate Creativity

Anthropic launches Claude Design, an AI tool that generates visual assets from text prompts. But can conversation replace craft in design work?

Bob Reynolds·3 months ago·5 min read
Desktop with Command Prompt and browser warning of unsafe site, overlaid with illustration of robotic face with glowing…

What Happens When AI Gets Root Access to Your Computer

A YouTuber gave an AI agent root access to his Linux system. The results reveal both the promise and the friction of our autonomous software future.

Bob Reynolds·3 months ago·5 min read

RAG·vector embedding

2026-04-15
1,408 tokens1536-dimmodel text-embedding-3-small

This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.