OpenAICloudflare Developer PlatformJun 19, 2026, 12:00 AM

Durable Objects - Outbound connections keep Durable Objects alive

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Durable Objects stay alive while outbound connections are active

Key Points

  • Outbound connections prevent eviction
  • 15-minute eviction-prevention cap
  • 70–140s inactivity window resumes

Summary

Durable Objects now remain running for the duration of active outbound connections created via connect() or an outbound WebSocket. Previously, objects could be evicted after 70–140 seconds of no incoming traffic even if they had open outbound streams (a common pattern for streaming LLM responses). With this change, each active outbound connection prevents eviction until the connection closes or a 15-minute cap is reached.

Key Points

  • Active outbound connections (connect() or outbound WebSocket) keep a Durable Object from being evicted.
  • Each connection prevents eviction for up to 15 minutes; after 15 minutes the connection remains open but no longer blocks eviction.
  • When all outbound connections close, the normal 70–140 second inactivity window applies before eviction.
  • Existing per-account Durable Object instance limits still apply.

Practical impact

  • Streaming LLM tokens, long-running outbound TCP/WebSocket tasks, and agent workflows that rely on outbound streams will no longer be cut off mid-stream due to eviction.

Action

  • No code changes required to benefit. Use outbound connections for long-lived streams and monitor your account’s instance limits. Refer to the Durable Object lifecycle docs for details.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Durable Objects — アウトバウンド接続が Durable Objects を存続させる

Durable Objects — アウトバウンド接続が Durable Objects を存続させる

公開日: 2026-06-19

概要

Durable Objects は、connect() またはアウトバウンドの WebSocket により作成されたアクティブなアウトバウンド接続が存在する間、オブジェクトを存続させるようになりました。これにより、アウトバウンド接続を通じて LLM からのストリーミング応答を TCP や WebSocket で受け取るといった一般的なパターンで、接続途中に Durable Object が削除される問題が解消されます。

詳細

  • 変更前: インカミングトラフィックがなくなると、Durable Object は 70–140 秒でエビクション(削除)されていました。アウトバウンド接続が開いたままでもこのエビクションが発生していました。
  • 変更後: 各アクティブなアウトバウンド接続はエビクションを防ぎます。すべてのアウトバウンド接続が閉じられると、標準の 70–140 秒の非アクティブウィンドウが適用され、以降にエビクションが発生します。

Before / After

  • Before: ストリーミング接続がエビクションで途中切断されることがあった
  • After: アクティブなアウトバウンド接続が存在する限り Durable Object は存続する

開発者への影響

Cloudflare 上で agents を構築している場合、この変更は特に重要です。例えば:

  • LLM からトークンをストリーミングしつつ models を呼び出すエージェント
  • アウトバウンド接続を介して長時間実行されるタスク

これらは接続が維持されている間、途中でエビクションされることなく実行を継続できます。

制限事項

  • 各アウトバウンド接続は最大で 15 分 の間、Durable Object のエビクションを防ぎます。
  • 15 分 を経過すると、その接続はエビクション防止の対象ではなくなります(接続自体は引き続き動作します)。
  • Durable Object の既存のアカウントごとのインスタンス上限は引き続き適用されます。

詳細は「Lifecycle of a Durable Object」を参照してください。

参考情報

この変更により、長時間のストリーミングやアウトバウンド中心のワークフローでの安定性が向上します。問題や不明点があれば Cloudflare ドキュメントおよびサポートをご利用ください。

Durable Objects - Outbound connections keep Durable Objects alive | Cloudflare Developer Platform | DocsDigest