-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Package version
2.0.7
Node.js and npm version
Node: 12.13.1
NPM: 6.12.1
Sample Code (to reproduce the issue)
In RedisFactory:, when we initialize an IoRedis.Cluster the other parameters such as scaleReads is not passed as second parameter. Instead, only redisOptions is passed as stated in the IORedis documentation.
_newConnection () {
if (this._useCluster) {
debug('creating new redis cluster using config: %j', this._config)
return new IoRedis.Cluster(this._config.clusters, { redisOptions: this._config.redisOptions })
}
debug('creating new redis connection using config: %j', this._config)
return new IoRedis(this._config)
}
I have directly modified it on my node_modules as a quick test and it worked for me.
_newConnection () {
if (this._useCluster) {
debug('creating new redis cluster using config: %j', this._config)
return new IoRedis.Cluster(this._config.clusters, { scaleReads: "all", redisOptions: this._config.redisOptions })
}
debug('creating new redis connection using config: %j', this._config)
return new IoRedis(this._config)
}
As seen on this metric, all replicas are receiving traffic after I added the scaleReads option.

As a side note, any chance we can jump to a newer version of IORedis?
Metadata
Metadata
Assignees
Labels
No labels