Menu

WebSockets on scale-to-zero platforms in 2026: Durable Objects vs API Gateway vs Cloud Run vs Fly.io vs Vercel
📰

WebSockets on scale-to-zero platforms in 2026: Durable Objects vs API Gateway vs Cloud Run vs Fly.io vs Vercel

DEV Community: serverless·Hüseyin Poyraz Küçükarslan·1 day ago
#7wPwxWPr
#devtoserverless#devto#dev#websocket#gregale
Long article (1437 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on gregale.dev . I build Gregale, so read this as a vendor's page. Competitor details come from each vendor's own docs, linked in the post. This post was written with AI assistance.

On most scale-to-zero platforms, an open WebSocket keeps the instance running and billed, so an app with connected but quiet users never scales to zero. Cloud Run treats an instance with any open WebSocket as active. Fly.io stops the last running Machine only when it has no traffic. Railway's Serverless setting waits for 5 to 10 minutes without outbound traffic, and Vercel keeps an instance's memory billable until its connections close. Three designs avoid this: Cloudflare Durable Objects with the WebSocket Hibernation API, Amazon API Gateway WebSocket APIs, and Gregale managed realtime. Each holds the connection somewhere other than your running code.

Gregale publishes this page.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.