Vercel Functions can now serve WebSocket connections, enabling bidirectional communication between clients and server-side code on Vercel.
Use WebSockets for realtime features such as interactive AI streaming, chat, and collaborative apps.
WebSocket connections run on and follow the same and as other Function invocations. With , billing only applies to the time your Function spends processing messages, not idle connection time.Fluid computelimitspricingActive CPU pricing
You can serve WebSocket connections using standard Node.js libraries, with no additional configuration:
Higher-level libraries like are also supported.Socket.IO
Read to get started.the documentation