10 Ways Dynamic Workflows Revolutionize Durable Execution for Multi-Tenant Platforms
By ● min read
<p>When Cloudflare Workers first launched, it was a tool built directly for developers: write code, ship it, and scale. Over time, the platform evolved to support multi-tenant ecosystems where platforms could not only use Workers themselves but also let their customers run custom code. From AI-generated implementations to CI/CD pipelines, each tenant now has unique logic. The challenge? Durable execution—workflows that survive failures, sleep, and resume—was still tied to a single deployment. Enter <strong>Dynamic Workflows</strong>. This article unpacks the top 10 innovations that make durable execution follow the tenant, not the deploy.</p>
<h2 id="item1">1. From Direct-to-Developer to Multi-Tenant Ecosystems</h2>
<p>Eight years ago, Workers was a simple platform: you wrote code, we ran it. Today, the landscape is vastly different. Platforms now let their users define business logic at runtime—whether it's AI writing TypeScript on the fly, multi-tenant SaaS with per-customer scripts, or CI/CD products where each repository defines its own pipeline. This shift required a new approach: instead of deploying code once, platforms needed to hand off execution to tenant-specific code dynamically. <a href="#item1">Learn more</a> about how this evolution set the stage for Dynamic Workflows.</p><figure style="margin:20px 0"><img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/45alfDLgghrtXEb4mEsC4u/2211947d011e4e41e9bfc544080552f8/Introducing_Dynamic_Workflows-_durable_execution_that_follows_the_tenant-OG.png" alt="10 Ways Dynamic Workflows Revolutionize Durable Execution for Multi-Tenant Platforms" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px">Source: blog.cloudflare.com</figcaption></figure>
<h2 id="item2">2. Dynamic Workers: Compute That Follows the Tenant</h2>
<p>Last month, the Dynamic Workers open beta gave platforms a clean primitive for compute. You hand the Workers runtime some code at runtime, and you get back an isolated, sandboxed Worker on the same machine—in single-digit milliseconds. No more pre-deploying every possible function. This is the foundation for letting tenants bring their own logic without sacrificing security or performance. It's like giving each user their own miniature server, spun up on demand.</p>
<h2 id="item3">3. Durable Object Facets: Storage That Spins Up Per Tenant</h2>
<p>Compute alone isn't enough—every dynamically-loaded app needs its own state. Durable Object Facets extend the same dynamic deployment idea to storage. Each tenant gets their own SQLite database, spun up on demand, with the platform acting as a supervisor. This means no shared tables, no schema collisions, and full isolation. Perfect for multi-tenant applications where each customer's data must remain separate, even when code is uploaded at runtime.</p>
<h2 id="item4">4. Artifacts: Versioned Source Control at Scale</h2>
<p>Storage and compute solved, what about source control? Artifacts provide a Git-native, versioned filesystem that you can create by the tens of millions. One per agent, one per session, one per tenant. This isn't just file storage—it's a full version history, perfect for CI/CD pipelines, agent loops, or any scenario where code evolves over time. Artifacts complete the trinity of dynamic deployment: compute, storage, and source control.</p>
<h2 id="item5">5. The Static Workflow Problem</h2>
<p>Before Dynamic Workflows, durable execution had a hard limit: your workflow code had to be part of your deployment. Your <code>wrangler.jsonc</code> would bind a single class to a workflow. That's fine for traditional apps. But the moment you want to let customers ship their own workflows—like an AI writing TypeScript per tenant or a CI/CD product with per-repo pipelines—you hit a wall. There's no single class to bind. This is the gap Dynamic Workflows bridges.</p>
<h2 id="item6">6. Introducing Dynamic Workflows: Durable Execution on Demand</h2>
<p>Today, we bridge durable execution and dynamic deployment with Dynamic Workflows. Now, instead of binding a fixed class, you can pass a workflow definition at runtime—whether it's from a tenant's uploaded code, an AI-generated script, or a per-repo pipeline. The workflow engine handles the rest: state persistence, failure recovery, sleep, and external event waiting—all on a per-instance basis. It's durable execution that truly follows the tenant.</p><figure style="margin:20px 0"><img src="https://blog.cloudflare.com/cdn-cgi/image/format=auto,dpr=3,width=64,height=64,gravity=face,fit=crop,zoom=0.5/https://cf-assets.www.cloudflare.com/zkvhlag99gkb/oBNxdamAbzN4vUeiCSLWu/e3f3bc3ce02ed15a4e5b793f62eaa7f2/Dan_Lapid.jpg" alt="10 Ways Dynamic Workflows Revolutionize Durable Execution for Multi-Tenant Platforms" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px">Source: blog.cloudflare.com</figcaption></figure>
<h2 id="item7">7. Use Case: AI-Generated Workflows for Every Tenant</h2>
<p>Imagine an app platform where users describe what they want, and an AI agent writes the implementation as a durable workflow. Each tenant gets a unique workflow—transcoding, onboarding, billing—that survives restarts and can wait days for human approval. With Dynamic Workflows, the AI doesn't need to pre-generate all code at deploy time. It can create workflows on the fly, and the engine ensures they reliably complete.</p>
<h2 id="item8">8. Use Case: CI/CD Pipelines as Per-Repo Workflows</h2>
<p>CI/CD products often let each repository define its own pipeline. Before, you'd need to pre-deploy all possible pipeline logic. With Dynamic Workflows, each repo can define a durable pipeline that runs as a separate workflow instance. Steps compile, test, deploy—all with retries and timeouts. If a step fails, the workflow pauses and resumes from where it left off. No more building a single monolithic pipeline.</p>
<h2 id="item9">9. Use Case: Long-Running Agent Loops with Custom Plans</h2>
<p>Agent SDKs are all the rage—agents that write and run their own tools. But agents need durable memory: a plan that survives crashes and can sleep for hours. Dynamic Workflows lets each agent define its own durable plan. The agent can create a workflow, add steps dynamically, and rely on the engine to keep state even if the isolate restarts. This is a game-changer for autonomous agent applications that run for days or weeks.</p>
<h2 id="item10">10. The Future: Unified Dynamic Deployment</h2>
<p>With Dynamic Workers, Durable Object Facets, Artifacts, and now Dynamic Workflows, we've completed the trifecta of dynamic deployment: compute, storage, source control, and execution. The next step is seamless integration—where a platform can spin up a tenant's code, database, versioned files, and durable workflow all from a single API call. This unlocks a new era of “serverless tenantware” where every customer gets a fully isolated runtime environment, on demand.</p>
<h2>Conclusion</h2>
<p>Dynamic Workflows close the loop on multi-tenant durable execution. Platforms can now let customers ship custom workflows without compromising reliability or isolation. Whether you're building an AI app platform, a CI/CD service, or an agent SDK, Dynamic Workflows give each tenant their own durable execution engine—at scale. The future is dynamic, and it follows the tenant.</p>
Tags: