Cloudflare Durable Objects:2026-10-01 起默认保持挂起 I/O
Durable Objects - Pending I/O operations allow Durable Objects to continue long-running work without a connected client
核心运行时行为变更,影响所有依赖 Durable Objects 处理长任务或异步工作的开发者。请检查兼容性日期设置,确保关键任务不因客户端断开而意外终止。
Durable Objects remain active while handling a request from a connected client. This change applies when no client is connected, such as when an agent continues a submitted job after its client disconnects.
在处理来自已连接客户端的请求时,Durable Objects 保持活跃状态。当没有客户端连接时(例如代理在其客户端断开连接后继续执行已提交的作业),此更改适用。
This behavior is the default for Workers with a compatibility date of 2026-10-01 or later. To use it with an earlier date, add the durable_object_io_tasks_prevent_eviction compatibility flag. To opt out, add the durable_object_io_tasks_do_not_prevent_eviction flag.
对于兼容性日期为 2026-10-01 或之后的 Workers,此行为是默认设置。若要在较早的日期使用它,请添加 durable_object_io_tasks_prevent_eviction 兼容性标志。若要选择不加入,请添加 durable_object_io_tasks_do_not_prevent_eviction 标志。
Pending service binding requests now keep Durable Objects running while they wait for a response. Pending calls to another Durable Object through remote procedure call (RPC) or fetch(), as well as this.ctx.container.monitor(), now also keep the Durable Object running.
待处理的服务绑定请求现在会在等待响应期间保持 Durable Objects 运行。通过远程过程调用 (RPC) 或 fetch() 对另一个 Durable Object 进行的待处理调用,以及 this.ctx.container.monitor(),现在也会保持该 Durable Object 运行。
Promises passed to this.ctx.waitUntil() and pending setTimeout() and setInterval() timers also receive this protection.
传递给 this.ctx.waitUntil() 的 Promises 以及待处理的 setTimeout() 和 setInterval() 计时器也享有此保护。
Previously, Cloudflare could shut down an idle Durable Object while one of these operations remained pending without a connected client. This could stop unfinished work.
以前,Cloudflare 可以在这些操作之一处于待处理状态且没有已连接的客户端的情况下关闭空闲的 Durable Object。这可能会导致未完成的工作停止。
This change helps you run long-running tasks such as agents. An agent can call tools through service bindings, coordinate with other Durable Objects, or wait for a container process without relying on the original client to remain connected.
此更改有助于你运行长时间运行的任务,例如代理。代理可以通过服务绑定调用工具、与其他 Durable Objects 协调,或等待容器进程,而无需依赖原始客户端保持连接。
Outbound fetch() requests to external services, TCP sockets, and outbound WebSockets already keep Durable Objects running.
发往外部服务的出站 fetch() 请求、TCP 套接字和出站 WebSocket 已经能够保持 Durable Objects 运行。
Each pending operation prevents idle shutdown for up to 15 minutes. Starting another one later can extend the Durable Object's time in memory. The limit applies to each operation, not to the total time in memory.
每个待处理的操作最多可防止空闲关闭 15 分钟。稍后启动另一个操作可以延长 Durable Object 在内存中的停留时间。该限制适用于每个操作,而非内存中的总时间。
Duration charges continue while an operation prevents eviction.
在操作防止驱逐期间,持续时间费用将继续产生。
For more information, refer to Lifecycle of a Durable Object.
更多信息,请参阅 Durable Object 的生命周期。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力