Releases: centrifugal/centrifugo
v5.4.9
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
- 🎄 Recap what happened with Centrifugo in 2024 in Notable Centrifugo v5 milestones in 2024 blog post
- Change Dockerfile to run
centrifugo
under non-root user #922 by @dmeremyanin - Update
alpine
base image from 3.18 to 3.21 in Centrifugo Dockerfile
Fixes
- Fix a deadlock during pub/sub and recovery sync when using Redis engine and server-side subscriptions, fixes #925
- Fix pause/resume race in Kafka async consumer #927 – the race could lead to a partition non being processed, while in normal condition the chance of the race is minimal, this was observed in a real system under CPU throttling conditions.
- Fix flaky
TestHandleRefreshWithoutProxyServerStart
test #920 by @makhov
Miscellaneous
- This release is built with Go 1.23.4.
- Check out the Centrifugo v6 roadmap. It outlines important changes planned for the next major release. We have already started working on v6 and are sharing updates in the issue and our community channels.
- See also the corresponding Centrifugo PRO release.
v5.4.8
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
- Kafka async consumer: fix potential loss of records under load #917
- Centrifugo now does not log tokens when writing INFO level log entry about client error caused by command processing.
Miscellaneous
- This release is built with Go 1.23.4.
- Check out the Centrifugo v6 roadmap. It outlines important changes planned for the next major release. We have already started working on v6 and are sharing updates in the issue and our community channels.
- See also the corresponding Centrifugo PRO release.
v5.4.7
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
- Code transforms for HTTP proxy and unidirectional connect #903. See the description in docs.
- Support Kafka
scram-sha-256
,scram-sha-512
andaws-msk-iam
SASL #912. See updated docs for Kafka consumer.
Fixes
- Centrifugo now does not log tokens when writing INFO level log entry about client disconnection caused by command processing. Thanks to @Dirk007 for submitting the fix.
Miscellaneous
- This release is built with Go 1.23.2.
- Check out the Centrifugo v6 roadmap. It outlines important changes planned for the next major release. We have already started working on v6 and are sharing updates in the issue and our community channels.
- See also the corresponding Centrifugo PRO release.
v5.4.6
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
- Added option to configure a custom token user ID claim. See #783. Although we still recommend using the
sub
claim, there are scenarios where a different claim name is required. You can now configure this using the token_user_id_claim option. - Connection durations are now logged as human-readable strings instead of nanoseconds. See centrifugal/centrifuge#416.
Fixes
- Fixed Fossil delta construction in recovered publications. See centrifugal/centrifuge#415. This prevents
bad checksum
errors during recovery with delta compression enabled. - Handled the history meta key eviction scenario in Redis to avoid publish errors. See centrifugal/centrifuge#412. This fix addresses #888.
- Full basic auth credentials are no longer displayed in proxy endpoint logs. See #890. The URL is now redacted in logs.
- Fixed panic occurring during PostgreSQL consumer dispatch error handling. See #889.
- Added missing
delta_publish
top-level default definition. See #896. This fix addresses an unknown option warning in logs on Centrifugo startup.
Miscellaneous
- This release is built with Go 1.23.2.
- Check out the Centrifugo v6 roadmap. It outlines important changes planned for the next major release. We have already started working on v6 and are sharing updates in the issue and in our community channels.
- See also the corresponding Centrifugo PRO release.
- BTW. The popular package for integrating Centrifugo with Laravel
denis660/laravel-centrifugo
has just received a major update! Version 5.0 introduces several significant improvements. Check out the release notes!
v5.4.5
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
- Added an option to use Redis 7.4 hash field TTL for online presence #872. Redis 7.4 introduced the per HASH field TTL, which we now use for presence information by adding a boolean option
redis_presence_hash_field_ttl
. One benefit here is reduced memory usage in Redis for presence information, as fewer data needs to be stored (no separate ZSET structure to maintain). Depending on your presence data, you can achieve up to a 1.6x reduction in memory usage with this option. This also showed slightly better CPU utilization on the Redis side, as there are fewer keys to manage in LUA scripts during presence get, add, and remove operations. By default, Centrifugo will continue using the current presence implementation with ZSET, as the new option only works with Redis >= 7.4 and requires explicit configuration. See also the description of the new option in the Centrifugo documentation.
Fixes
- Process connect proxy result subs #874, fixes #873. Also, the documentation contained wrong description of subscribe options override object, this was fixed in terms of centrifugal/centrifugal.dev#52.
Miscellaneous
- Release is built with Go 1.22.6
- 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.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