About this project
Centrifugo is an open-source, scalable real-time messaging server designed to deliver messages to online users over various transports including WebSocket, HTTP-streaming, Server-Sent Events (SSE), GRPC, and WebTransport (experimental). It implements a user-facing PUB/SUB model where clients subscribe to channels and receive messages published by a backend via a simple HTTP or GRPC API. This makes it language-agnostic and suitable for building chat apps, live comments, multiplayer games, real-time dashboards, collaborative tools, and AI streaming responses.
Key features include:
- **Efficient transports**: WebSocket, HTTP-streaming, SSE, GRPC, WebTransport.
- **Scalability**: Built-in support for Redis (including Redis Cluster and compatible stores like Valkey, KeyDB, DragonflyDB), PostgreSQL, or Nats for horizontal scaling.
- **Simple server API**: HTTP and GRPC endpoints for backend communication.
- **Asynchronous consumers**: PostgreSQL and Kafka consumers for transactional outbox and CDC patterns.
- **Flexible authentication**: JWT-based or proxy-like authentication via backend requests.
- **Rich subscription model**: Stream (client/server-side), map, shared poll, and proxy subscription streams.
- **Channel permissions**: Namespace concept and various permission strategies.
- **Message history and recovery**: Hot history with automatic recovery on reconnect, plus cache recovery mode.
- **Delta compression**: Based on the Fossil algorithm to reduce bandwidth.
- **Presence**: Online channel presence with join/leave notifications.
- **RPC**: Send RPC calls to the backend over the real-time connection.
- **Client protocol**: Strict and effective protocol with official SDKs for JavaScript, Dart/Flutter, Swift, Java, Python, Go, and .NET (WIP).
- **Data formats**: JSON and binary Protobuf with optimized serialization and batching.
- **Admin UI**: Embedded web interface for monitoring and testing.
- **Observability**: Prometheus metrics and an official Grafana dashboard.
Centrifugo is positioned as a self-hosted alternative to commercial services like Pubnub, Pusher, and Ably, as well as to frameworks like socket.io and SignalR. It is designed to be set up once and used indefinitely, decoupling real-time transport from business logic.
Quick start with Docker:
```bash
docker run -it --rm -p 8000:8000 centrifugo/centrifugo:latest centrifugo --client.insecure --admin.enabled --admin.insecure
```
Then open http://localhost:8000 for the admin UI. The insecure flags are for local trials only.
For production, follow the installation and quickstart guides on the official documentation site (centrifugal.dev). The project is actively maintained with community support via Telegram and Discord.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.