Skip to content

Releases: centrifugal/centrifuge

v0.34.3

20 Feb 18:34
37f5699
Compare
Choose a tag to compare

What's Changed

  • Unidirectional transports: optimizations and delta encoding support enabler by @FZambia in #459
  • Add Valkey (standalone and cluster) to integration tests by @FZambia in #460
  • Only redact non-empty tokens by @FZambia in #455
  • Fix not using redis prefix for xrange support check by @FZambia in #456
  • Redact Connect.Headers values by @FZambia in #458

Full Changelog: v0.34.2...v0.34.3

❯ gorelease -base v0.34.2 -version v0.34.3
# github.com/centrifugal/centrifuge
## compatible changes
(*Client).ProtocolConnect: added
(*Client).ProtocolConnectNoErrorToDisconnect: added
ConnectRequest.Headers: added

v0.34.2

24 Jan 17:30
02337e6
Compare
Choose a tag to compare

What's Changed

  • Use errors.As for disconnect extraction by @FZambia in #454

Full Changelog: v0.34.1...v0.34.2

v0.34.1

21 Jan 17:57
ae73164
Compare
Choose a tag to compare

What's Changed

  • Only aggregate centrifuge metrics by @FZambia in #453. Also resolves panic in Eagle library reported in #451

Full Changelog: v0.34.0...v0.34.1

v0.34.0 💻✨🔮✨💻

18 Jan 13:23
709ffeb
Compare
Choose a tag to compare

Centrifuge v0.34.0 aimed to be the base for Centrifugo v6 which was recently released. That's why a new release of Centrifuge contains notable improvements, new features and some breaking changes (nothing dramatic, should be super-simple to adopt, marked with ⚠️ below).

Support for sharded PUB/SUB in Redis Cluster

Support for sharded PUB/SUB in Redis Cluster. Please carefully read a comment for RedisBrokerConfig.NumShardedPubSubPartitions – the feature, while can be a great performance booster in Redis Cluster, may be really niche at the same time since it does not come for free and requires careful consideration before enabling.

The thing is that it reduces the number of shards in Redis Cluster to NumShardedPubSubPartitions number, and maintains a separate connection with each partition for effective PUB/SUB and guarantee that Centrifuge properly works with Redis Cluster shards.

See also addition discussion in issues/228 and information in Centrifugo release post.

Leverage Redis replicas

It's now possible to utilize Redis replicas in Redis cluster and Redis Sentinel setups to delegate channel subscriptions to them and delegate reading presence to them. To enable use RedisShardConfig.ReplicaClientEnabled and RedisBrokerConfig.SubscribeOnReplica/RedisPresenceManagerConfig.ReadFromReplica options.

Using replicas may help you staying on lower resources if you already have HA Redis setup!

Any Redis setup via address string

Possibility to use Redis address with special schemes redis+cluster:// and redis+sentinel:// so that it's now possible to fully configure any Redis configuration by using a single string.

Examples for single Redis, Redis Cluster, Redis Sentinel:

redis://user:[email protected]:6379/0
redis+cluster://127.0.0.1:7000
redis+sentinel://localhost:26379?sentinel_master_name=mymaster

Channel namespace resolution for metrics

Now channel namespace resolution of metrics (achievable using GetChannelNamespaceLabel func) works for all metrics related to channels. Internally we added Centrifuge-level cache to speed up getting the channel namespace label, but still please keep GetChannelNamespaceLabel fast since Centrifuge cache expires from time to time.

⚠️ Options ChannelNamespaceLabelForTransportMessagesReceived and ChannelNamespaceLabelForTransportMessagesSent were removed to simplify channel namespace resolution configuration – it will just work for all metrics once GetChannelNamespaceLabel func provided in the configuration.

Redis benchmark tool

New Redis benchmark tool allows to put Centrifuge specific load on Redis setup.

Headers emulation

Centrifuge now has headers emulation support. See ConnectEvent.Headers.

In Centrifugo v6 this field is used to transfer headers natively in proxy requests to the backend, but when using Centrifuge library it's up to developer to decide how to use the headers map.

New metrics

Added a bunch of new useful metrics. Like client connections inflight and client subscriptions inflight. Those may give you great observability insights previously missing.

⚠️ Centrifuge now moved metrics related metrics to MetricsConfig struct, it may require developer to update how Centrifuge config is created.

Other changes

  • Tarantool integration example was removed as we plan to stop working on related repositories. See in blog post
  • ⚠️ Removed transport connect counter metric. It's simpler to use client connect frame count metric to achieve the same but in a manner unified for all transport implementations.
  • Adding a way to provide Centrifuge a custom prometheus.RegistererGatherer
  • Better logging for Redis Broker, with possibility to set RedisBrokerConfig.Name to distinguish log entries when multiple brokers are used.
  • ⚠️ Logging methods are private now – this was a legacy from previous work when we were decoupling Centrifuge in a separate library from Centrifugo. Now it's not possible to add new Centrifuge log entry from outside, applications must use their own logging.
  • Up to rueidis v1.0.53 by @FZambia in #448

Gorelease report for v0.33.6..v0.34.0

❯ gorelease -base v0.33.6 -version v0.34.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*Node).Log: removed
(*Node).LogEnabled: removed
Config.ChannelNamespaceLabelForTransportMessagesReceived: removed
Config.ChannelNamespaceLabelForTransportMessagesSent: removed
Config.GetChannelNamespaceLabel: removed
Config.MetricsNamespace: removed
NewLogEntry: removed
## compatible changes
Config.Metrics: added
ConnectEvent.Headers: added
LogEntry.Error: added
MetricsConfig: added
RedisBrokerConfig.Name: added
RedisBrokerConfig.NumShardedPubSubPartitions: added
RedisBrokerConfig.SubscribeOnReplica: added
RedisPresenceManagerConfig.ReadFromReplica: added
RedisShardConfig.ReplicaClientEnabled: added
RegistererGatherer: added

# summary
v0.34.0 is a valid semantic version for this release.

Full Changelog: v0.33.6...v0.34.0

v0.33.6

09 Jan 17:38
38ab1ae
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.33.5...v0.33.6

v0.33.5

25 Dec 09:28
Compare
Choose a tag to compare

What's Changed

  • Fix a deadlock during pub/sub and recovery sync by @FZambia in #439
  • Add missing logs for DisconnectServerError cases by @FZambia in #417
  • Unidirectional connect without automatic error to disconnect transform by @FZambia in #418
  • Add Config.UnidirectionalCodeToDisconnect by @FZambia in #421 - see how Centrifugo uses this feature in Centrifugo docs
  • Strip tokens from logs upon client disconnect by @FZambia and @Dirk007 in #422
  • Strip tokens from logs upon upon client errors by @FZambia in #424
  • Bump dependencies
❯ gorelease -base v0.33.4 -version v0.33.5
# github.com/centrifugal/centrifuge
## incompatible changes
CommandProcessedEvent.Disconnect: removed
## compatible changes
(*Client).ConnectNoErrorToDisconnect: added
CommandProcessedEvent.Error: added
Config.UnidirectionalCodeToDisconnect: added

# summary
v0.33.5 is a valid semantic version for this release.

Full Changelog: v0.33.4...v0.33.5

v0.33.4

06 Oct 14:34
3f2bf3c
Compare
Choose a tag to compare

What's Changed

  • Handle evicted history meta key scenario in Redis broker by @FZambia in #412
  • Fix Fossil delta construction in recovered publications by @FZambia in #415
  • Log connection duration as string by @FZambia in #416
  • Bump github.com/redis/rueidis from 1.0.46 to 1.0.47 by @dependabot in #413
  • Bump github.com/maypok86/otter from 1.2.2 to 1.2.3 by @dependabot in #414

Full Changelog: v0.33.3...v0.33.4

v0.33.3

02 Sep 05:43
Compare
Choose a tag to compare

What's Changed

  • Fix readme example - properly handle Enter key event, see #407
  • Bump github.com/redis/rueidis from 1.0.43 to 1.0.45 by @dependabot in #411
  • Bump github.com/prometheus/client_golang from 1.19.1 to 1.20.2 by @dependabot in #410
  • Bump github.com/maypok86/otter from 1.2.1 to 1.2.2 by @dependabot in #409

Full Changelog: v0.33.2...v0.33.3

v0.33.2

10 Aug 16:34
cfeca34
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.33.1...v0.33.2

v0.33.1

02 Aug 05:28
96afa72
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.33.0...v0.33.1