Command Restrictions
Some Redis commands are supported by Redis Cluster instances for multi-key operations in the same slot. Restricted commands are listed in Table 1.
Some commands support multiple keys but do not support cross-slot access. For details, see Table 3. Restricted commands are listed in Table 2.
Table 4 lists commands restricted for read/write splitting instances.
While running commands that take a long time to run, such as FLUSHALL, DCS instances may not respond to other commands and may change to the faulty state. After the command finishes executing, the instance will return to normal.
Redis commands restricted in Redis Cluster DCS instances
Category |
Description |
---|---|
Set |
|
SINTER |
Returns the members of the set resulting from the intersection of all the given sets. |
SINTERSTORE |
Equal to SINTER, but instead of returning the result set, it is stored in destination. |
SUNION |
Returns the members of the set resulting from the union of all the given sets. |
SUNIONSTORE |
Equal to SUNION, but instead of returning the result set, it is stored in destination. |
SDIFF |
Returns the members of the set resulting from the difference between the first set and all the successive sets. |
SDIFFSTORE |
Equal to SDIFF, but instead of returning the result set, it is stored in destination. |
SMOVE |
Moves member from the set at source to the set at destination. |
Sorted Set |
|
ZUNIONSTORE |
Computes the union of numkeys sorted sets given by the specified keys. |
ZINTERSTORE |
Computes the intersection of numkeys sorted sets given by the specified keys. |
HyperLogLog |
|
PFCOUNT |
Returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable. |
PFMERGE |
Merges multiple HyperLogLog values into a unique value. |
Key |
|
RENAME |
Renames key to newkey. |
RENAMENX |
Renames key to newkey if newkey does not yet exist. |
BITOP |
Performs a bitwise operation between multiple keys (containing string values) and stores the result in the destination key. |
RPOPLPUSH |
Returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination. |
String |
|
MSETNX |
Sets the given keys to their respective values. |
Redis commands restricted in Proxy Cluster DCS instances
Category |
Command |
Restriction |
---|---|---|
Sets |
SMOVE |
For a Proxy Cluster instance, the source and destination keys must be in the same slot. |
Sorted sets |
BZPOPMAX |
For a Proxy Cluster instance, all keys transferred must be in the same slot. Not supported for Proxy Cluster DCS Redis 4.0 instances. |
BZPOPMIN |
||
Geo |
GEORADIUS |
|
GEORADIUSBYMEMBER |
||
GEOSEARCHSTORE |
||
Connection |
CLIENT KILL |
|
CLIENT LIST |
|
|
SELECT index |
Multi-DB of Proxy Cluster instances can be implemented by changing the keys. This solution is not recommended. For details about multi-DB restrictions on Proxy Cluster instances, see What Are the Constraints on Implementing Multiple Databases on a Proxy Cluster Instance? |
|
HyperLogLog |
PFCOUNT |
For a Proxy Cluster instance, all keys transferred must be in the same slot. |
PFMERGE |
||
Keys |
RENAME |
For a Proxy Cluster instance, all keys transferred must be in the same slot. |
RENAMENX |
||
SCAN |
Proxy Cluster instances do not support the SCAN command in pipelines. |
|
Lists |
BLPOP |
For a Proxy Cluster instance, all keys transferred must be in the same slot. |
BRPOP |
||
BRPOPLPUSH |
||
Pub/Sub |
PSUBSCRIBE |
Proxy Cluster instances do not support keyspace event subscription, so there would be no keyspace event subscription failure. |
Scripting |
EVAL |
|
EVALSHA |
||
Server |
MEMORY DOCTOR |
For a Proxy Cluster instance, add the ip:port of the node at the end of the command. Do as follows to obtain the IP address and port number of a node (MEMORY USAGE is used as an example):
|
MEMORY HELP |
||
MEMORY MALLOC-STATS |
||
MEMORY PURGE |
||
MEMORY STATS |
||
MEMORY USAGE |
||
MONITOR |
||
Strings |
BITOP |
For a Proxy Cluster instance, all keys transferred must be in the same slot. |
MSETNX |
||
Transactions |
WATCH |
For a Proxy Cluster instance, all keys transferred must be in the same slot. |
MULTI |
The order of cross-slot commands in a transaction is not guaranteed. The following commands cannot be used in transactions: WATCH, MONITOR, RANDOMKEY, KEYS, SCAN, SUBSCRIBE, UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, SCRIPT, EVAL, EVALSHA, DBSIZE, AUTH, FLUSHDB, FLUSHALL, CLIENT, MEMORY |
|
EXEC |
||
Streams |
XACK |
Currently, Proxy Cluster instances do not support Streams. |
XADD |
||
XCLAIM |
||
XDEL |
||
XGROUP |
||
XINFO |
||
XLEN |
||
XPENDING |
||
XRANGE |
||
XTRIM |
||
XREVRANGE |
||
XREAD |
||
XREADGROUP GROUP |
Multi-Key Commands of Proxy Cluster Instances
Category |
Command |
---|---|
Multi-key commands that support cross-slot access |
DEL, MGET, MSET, EXISTS, SUNION, SINTER, SDIFF, SUNIONSTORE, SINTERSTORE, SDIFFSTORE, ZUNIONSTORE, ZINTERSTORE |
Multi-key commands that do not support cross-slot access |
SMOVE, SORT, BITOP, MSETNX, RENAME, RENAMENX, BLPOP, BRPOP, RPOPLPUSH, BRPOPLPUSH, PFMERGE, PFCOUNT |
Redis Commands Restricted for Read/Write Splitting Instances
Category |
Command |
Restriction |
---|---|---|
Connection |
CLIENT KILL |
|
CLIENT LIST |
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.