What is Centrifugo?
Features
- Multi-Transport Support: WebSocket, HTTP-streaming, SSE, WebTransport, and gRPC
- Scalable PUB/SUB Messaging: Efficient message broadcast to millions of subscribers
- State Synchronization: Keep key-value state synchronized across clients with transactional consistency
- Flexible Authentication: JWT-based auth and connection event proxying to backend
- Channel History & Online Presence: Retrieve past messages and see who is subscribed
- Delta Updates: Send incremental updates to reduce bandwidth
- High Performance: Written in Go, handles millions of connections and high throughput
- Out-of-the-Box Scalability: Integrates with Redis, Redis Cluster, and NATS for horizontal scaling
- Official SDK Libraries: Client libraries for web and mobile development
Use Cases
- Real-time chat and instant messaging
- Live dashboards and real-time analytics visualization
- Multiplayer game state synchronization
- AI token streaming and live generation results
- Financial data streaming (stock prices, trading updates)
- IoT and real-time device tracking
- Live data feeds and broadcasting to large audiences
- Collaborative editing and data sync
FAQs
-
What is Centrifugo?
Centrifugo is a self-hosted, scalable realtime messaging and data synchronization server. It handles persistent connections over various transports like WebSocket and HTTP-streaming, providing PUB/SUB messaging and state sync features. -
How do I install Centrifugo?
You can run Centrifugo quickly using Docker: 'docker run -p 8000:8000 centrifugo/centrifugo:v6 centrifugo'. Other installation methods are also available on the official website. -
Is Centrifugo free to use?
Centrifugo offers an open-source version that is free to use. Additionally, there is a Centrifugo PRO version with advanced features for corporate and enterprise environments. -
What transports does Centrifugo support?
Centrifugo supports WebSocket, HTTP-streaming, Server-Sent Events (SSE), WebTransport, and gRPC for persistent connections. -
Can Centrifugo scale horizontally?
Yes, Centrifugo supports out-of-the-box scalability by integrating with Redis (including Redis Cluster and compatible storages) and NATS for efficient message brokering across multiple nodes.