Web Sockets on Vercel

Can I host a Web Socket server on vercel? I know you can't directly cause of it's serverless architecture but is there a work around? and if not what are the alternatives just for context I'll be using that web socket server as a signaling server to send data between 2 peers
Solution:
Hi @.Boody You can't deploy websocket server to vercel and you wouldn't want to, based on how their pricing works. If your two peers are Servers with a public facing IP/Domain, you probably could switch to webhooks. Or if it is just one pair of peers and you're ok with not having realtime data, a pull/poll method might also a cheaper option than the following: Otherwise, have a look at Pusher.com, Ably.com, soketi.app, ParyKit. The first two provide ws as a service, the last two give a kickstart to host the ws yourself....
Jump to solution
2 Replies
Solution
Xanacas
Xanacas4d ago
Hi @.Boody You can't deploy websocket server to vercel and you wouldn't want to, based on how their pricing works. If your two peers are Servers with a public facing IP/Domain, you probably could switch to webhooks. Or if it is just one pair of peers and you're ok with not having realtime data, a pull/poll method might also a cheaper option than the following: Otherwise, have a look at Pusher.com, Ably.com, soketi.app, ParyKit. The first two provide ws as a service, the last two give a kickstart to host the ws yourself.
.Boody
.BoodyOP4d ago
thanks I'll look into the last 2 I'm also considering firebase because I need the real time data capabilities

Did you find this page helpful?