当前位置: 首页 > 工具软件 > SocketCluster > 使用案例 >

Node.js的开源、多进程实时WebSocket引擎:SocketCluster

鞠安民
2023-12-01
SocketCluster是一个快速,高度可扩展的HTTP+实时服务器引擎,它可以让你建立多进程实时服务器,利用在机器/实例上所有的CPU核心。它消除了运行您的Node.js服务器作为单一线程的限制。SocketCluster支持直接客户端 - 服务器通信(如Socket.io),和通过发布/订阅频道群组通信。
  • Resilient on both the client and backend - Process crashes, lost connections and other failures are handled seamlessly.
  • Scales linearly as you add more CPU cores and workers (assuming a decent OS) - Tested with up to 16 cores.
  • Also designed to scale horizontally across multiple machines. See sc-redis sample.
  • Support for both pub/sub channels and standard WebSocket client-server interactions (via events).
  • Channels offer a clean way to allow multiple browser tabs to share the same realtime data.
  • Authentication engine compliant with JSON Web Token (JWT).
  • Authorization via middleware functions (access control for emit, publish in, publish out, subscribe and handshake interactions).
  • Client sockets automatically reconnect (by default) if they lose the connection.
  • SocketCluster v2 early release (stable) is a pure WebSocket (no hack) solution.
  • Errors across all processes are caught and logged on master by default.
  • Designed to work alongside any database/datastore (Redis, MySql, PostgreSQL, MongoDB, Cassandra, etc...).
  • Open source alternative to PubNub and Pusher.
  • Can be used as an open source Firebase alternative when integrated with a database of your choice (with some extra work).

  项目主页:http://www.open-open.com/lib/view/home/1436337824052

 类似资料: