Open-source, Pusher-compatible WebSockets server that's simple, fast, and resilient for building real-time applications.

At a Glance:

Soketi is an open-source, Pusher Protocol v7-compatible WebSockets server built on uWebSockets.js for high performance, designed as a self-hosted alternative for both local development and scalable production deployments with multi-app support.

Overview:

Soketi is a next-generation, open-source WebSockets server that implements the Pusher Protocol v7, allowing developers to replace Pusher's managed service with a self-hosted instance. It is built on uWebSockets.js, a C application ported to Node.js, for high throughput and low resource consumption. The server supports app-based access control, allowing multiple applications to be defined and managed through a single deployment. It offers backend data storage options via static arrays, DynamoDB, and SQL-based servers like Postgres. Soketi is designed to function in various environments, from single-instance development setups to multi-instance production clusters, and exposes Prometheus metrics for monitoring.

Key Decision Points:

  • Direct Pusher Protocol replacement: The server is compatible with Pusher Protocol v7, requiring minimal code changes to existing clients—only the host, port, and credentials need to be updated.

  • High-throughput C-based core: Performance is driven by uWebSockets.js, which is benchmarked to be significantly faster than other Node.js-based real-time frameworks like Fastify and Socket.IO.

  • Flexible data storage backends: App data can be stored using built-in drivers for static arrays, DynamoDB, or SQL-based servers such as Postgres.

  • Scalable architecture: For production use, the server can be scaled horizontally using Redis to handle growth in connections and traffic across multiple active instances.

  • Low resource footprint: The service is designed to handle thousands of active connections with high traffic on a cloud instance with less than 1 GB of RAM and 1 CPU.

Core Features:

  • Pusher Protocol v7 implementation: Offers native compatibility with the Pusher WebSocket protocol, enabling a straightforward swap for existing Pusher-based applications.

  • App-based access: Manages API and WebSocket access through definable apps, similar to the Pusher multi-app model.

  • Multiple data storage adapters: Supports storing app configuration and state using static arrays, DynamoDB, or SQL-based servers like Postgres.

  • Prometheus metrics: Exposes metrics for scraping, allowing integration with monitoring stacks to track deployment health and performance.

  • Redis-powered horizontal scaling: Supports scaling across multiple instances using Redis to handle increased load in production environments.

Use Cases:

  • Developers who need to use a Pusher-compatible service for local testing without connection or message limits.

  • Teams seeking a drop-in replacement for their existing Pusher production infrastructure to run a self-hosted WebSocket server.

  • Applications requiring a high-throughput WebSocket server that can operate efficiently on minimal cloud resources (less than 1 GB RAM and 1 CPU).

Open-Source Alternative Value:

As an open-source server implementing the Pusher Protocol v7, Soketi allows users to run their own real-time infrastructure instead of relying on Pusher's managed platform. It can be self-hosted on affordable cloud instances, with documentation stating it handles thousands of active connections on less than 1 GB of RAM and 1 CPU. The server supports horizontal scaling with Redis and provides multiple options for persisting app data, including SQL databases. Its wire-protocol compatibility means existing Pusher clients can migrate by changing connection parameters, offering a path for developers who need a self-managed WebSocket service with predictable performance characteristics.

分享XLinkedInReddit

项目数据

Stars

5,613

Forks

359

许可证

AGPL-3.0

元数据

替代对象
Firebase