Centrifugo

A scalable real-time messaging server that delivers messages to online users via various supported transports.

Centrifugo is an open-source real-time messaging server that delivers messages to online users via various transport protocols. It operates as a user-facing PUB/SUB server, utilizing channel subscriptions to manage how data reaches connected clients. The software is deployed as a server and can be run via Docker, native binaries, or package managers, providing a centralized hub for event distribution.

This system is language-agnostic and integrates with any backend to support a wide range of use cases, including chat applications, live comments, multiplayer games, real-time data visualizations, and AI streaming responses. It decouples business logic from the transport layer, allowing the backend to communicate with the server through a simple HTTP or GRPC API while clients subscribe to channels using official SDKs or standard transport clients.

Key features

  • Support for WebSocket, HTTP-streaming, Server-Sent Events, GRPC, and WebTransport
  • Scalability via Redis, Redis Cluster, PostgreSQL, or Nats
  • Asynchronous PostgreSQL and Kafka consumers for transactional outbox and CDC patterns
  • Connection authentication using JWT or proxy-based requests to the backend
  • Hot message history with automatic recovery upon reconnection
  • Delta compression in channels using the Fossil algorithm
  • Online channel presence tracking with join and leave notifications
  • Embedded admin web UI for monitoring connections and publishing messages
  • Prometheus metrics exposure with an official Grafana dashboard

The architecture supports both JSON and binary Protobuf message transfer with optimized serialization and built-in batching. To simplify integration, official SDKs are available for JavaScript, Dart, Swift, Java, Python, and Go, though the server also supports a unidirectional approach that requires no SDK. This flexibility allows developers to choose between a rich bidirectional protocol or a simple stream of events. The system also includes a variety of channel permission strategies and a namespace concept to organize communication streams.

Centrifugo is designed for developers who need to scale concurrent connections and manage real-time event streaming without rebuilding the transport layer for every project. It serves as a dedicated infrastructure component for managing high-volume messaging and live data delivery.

Last Modified
Software TypeWeb App / Server
Platform
Last Activity14 days ago
Repository Age11 years
LicenseApache-2.0
Open Source Alternative to
Open Source Software.io

Join our newsletter to get shiny new open source software delivered to your inbox. Unsubscribe anytime.