github centrifugal/centrifugo v5.4.2

latest releases: v5.4.5, v5.4.4, v5.4.3...
2 months ago

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.

Don't miss a new centrifugo release

NewReleases is sending notifications on new releases.