|
| 1 | +--- |
| 2 | +title: Overview of Web PubSub for Socket.IO Serverless Mode |
| 3 | +description: Get an overview of Azure's support for the open-source Socket.IO library on serverless mode. |
| 4 | +keywords: Socket.IO, Socket.IO on Azure, serverless, multi-node Socket.IO, scaling Socket.IO, socketio, azure socketio |
| 5 | +author: zackliu |
| 6 | +ms.author: chenyl |
| 7 | +ms.date: 08/5/2024 |
| 8 | +ms.service: azure-web-pubsub |
| 9 | +ms.topic: how-to |
| 10 | +--- |
| 11 | + |
| 12 | +# Overview Socket.IO Serverless Mode (Preview) |
| 13 | + |
| 14 | +Socket.IO is a library that enables real-time, bidirectional, and event-based communication between web clients and servers. Traditionally, Socket.IO operates in a server-client architecture, where the server handles all communication logic and maintains persistent connections. |
| 15 | + |
| 16 | +With the increasing adoption of serverless computing, we're introducing a new mode: Socket.IO Serverless mode. This mode allows Socket.IO to function in a serverless environment, handling communication logic through RESTful APIs or webhooks, offering a scalable, cost-effective, and maintenance-free solution. |
| 17 | + |
| 18 | +## Differences Between Default Mode and Serverless Mode |
| 19 | +| Feature | Default Mode | Serverless Mode | |
| 20 | +|------------|------------|------------| |
| 21 | +|Architecture|Use persistent connection for both servers and clients | Clients use persistent connections but servers use RESTful APIs and webhook event handlers in a stateless manner| |
| 22 | +|SDKs and Languages| Official JavaScript server SDKs together with [Extension library for Web PubSub for Socket.IO SDK](https://www.npmjs.com/package/@azure/web-pubsub-socket.io) is required; All compatible clients|No mandatory SDKs or languages. Use [Socket.IO Function binding](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO) to simplified integrate with Azure Function; All compatible clients| |
| 23 | +|Network Accessibility| The server doesn't need to expose network access as it proactively makes connection to the service|The server needs to expose network access to the service| |
| 24 | +|Feature supports|Most features are supported except some unsupported features: [Unsupported server APIs of Socket.IO](./socketio-supported-server-apis.md)|See list of supported features: [Supported functionality and RESTful APIs](./socket-io-serverless-protocol.md#supported-functionality-and-restful-apis)| |
| 25 | + |
| 26 | +## Next steps |
| 27 | + |
| 28 | +This article provides you with an overview of the Serverless Mode of Web PubSub for Socket.IO. |
| 29 | + |
| 30 | +> [!div class="nextstepaction"] |
| 31 | +> [Tutorial: Build chat app with Azure Function in Serverless Mode](./socket-io-serverless-tutorial.md) |
| 32 | +> |
| 33 | +> [Serverless Protocols](./socket-io-serverless-protocol.md) |
| 34 | +> |
| 35 | +> [Serverless Function Binding](./socket-io-serverless-function-binding.md) |
0 commit comments