Releases: centrifugal/centrifugo
v5.4.4
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Fixes
- Do not count
no pong
disconnect cases in centrifugo_client_ping_pong_duration_seconds histogram – as this resulted into tracking negative values
Miscellaneous
- Release is built with Go 1.22.5
- Check out Centrifugo v6 roadmap issue. It outlines some important changes planned for the next major release. The date of the v6 release is not yet specified.
- See also the corresponding Centrifugo PRO release.
v5.4.3
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Improvements
- Publish Centrifugo Protobuf definitions to Buf Schema Registry, see #863. This means that to use Centrifugo GRPC APIs it's now possible to depend on pre-generated Protobuf definitions instead of manually generating them from the schema file.
- apiproto - definitions of server GRPC API
- unistream - definitions of unidirectional GRPC stream
- proxyproto - definitions of proxy GRPC API
- New integer option
grpc_api_max_receive_message_size
(number of bytes). If set to a value > 0 allows settinggrpc.MaxRecvMsgSize
option for GRPC API server. The option controls the max size of message GRPC server can receive. By default, GRPC library uses 4194304 bytes (4MB).
Fixes
- Fix occasional
panic: DedicatedClient should not be used after recycled
panic which could happen under load during problems with Redis connection.
Miscellaneous
- Release is built with Go 1.22.5
- All dependencies were updated to latest versions
- Check out Centrifugo v6 roadmap issue. It outlines some important changes planned for the next major release. The date of the v6 release is not yet specified.
v5.4.2
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Centrifugo v5.4.2 comes with useful improvements and fixes.
Improvements
- Raw mode for Nats broker – in this mode Centrifugo just consumes core Nats subjects and does not expect any Centrifugo internal wrapping. Clients just get a raw payload from Nats, which may be useful if you have Nats and want to expose subjects to client-side real-time connections with the help of Centrifugo.
- Option to use wildcard subscriptions with Nats broker. Allows subscribing to wildcard Nats subjects (containing
*
and>
symbols). This way client can receive messages from many channels while only having a single subscription. - Support configuring client TLS in GRPC proxy, here we started migration to unified TLS config object – using it here for configuring GRPC client TLS. See more details about revisiting TLS configuration in this issue. TLS object is also supported for GRPC client in granular proxy configuration, see
grpc_tls
field. This addresses #839 - Support configuring client TLS in Nats broker (for Nats client). Also uses unified TLS config object.
- RPC ping extension to check if connection is alive at any point, measure RTT time. See #842
- New histogram metric centrifugo_client_ping_pong_duration_seconds to track the duration of ping/pong across all client connections – i.e. time between sending ping to client and receiving pong from client.
- More descriptive JWT check error messages #838.
Fixes
- Fix occasional deadlock leading to memory leak, the deadlock was introduced in Centrifugo v5.3.2, see #856. While fixing an issue we've also found a scenario in which the number of clients and subscribers could be incorrect – subscribers could go away, but the subscriber counter is not decremented. Fixed this alongside the deadlock, both issues do not reproduce with our test load anymore.
- Fix non-working
allow_presence_for_subscriber
option to enable join/leave events when requested by client, see #849
Miscellaneous
- Release is built with Go 1.22.5
- All dependencies were updated to latest versions
- Check out Centrifugo v6 roadmap issue. It outlines some important changes planned for the next major release. The date of the v6 release is not yet specified.
v5.4.1
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Centrifugo v5.4.1 comes with useful improvements and fixes.
Improvements
- Improving delta compression – if the delta patch size exceeds the full publication payload size, the full payload will be sent now instead of the delta patch.
- Kafka Consumer: a partition consumer buffer has been added to enhance processing efficiency, #829.
- Support deb release for Debian 12 Bookworm #827
Fixes
- Resolved a panic issue (
panic: close of closed channel
) caused by a race condition during an already subscribed error. See centrifugal/centrifuge#390. The regression was introduced in Centrifugo v5.3.2. - Async consumers: fix disabling consumer by using proper mapstructure and JSON tags, #828.
Miscellaneous
- Release is built with Go 1.22.4
- All dependencies were updated to latest versions
v5.4.0
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Centrifugo v5.4.0 is now available, featuring several notable improvements.
Improvements
- Delta Compression in channels. Utilizing the Fossil delta algorithm, this feature reduces bandwidth costs by sending only the differences from the previous publication. The effectiveness of delta compression varies depending on the data within the channels. It requires support from the Centrifugo SDK and is only available in the Centrifugo JavaScript SDK at this point (starting from centrifuge-js v5.2.0), and only for client-side subscriptions. For more insights about delta compression, and also other compression configurations within different Centrifugo protocol formats, read our new blog post Experimenting with Real-Time Data Compression by Simulating Football Match Events.
- Cache Recovery Mode in channels. This allows Centrifugo to function as a real-time key-value store. When a client first subscribes to a channel with recovery enabled and recover flag on, the latest publication from the history stream is immediately sent to the subscriber. On resubscription, the latest publication is also delivered (only if needed, based on the provided offset). This improvement addresses #745.
- Add new option: client_connect_include_server_time. When enabled – Centrifugo includes server
time
in the connection reply/push [#817], resolves #787. The time is sent as a Unix timestamp in milliseconds. Currently, SDK support is not available since the use case in the issue involves unidirectional transport, we can add time to theconnected
event context in future SDK releases, let us know if you need it. - Add new metric: centrifugo_client_num_server_unsubscribes (counter), shows server-initiated unsubscribe pushes with the
code
label. - Add new metric: centrifugo_node_pub_sub_lag_seconds (histogram) to monitor PUB/SUB timings: from time since publication was published till time it reached broadcast (does not include broadcast itself, see another metric below).
- Add new metric: centrifugo_node_broadcast_duration_seconds (histogram) to monitor how much time publication broadcast takes.
- Performance optimizations for WebSocket Upgrade. The number of allocations per Upgrade operation has been reduced, making connection establishment stage slightly more efficient.
- Many improvements in documentation - more clear description of features, new diagrams, several typos fixed. Also, one Easter Egg (tip: set
lights
toup
in localStorage, use dark theme, reload page).
Fixes
- Kafka Consumer: Proper parallelism for partition processing #814 – ensures that the processing of all partitions is not blocked when a single partition is blocked for some reason. Check out more about async consumers in Centrifugo in docs.
- More careful positioning: avoid subscriber insufficient state due to PUB/SUB lag. Centrifugo now skips publications coming from PUB/SUB layer to positioned connection with the correct epoch but with offset smaller than position offset. This should prevent occasional insufficient states upon subscribing.
Miscellaneous
- Release is built with Go 1.22.3
- All dependencies were updated to latest versions
v5.3.2
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Fixes
- Fix unsubscribe during inflight subscribe in goroutine, see centrifugal/centrifuge#372. This is only relevant for those who use
client_concurrency
option.
Misc
- All dependencies were updated to latest versions
v5.3.1
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Improvements
- Minor performance optimization – reuse connection timer, see centrifugal/centrifuge#349
Fixes
- Fix WebSocket compression (
io: read/write on closed pipe
error) in JSON protocol case, see commit in centrifugal/protocol - Fix unmarshaling slice of objects in yaml config #786
Misc
- Release is built with Go 1.22.2
- All dependencies were updated to latest versions
- If you use
centrifuge-js
and have dynamic subscribe/unsubscribe calls – take a look atcentrifuge-js
v5.1.0 – it contains changes for a proper processing of unsubscribe frames.
v5.3.0
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 a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
This release adds validation of proper history_ttl
and history_meta_ttl
configuration. Adding validation means possible errors on Centrifugo start if you have improperly configured history meta TTL expiration. See more details below.
Improvements
- Better error message for invalid connection token with channel claim, see #776
- Improvements in Grand Chat Tutorial source code: we now run Django migrations automatically, also long initial connection to PostgreSQL was fixed. So the example is now simpler and smoother to experiment with. If you still have not read our tutorial - just do it 🤓
Fixes
- ❗Add validation on Centrifugo start for
history_meta_ttl
option to be greater than or equal tohistory_ttl
option. Without this validation your history streams may eventually return errorThe ID specified in XADD is equal or smaller than the target stream top item
during publish operation. See #768 for the details. This change won't affect you if you don't havehistory_ttl
more than 30 days. Also, documentation abouthistory_meta_ttl
option was fixed since it contained different default values in different parts of the doc (the default changed in v5 together with history meta ttl refactoring, but the doc was not properly updated). - When using in-memory broker (default) history meta TTL was not properly inherited from channel namespace configuration – the global one was used instead. Fixed in centrifugal/centrifuge#366
- Web UI: redirect to the login screen in case of unauthorized errors from server, this fixes a regression introduced by Centrifugo v5.2.1
- Fix setting custom TTL in
gensubtoken
cli, see #769
Misc
v5.2.2
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, SockJS, WebTransport). Centrifugo has the concept of a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
This release contains quick fix for the issue introduced in v5.2.1
Fixes
- Fix nil pointer dereference upon calling presence stats – fixes the regression introduced by v5.2.1, centrifugal/centrifuge#117fa3e
v5.2.1
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, SockJS, WebTransport). Centrifugo has the concept of a channel – 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.
For details, go to the Centrifugo documentation site.
What's changed
Improvements
- Support for OKP JWKs based on Ed25519, #756
- New boolean option
global_redis_presence_user_mapping
to drastically improve presence stats performance for channels with large number of active subscribers when using Redis engine. See #750 for the motivation and implementation details. Also, see in docs - Admin web UI now uses
/admin/api/settings
endpoint on start to load admin UI configuration options. Admin web UI status page now does not callinfo
API periodically when browser window is not visible (using visibility browser API). Also, some minor CSS style improvements were made.
Fixes
- Fix nil pointer dereference upon channel regex check inside namespace, #760