0

I'm trying to modify a script in which I was using redis-trib. For various reasons I can't use it now, but I can use redis-CLI.

The point is that when it comes to assigning slots to nodes, is it done in blocks or in some way? That is, if there are 3 nodes, I distribute the 16384 slots among the 3 nodes and assign the remaining ones to the last one. Or I have to go through another process.

Thank you very much.


Edit:

I'm asking because I'm looking at some unofficial documentation (I didn't see anything about it in the official one that wasn't using redis-trib), which shows the following:

for slot in {0..5461}; do redis-cli -p 7000 CLUSTER ADDSLOTS $slot > /dev/null; done;
for slot in {5462..10923}; do redis-cli -p 7001 CLUSTER ADDSLOTS $slot > /dev/null;; done;
for slot in {10924..16383}; do redis-cli -p 7002 CLUSTER ADDSLOTS $slot > /dev/null;; done;

I do not know the criteria on which this distribution is based.

Hugo L.M
  • 1,053
  • 17
  • 31

1 Answers1

0

Finally I perform the task of distributing the 16384 slots with the division by the number of nodes. For the rest of the unallocated slots, I calculate the module and distribute them equally, if possible, among the nodes.

In any case I try that the number of slots per node is the same or very similar and in any case that they are contiguous slots.

Hugo L.M
  • 1,053
  • 17
  • 31