DCS Redis Help Documentation

Instance Command Restrictions

2024-05-23 11:14:28

Cluster (Direct-Connect Mode) Commands

Cluster instances support multiple Key commands as long as their behaviors are consistent with those in the open-source Redis Cluster, and do not support cross-SLOT access to REDIS commands. Specifically:

1. Since multiple DBs are not supported, only 0 can be selected. Selecting other DBs is not supported.

2. It is required that the KEYs operated by a single command are distributed on the same SLOT. To ensure this, it is recommended to use hash tags, etc.

3. Supports transactions and PUB/SUB subscriptions, but requires the KEYs of related operations to be on the same SLOT.

Table 1 Restricted Redis Commands of Cluster Instances:

Command Type

Command

SCRIPTING

SCRIPT

EVAL

EVALSHA

GENERIC

SCAN

DEL

UNLINK

DBSIZE

STRING

MSET

MGET

SET

SUNION

SUNIONSTORE

SDIFF

SDIFFSTORE

SINTER

SINTERSTORE

PUB/SUB

SUBSCRIBE

PSUBSCRIBE

PUBLISH

UNSUBSCRIBE

PUNSUBSCRIBE

PUBSUB CHANNELS

PUBSUB NUMPA

PUBSUB NUMSU

STREAM

XGROU

XINFO

XREAD

XREADGROUP

 

Proxy Mode Cluster Commands

In addition to restricted commands of the cluster mode, the proxy mode has the following differences.

1. Supports multiple DBs and SELECT commands

2. Support MSET, MSET and other KEY commands across SLOTs. Please refer to Table 1 below for details.

3. CLUSTER commands other than CLUSTER KEYSLOT are not supported

4. The Client KILL and CLIENT LIST commands can only operate the client information of the current proxy instead of the entire instance.

5. Transactions and script execution in proxy mode are split by slot and sent to the corresponding nodes for execution. Transactions in the same slot are not split, but cross-SLOT transaction consistency cannot be guaranteed.

Table 2 SLOT Commands Supported by the Proxy Mode Cluster:

Command Type

Command

Strings

MSETNX

Set

SINTER

SINTERSTORE

SUNION

SUNIONSTORE

SDIFF

SDIFFSTORE

SMOVE

Sortedset

ZUNIONSTORE

ZINTERSTORE

HyperLogLog

PFCOUNT

PFMERGE

Keys

RENAME

RENAMENX

BITOP

RPOPLPUSH


zt53HN90I2_N