Skip to content

Archive

Real-Time Systems

1 articles
Cloud Computing 19 Sep 2026 6 min read

WebSocket Lifecycles in Cloudflare Workers: Upgrade, Coordination, and Hibernation

A Cloudflare Worker can terminate a WebSocket connection directly. The harder architectural question appears after the upgrade succeeds: where does connection state live, which process coordinates multiple clients, and what remains valid when the runtime is no longer in memory? Those are separate boundaries: HTTP request | | Upgrade: websocket v Worker | +-- one independent connection | +-- shared room / session / presence | v Durable Object | v optional hibernation Treating all of them as “WebSocket support” hides the behavior that matters most in production.