Open JordanPawlett opened 3 years ago
Thanks.
Could you create a PR?
Now I will make and add tests
The preliminary result is that simply sending the request through master will not work. I'm figuring out if this problem is related to my tests or it's a bug in ioredis
@JordanPawlett
I am testing on 2 different cluster configurations and am getting 2 completely different problems.
I've since moved to use etcd for service-discovery.
If i remember correctly the Redis discovery worked correctly with a Sentinel setup. However, breaks for redisCluster, as scanStream
does not exist on that client.
Both redis-cluster and redis-sentinel were deployed in a k8s cluster using bitnami helm charts.
What problems specifically are you encountering?
If i remember correctly the Redis discovery worked correctly with a Sentinel setup. However, breaks for redisCluster, as
scanStream
does not exist on that client.
Sentinel works differently, unlike redisCluster, a similar problem does not occur there. With redisCluster, additional commands are sent to redis-server which results in an error.
scanStream
exists in ioredis and scan
command is supported in redis-server with cluster. Errors occur when trying to work with data, the scan
command on the server in one case CROSSSLOT
error, in another cluster All keys in the pipeline should belong to the same slots allocation group
when requesting for any node (master/slave).
Any news about it?
Any news about it?
Alas, I don't have a solution yet. In testing, I didn't a solution with client.nodes ('master')
.
I will run tests again with the current versions of redis and ioredis to make a final conclusion where the problem is.
https://github.com/moleculerjs/moleculer/blob/6f6225d6079af2116a2b4713c5d00037512131f4/src/registry/discoverers/redis.js#L375
this.client.scanStream
is used in multiple locations through the custom redis discoverer.scanStream
does not exist onclient
forRedis.Cluster
. I believe must iterate overclient.nodes('master')
to perform a scan, similar to how the Redis' cacher is written.