Sockudo – Pusher-compatible WebSocket server in Rust
Описание и применение
Sockudo – легковесный сервер WebSocket, совместимый с протоколом Pusher, который можно развернуть в Docker или Kubernetes, обеспечивая низкие требования к памяти, встроенную метрику Prometheus и горизонтальное масштабирование без изменений клиентского кода.
Задача
Need a self‑hosted, low‑resource WebSocket server that speaks the Pusher protocol so existing front‑end clients can be switched to a self‑hosted backend without code changes.
Результат
Sockudo provides a lightweight, Pusher‑compatible WebSocket server that can be self‑hosted with Docker or Kubernetes, offering built‑in metrics, TLS, CORS, and horizontal scaling adapters, enabling organizations to replace third‑party services without front‑end changes.
Рабочий процесс
- 1. Pull the Sockudo image or install via cargo.
- 2. Configure environment variables for database, Redis, and authentication backends.
- 3. Run
docker run -d -p 6001:6001 sockudo/sockudo:latestor use the provided Makefile for common tasks. - 4. Point Pusher‑compatible clients (e.g., Laravel Echo) to the Sockudo endpoint without code changes.
- 5. Monitor performance and metrics via Prometheus/Grafana dashboards.
- 6. Scale horizontally using Redis, Redis Cluster, or NATS adapters as needed.
Доказательства
Sockudo speaks the Pusher protocol, so if you’re already using Pusher client libraries (like Laravel Echo), you can point them at Sockudo without changing your frontend code.
It runs with Tokio for async, uses fastwebsockets for the WebSocket implementation, and the whole thing is pretty lean on memory.
Getting started is straightforward: docker run -d -p 6001:6001 sockudo/sockudo:latest
- Дата записи: 2026-09-10T13:17:31.107Z