Centrifugo delivers channel-based real-time messages to online clients over WebSocket, SSE, HTTP streaming, gRPC, and WebTransport. Backends publish via HTTP or gRPC APIs.
Overview
Centrifugo is a real-time messaging server built around channel subscriptions, so applications treat it as a user-facing publish and subscribe layer separate from business logic. Client devices connect with official SDKs or unidirectional transports, while your application server publishes events into named channels.
The server supports several wire transports and scales across nodes using Redis, PostgreSQL, or NATS for coordination. Features include flexible authentication, subscription multiplexing, channel history with reconnect recovery, presence, RPC to backends, JSON or Protobuf payloads, and an embedded admin web UI with Prometheus metrics.
Deployment is commonly started via Docker or native packages, with documentation covering production configuration and client quickstarts. The design targets chat, live comments, dashboards, multiplayer sync, IoT feeds, and streaming AI token delivery where many subscribers must receive the same publication efficiently.
Centrifugo is language-agnostic: any backend can integrate through a simple publishing API while clients subscribe through the supported transports and SDKs.
Key features
- Channel-based pub/sub for online users
- WebSocket, SSE, and HTTP streaming transports
- Redis, PostgreSQL, or NATS multi-node scaling
- JWT and proxy connection authentication
- Message history and reconnect recovery
- Online presence and join or leave events
- HTTP and gRPC backend publish API
- Embedded admin UI and Prometheus metrics
Use cases
- Real-time chat and messaging
- Live dashboards and metrics streaming
- Multiplayer game state sync
- AI response token streaming to browsers
- Fan-out live data feeds to many clients
Open-source alternative to
Ably“Centrifugo is an open-source real-time messaging server — a self-hosted alternative to PubNub, Pusher, Ably, Socket.IO, Phoenix.PubSub & SignalR.” source
PubNub“Centrifugo is an open-source real-time messaging server — a self-hosted alternative to PubNub, Pusher, Ably, Socket.IO, Phoenix.PubSub & SignalR.” source
Pusher“Centrifugo is an open-source real-time messaging server — a self-hosted alternative to PubNub, Pusher, Ably, Socket.IO, Phoenix.PubSub & SignalR.” source