Live
AI‑scale version control: Anthropic’s Scion replaces git for massive code churnApplying Trust‑in‑Depth Controls to Autonomous AI AgentsOpenAI’s three‑month GPT‑4 model retirement forces rapid migration to GPT‑6 LunaBorderless Lakehouse Integration with Gemini: Implications for EngineersGitHub AI Scan for PRs now GA: advisory AI‑driven findings for non‑CodeQL languagesAutonomous Penetration Testing Shows 89% Success on Fresh CVE Benchmark – Operational ImplicationsRunning Temporal Serverless Workers on Cloud Run: Zero‑Cost Scaling for Pull‑Based WorkloadsGitHub Agentic Autofix for Code Scanning Alerts Hits GA – Practical Implications for EngineersAI‑scale version control: Anthropic’s Scion replaces git for massive code churnApplying Trust‑in‑Depth Controls to Autonomous AI AgentsOpenAI’s three‑month GPT‑4 model retirement forces rapid migration to GPT‑6 LunaBorderless Lakehouse Integration with Gemini: Implications for EngineersGitHub AI Scan for PRs now GA: advisory AI‑driven findings for non‑CodeQL languagesAutonomous Penetration Testing Shows 89% Success on Fresh CVE Benchmark – Operational ImplicationsRunning Temporal Serverless Workers on Cloud Run: Zero‑Cost Scaling for Pull‑Based WorkloadsGitHub Agentic Autofix for Code Scanning Alerts Hits GA – Practical Implications for Engineers
Cloudflare

Workers Runtime Grace Period Extended to 20 Minutes, Reducing Update‑Induced Interruptions

AI SummaryPowered by AI

The grace period for pending requests and connections during Workers runtime updates has been increased from 30 seconds to up to 20 minutes. This change gives long‑running HTTP calls, streamed AI responses, and live WebSocket sessions more time to finish before an update forces termination.

Cloudflare Workers now allow pending work to continue for as long as 20 minutes when the runtime is updated, up from the previous 30‑second window. Engineers who rely on long‑running HTTP requests, AI streaming, or persistent WebSocket connections should note that updates will no longer cut these operations off as quickly.

What Changed in the Runtime Update Process

When a new runtime version becomes ready, new HTTP requests are routed to it immediately. Existing processes that are still running the older version stop accepting new traffic but keep handling any in‑flight requests. Each of those processes now enjoys a grace period of up to 20 minutes before any remaining work is forcibly terminated.

Impact on Long‑Running Workloads

The extended window directly benefits workloads that naturally exceed a few seconds, such as:

  • AI inference endpoints that stream results back to the client.
  • WebSocket‑based applications that maintain open, bidirectional channels.
  • Any HTTP handler that performs extended processing before responding.

During the grace period, the older runtime continues to serve those requests, while the newer runtime handles fresh traffic. Once the period expires, any request or connection still attached to the old process is terminated.

Operational and Design Considerations

Even with a longer grace period, engineers should design for interruption:

  • Reconnect logic: WebSocket clients must be able to detect a disconnect and re‑establish the session.
  • Idempotent retries: HTTP clients should safely retry failed calls, preserving any side‑effects.
  • State persistence: Applications should store intermediate state externally so that a restart can resume work without loss.
  • Hibernation awareness: Connections using the WebSocket Hibernation API may still drop before the grace period ends; handling such cases remains necessary.

These practices help ensure continuity regardless of when the runtime finally shuts down the old process.

Related CloudNinjas coverage: hands-on guides.

What This Means For Practitioners

From an operational standpoint, the longer grace period reduces the urgency of coordinating runtime updates with traffic spikes, but it does not eliminate the need for resilient client‑side logic. Teams should audit their Workers code for retry safety, verify that any long‑running state is externalized, and test WebSocket reconnection paths. Monitoring should include alerts for unexpected connection terminations that could indicate the grace period is being exceeded. By treating the extended window as a safety net rather than a guarantee, engineers can maintain high availability while still benefiting from faster runtime rollouts.

Originally published atCloudflare Developer Platform