Scripts2026年5月24日·1 分钟阅读

Soketi — Self-Hosted WebSocket Server Compatible with Pusher

A fast, open-source WebSocket server that implements the Pusher protocol, letting you drop in real-time functionality without a third-party service.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Soketi Overview
直接安装命令
npx -y tokrepo@latest install d459fa43-576b-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Soketi is a self-hosted, open-source WebSocket server that fully implements the Pusher Channels protocol. If you already use Pusher client libraries, Soketi works as a drop-in backend replacement, giving you real-time messaging under your own control.

What Soketi Does

  • Implements the Pusher Channels protocol for WebSocket connections
  • Handles presence channels, private channels, and public channels
  • Supports horizontal scaling via Redis or NATS for multi-node deployments
  • Provides a REST API for triggering events from your backend
  • Works with existing Pusher client SDKs across all platforms

Architecture Overview

Soketi is built with Node.js and uses the uWebSockets.js library for high-performance WebSocket handling. It manages app credentials, channel subscriptions, and message routing in-process. For multi-server deployments, Redis or NATS acts as the message broker to synchronize channel state. The REST API accepts event payloads and broadcasts them to subscribed WebSocket clients.

Self-Hosting & Configuration

  • Run with soketi start or via Docker for containerized deployments
  • Configure apps, rate limits, and adapter settings in a JSON config file
  • Set SOKETI_DB_REDIS_HOST to enable Redis-based horizontal scaling
  • Use environment variables for port, SSL certificates, and debug mode
  • Deploy on Kubernetes with the official Helm chart for production workloads

Key Features

  • Full Pusher protocol compatibility with existing client SDKs
  • Built on uWebSockets.js for low-latency, high-throughput connections
  • Horizontal scaling via Redis or NATS adapters
  • Webhook support for channel occupation and member events
  • Rate limiting per app with configurable thresholds

Comparison with Similar Tools

  • Pusher — managed SaaS; Soketi is self-hosted with no per-message billing
  • Centrifugo — custom protocol server; Soketi uses the Pusher protocol for broader SDK compatibility
  • Socket.IO — library-based; Soketi is a standalone server with a REST trigger API
  • Mercure — SSE-based; Soketi uses WebSockets for bidirectional communication

FAQ

Q: Can I use existing Pusher client libraries? A: Yes. Point your Pusher SDK's host setting to your Soketi server and it works without code changes.

Q: How many concurrent connections can Soketi handle? A: Performance depends on hardware, but Soketi handles tens of thousands of connections per node thanks to uWebSockets.js.

Q: Does Soketi support SSL? A: Yes. Configure SSL certificate paths in the config file or terminate TLS at your reverse proxy.

Q: Is Soketi suitable for production? A: Yes. Use Redis or NATS for multi-node deployments and deploy behind a load balancer for high availability.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产