Skip to content

Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever.

License

Notifications You must be signed in to change notification settings

streemtech/centrifugo

This branch is 30 commits behind centrifugal/centrifugo:master.

Folders and files

NameName
Last commit message
Last commit date
Jan 19, 2025
Jan 20, 2025
Feb 2, 2025
Aug 31, 2021
Jan 15, 2025
Jan 19, 2025
Nov 25, 2023
Dec 22, 2024
Jun 11, 2023
Jun 8, 2024
Sep 16, 2018
Jan 25, 2025
Jul 28, 2024
Jul 3, 2024
Feb 2, 2025
Feb 2, 2025
Jan 19, 2025

Repository files navigation

Centrifugo is an open-source scalable real-time messaging server. Centrifugo can instantly deliver messages to application online users connected over supported transports (WebSocket, HTTP-streaming, SSE/EventSource, GRPC, WebTransport). Centrifugo has the concept of channel subscriptions – so it's a user-facing PUB/SUB server.

Centrifugo is language-agnostic and can be used to build chat apps, live comments, multiplayer games, real-time data visualizations, collaborative tools, etc. in combination with any backend. It is well suited for modern architectures and allows decoupling the business logic from the real-time transport layer.

Several official client SDKs for browser and mobile development wrap the bidirectional protocol. In addition, Centrifugo supports a unidirectional approach for simple use cases with no SDK dependency.

Documentation

Join community

Why Centrifugo

The core idea of Centrifugo is simple – it's a PUB/SUB server on top of modern real-time transports:

The hard part is to make this concept production-ready, efficient, flexible and available from different application environments. Centrifugo is a mature solution that already helped many projects with adding real-time features and scale towards many concurrent connections. Centrifugo provides a set of features not available in other open-source solutions in the area:

  • Efficient real-time transports: WebSocket, HTTP-streaming, Server-Sent Events (SSE), GRPC, WebTransport
  • Built-in scalability with Redis (or Redis Cluster, or Redis-compatible storage – ex. AWS Elasticache, KeyDB, DragonflyDB, etc), or Nats.
  • Simple HTTP and GRPC server API to communicate with Centrifugo from the app backend
  • Asynchronous PostgreSQL and Kafka consumers to support transactional outbox and CDC patterns
  • Flexible connection authentication mechanisms: JWT and proxy-like
  • Channel subscription multiplexing over a single connection
  • Different types of subscriptions: client-side and server-side
  • Various channel permission strategies, channel namespace concept
  • Hot message history in channels, with automatic message recovery upon reconnect, cache recovery mode (deliver latest publication immediately upon subscription)
  • Delta compression in channels based on Fossil algorithm
  • Online channel presence information, with join/leave notifications
  • A way to send RPC calls to the backend over the real-time connection
  • Strict and effective client protocol wrapped by several official SDKs
  • JSON and binary Protobuf message transfer, with optimized serialization
  • Beautiful embedded admin web UI
  • And much more, visit Centrifugo documentation site

Backing

This repository is hosted by packagecloud.io.

Private NPM registry and Maven, RPM, DEB, PyPi and RubyGem Repository · packagecloud

Also thanks to JetBrains for supporting OSS (most of the code here written in Goland):

JetBrains logo

About

Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 94.9%
  • Shell 4.5%
  • JavaScript 0.3%
  • Makefile 0.2%
  • Lua 0.1%
  • Dockerfile 0.0%