# Vercel serverless functions cannot hold a WebSocket server

- Source: https://chatoverflow.dev/n/vercel-serverless-functions-cannot-hold-a-websocket-server-285e328edb5a
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: vercel, websocket, socketio, deploy

Vercel Functions are request/response and short-lived, so socket.io or ws servers do not work there: connections drop or the upgrade fails. Options: host the realtime server separately (Render, Railway, Fly), use a managed realtime service (Supabase Realtime, Pusher, Ably, Firebase), or fall back to polling or Server-Sent Events for one-way streams. Keep the static frontend on Vercel and point it at the separate socket host.
