命令支持
不同版本的 Redis Cluster 实例对 Redis 命令的支持度有所不同。
注释与说明
为便于阅读和内容表达,本文的表格约定使用下述注释:
-
✓ 表示支持该命令。
-
✕ 表示不支持该命令。
-
⎻ 表示在原生 Redis 的该版本下,该命令尚未开始支持。
-
config 表示支持该命令,但需要在控制台修改控制参数支持。
Cluster 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
CLUSTER ADDSLOTS |
✓ |
✓ |
✓ |
✓ |
CLUSTER BUMPEPOCH |
✓ |
✓ |
✓ |
✓ |
CLUSTER COUNT-FAILURE-REPORTS |
✓ |
✓ |
✓ |
✓ |
CLUSTER COUNTKEYSINSLOT |
✓ |
✓ |
✓ |
✓ |
CLUSTER DELSLOTS |
✓ |
✓ |
✓ |
✓ |
CLUSTER FAILOVER |
✓ |
✓ |
✓ |
✓ |
CLUSTER FLUSHSLOTS |
✓ |
✓ |
✓ |
✓ |
CLUSTER FORGET |
✓ |
✓ |
✓ |
✓ |
CLUSTER GETKEYSINSLOT |
✓ |
✓ |
✓ |
✓ |
CLUSTER INFO |
✓ |
✓ |
✓ |
✓ |
CLUSTER KEYSLOT |
✓ |
✓ |
✓ |
✓ |
CLUSTER MEET |
✓ |
✓ |
✓ |
✓ |
CLUSTER MYID |
✓ |
✓ |
✓ |
✓ |
CLUSTER NODES |
✓ |
✓ |
✓ |
✓ |
CLUSTER REPLICAS |
⎻ |
✓ |
✓ |
✓ |
CLUSTER REPLICATE |
✓ |
✓ |
✓ |
✓ |
CLUSTER RESET |
✓ |
✓ |
✓ |
✓ |
CLUSTER SAVECONFIG |
✓ |
✓ |
✓ |
✓ |
CLUSTER SET-CONFIG-EPOCH |
✓ |
✓ |
✓ |
✓ |
CLUSTER SHARDS |
⎻ |
⎻ |
⎻ |
✓ |
CLUSTER SETSLOT |
✓ |
✓ |
✓ |
✓ |
CLUSTER SLAVES |
✓ |
✓ |
✓ |
✓ |
CLUSTER SLOTS |
✓ |
✓ |
✓ |
✓ |
READONLY |
✓ |
✓ |
✓ |
✓ |
READWRITE |
✓ |
✓ |
✓ |
✓ |
Connection 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
AUTH |
✓ |
✓ |
✓ |
✓ |
CLIENT CACHING |
⎻ |
⎻ |
✓ |
✓ |
CLIENT GETNAME |
✓ |
✓ |
✓ |
✓ |
CLIENT GETREDIR |
⎻ |
⎻ |
✓ |
✓ |
CLIENT ID |
⎻ |
✓ |
✓ |
✓ |
CLIENT INFO |
⎻ |
⎻ |
⎻ |
✓ |
CLIENT KILL |
✓ |
✓ |
✓ |
✓ |
CLIENT LIST |
✓ |
✓ |
✓ |
✓ |
CLIENT NO-EVICT |
⎻ |
⎻ |
⎻ |
✓ |
CLIENT PAUSE |
✓ |
✓ |
✓ |
✓ |
CLIENT REPLY |
✓ |
✓ |
✓ |
✓ |
CLIENT SETNAME |
✓ |
✓ |
✓ |
✓ |
CLIENT TRACKING |
⎻ |
⎻ |
✓ |
✓ |
CLIENT TRACKINGINFO |
⎻ |
⎻ |
⎻ |
✓ |
CLIENT UNBLOCK |
⎻ |
✓ |
✓ |
✓ |
ECHO |
✓ |
✓ |
✓ |
✓ |
HELLO |
⎻ |
⎻ |
✓ |
✓ |
PING |
✓ |
✓ |
✓ |
✓ |
QUIT |
✓ |
✓ |
✓ |
✓ |
RESET |
⎻ |
⎻ |
⎻ |
✓ |
SELECT |
✓ |
✓ |
✓ |
✓ |
Geo 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
GEOADD |
✓ |
✓ |
✓ |
✓ |
GEODIST |
✓ |
✓ |
✓ |
✓ |
GEOHASH |
✓ |
✓ |
✓ |
✓ |
GEOPOS |
✓ |
✓ |
✓ |
✓ |
GEORADIUS |
✓ |
✓ |
✓ |
✓ |
GEORADIUSBYMEMBER |
✓ |
✓ |
✓ |
✓ |
GEOSEARCH |
⎻ |
⎻ |
⎻ |
✓ |
GEOSEARCHSTORE |
⎻ |
⎻ |
⎻ |
✓ |
Hashes 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
HDEL |
✓ |
✓ |
✓ |
✓ |
HEXISTS |
✓ |
✓ |
✓ |
✓ |
HGET |
✓ |
✓ |
✓ |
✓ |
HGETALL |
✓ |
✓ |
✓ |
✓ |
HINCRBY |
✓ |
✓ |
✓ |
✓ |
HINCRBYFLOAT |
✓ |
✓ |
✓ |
✓ |
HKEYS |
✓ |
✓ |
✓ |
✓ |
HLEN |
✓ |
✓ |
✓ |
✓ |
HMGET |
✓ |
✓ |
✓ |
✓ |
HMSET |
✓ |
✓ |
✓ |
✓ |
HRANDFIELD |
⎻ |
⎻ |
⎻ |
✓ |
HSCAN |
✓ |
✓ |
✓ |
✓ |
HSET |
✓ |
✓ |
✓ |
✓ |
HSETNX |
✓ |
✓ |
✓ |
✓ |
HSTRLEN |
✓ |
✓ |
✓ |
✓ |
HVALS |
✓ |
✓ |
✓ |
✓ |
HyperLogLog 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
PFADD |
✓ |
✓ |
✓ |
✓ |
PFCOUNT |
✓ |
✓ |
✓ |
✓ |
PFMERGE |
✓ |
✓ |
✓ |
✓ |
Keys 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
COPY |
⎻ |
⎻ |
⎻ |
✓ |
DEL |
✓ |
✓ |
✓ |
✓ |
DUMP |
✓ |
✓ |
✓ |
✓ |
EXISTS |
✓ |
✓ |
✓ |
✓ |
EXPIRE |
✓ |
✓ |
✓ |
✓ |
EXPIREAT |
✓ |
✓ |
✓ |
✓ |
PEXPIRETIME |
⎻ |
⎻ |
⎻ |
✓ |
KEYS |
✓ |
config |
config |
config |
MIGRATE |
✓ |
✓ |
✓ |
✓ |
MOVE |
✓ |
✓ |
✓ |
✓ |
OBJECT |
✓ |
✓ |
✓ |
✓ |
OBJECT HELP |
⎻ |
⎻ |
⎻ |
✓ |
PERSIST |
✓ |
✓ |
✓ |
✓ |
PEXPIRE |
✓ |
✓ |
✓ |
✓ |
PEXPIREAT |
✓ |
✓ |
✓ |
✓ |
PEXPIRETIME |
⎻ |
⎻ |
⎻ |
✓ |
PTTL |
✓ |
✓ |
✓ |
✓ |
RANDOMKEY |
✓ |
✓ |
✓ |
✓ |
RENAME |
✓ |
✓ |
✓ |
✓ |
RENAMENX |
✓ |
✓ |
✓ |
✓ |
RESTORE |
✓ |
✓ |
✓ |
✓ |
SCAN |
✓ |
✓ |
✓ |
✓ |
SORT |
✓ |
✓ |
✓ |
✓ |
SORT_RO |
⎻ |
⎻ |
⎻ |
✓ |
TOUCH |
✓ |
✓ |
✓ |
✓ |
TTL |
✓ |
✓ |
✓ |
✓ |
TYPE |
✓ |
✓ |
✓ |
✓ |
UNLINK |
✓ |
✓ |
✓ |
✓ |
WAIT |
✓ |
✓ |
✓ |
✓ |
Lists 命令族
命令 | 4.0 版本 | 5.0 版本 | 6.x 版本 | 7.x 版本 |
---|---|---|---|---|
BLPOP |
✓ |
✓ |
✓ |
✓ |
BLMOVE |
⎻ |
⎻ |
⎻ |
✓ |
BLMPOP |
⎻ |
⎻ |
⎻ |
✓ |
BRPOP |
✓ |
✓ |
✓ |
✓ |
BRPOPLPUSH |
✓ |
✓ |
✓ |
✓ |
LINDEX |
✓ |
✓ |
✓ |
✓ |
LINSERT |
✓ |
✓ |
✓ |
✓ |
LLEN |
✓ |
✓ |
✓ |
✓ |
LMOVE |
⎻ |
⎻ |
⎻ |
✓ |
LMPOP |
⎻ |
⎻ |
⎻ |
✓ |
LPOP |
✓ |
✓ |
✓ |
✓ |
LPUSH |
✓ |
✓ |
✓ |
✓ |
LPUSHX |
✓ |
✓ |
✓ |
✓ |
LRANGE |
✓ |
✓ |
✓ |
✓ |
LREM |
✓ |
✓ |
✓ |
✓ |
LSET |
✓ |
✓ |
✓ |
✓ |
LTRIM |
✓ |
✓ |
✓ |
✓ |
RPOP |
✓ |
✓ |
✓ |