Why use CLUSTER NODES rather than CLUSTER SLOTS? #1639
Replies: 1 comment 1 reply
-
There are multiple reasons.
The client works in a way that we keep connections per node within the cluster. Routing a command consists of mapping the key into a slot and then checking which nodes can handle a particular request. The topology also allows for verifying redirects in the sense that we can check whether the target node is part of the cluster or whether a Redis redirect targets towards an unknown node. Nodes without assigned slots are good candidates for Pub/Sub operations as Pub/Sub isn't tied to the keyspace. Finally, |
Beta Was this translation helpful? Give feedback.
-
Why does lettuce.io use
CLUSTER NODES
command for cluster topology rather thanCLUSTER SLOTS
? The documentation forCLUSTER NODES
says the clients should useCLUSTER SLOTS
.CLUSTER NODES
is more administrative debug information and requires considerable parsing magic.CLUSTER SLOTS
replies with a nested array of slot range to nodes mapping.Beta Was this translation helpful? Give feedback.
All reactions