content/commands/cluster-addslotsrange.md
The CLUSTER ADDSLOTSRANGE is similar to the [CLUSTER ADDSLOTS]({{< relref "/commands/cluster-addslots" >}}) command in that they both assign hash slots to nodes.
The difference between the two commands is that [CLUSTER ADDSLOTS]({{< relref "/commands/cluster-addslots" >}}) takes a list of slots to assign to the node, while CLUSTER ADDSLOTSRANGE takes a list of slot ranges (specified by start and end slots) to assign to the node.
To assign slots 1 2 3 4 5 to the node, the [CLUSTER ADDSLOTS]({{< relref "/commands/cluster-addslots" >}}) command is:
> CLUSTER ADDSLOTS 1 2 3 4 5
OK
The same operation can be completed with the following CLUSTER ADDSLOTSRANGE command:
> CLUSTER ADDSLOTSRANGE 1 5
OK
This command only works in cluster mode and is useful in the following Redis Cluster operations:
CLUSTER ADDSLOTSRANGE is used to initially set up master nodes splitting the available hash slots among them.| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | |
{{< multitabs id="cluster-addslotsrange-return-info" tab1="RESP2" tab2="RESP3" >}}
Simple string reply: OK if the command was successful. Otherwise an error is returned.
-tab-sep-
Simple string reply: OK if the command was successful. Otherwise an error is returned.
{{< /multitabs >}}