ReplyError: CROSSSLOT Keys in request don't hash to the same slot
Hi all,
We recently upgraded to the latest Novu release (we were stuck to the last release without workers so far) and we're noticing the following error in worker's logs which I can understand.
I don't know if that the reason but emails are being created using the API trigger endpoint, however we can't see anything in activity feed.
Any help would be appreciated π
6 Replies
Need to mention (in the same project with @serafeimo ) that we connect to a Redis Cluster in AWS though Elasticache Redis cluster
This is what we have in k8s:
Any idea how to avoid this error?
According to this page https://hackernoon.com/resolving-the-crossslot-keys-error-with-redis-cluster-mode-enabled
the problem could be solved by adding a prefix in the keys. Does the REDIS_CLUSTER_KEY_PREFIX property have to do with the above issue?
Resolving the CROSSSLOT Keys Error with Redis Cluster-Mode Enabled ...
Why "CROSSSLOT Keys in request don't hash to the same slot" error happens in a Redis Cluster, and how to solve it.
@rolkool @serafeimo
Are you running novu in k8s?
Yes we do
From a quick investigation we had it seems that when Novu runs with Redis in cluster mode, it fails because it searches for the Redis host property (which is the single host). If we set this property in order to proceed, then it fails to send the keys due to the above reason (we suspect because it uses the single host with priority for some reason). I don't know if what I described makes sense but we haven't managed to find a solution apart from changing back to a single host.
Do you know if the cluster mode is tested and working?
Hi all! Any feedback on the above?
Hello. Yes, the cluster mode is tested and working right now in our Cloud environments.
I am having a suspicion considered our code and our setup.
May I guess that you are using Elasticache for both the Redis Cache service and for the Redis Cluster service? Either 2 different instances or the same for both.
Can you confirm my guess?
Also can you confirm you are talking about v.0.19.0.