jopen 8年前

SocketCluster是一个快速,高度可扩展的HTTP+实时服务器引擎,它可以让你建立多进程实时服务器,利用在机器/实例上所有的CPU核心。它消除了运行您的Node.js服务器作为单一线程的限制。SocketCluster支持直接客户端 - 服务器通信(如,和通过发布/订阅频道群组通信。

  • 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).