ApsaraDB for Redis Community Edition provides instances of multiple editions and architectures.
The commands supported by the instances vary with their instance types. This topic
describes the native Redis commands supported by ApsaraDB for Redis Community Edition
and the limits of these commands.
Precautions
To simplify management and O&M, cluster and read/write splitting instances support
multiple commands that are developed by Alibaba Cloud. For more information, see Redis commands developed by Alibaba Cloud.
Symbols in the tables
This section describes the symbols that are used in the tables of this topic.
- ✔️️ indicates that this command is supported.
- ❌ indicates that this command is not supported.
- ➖ indicates that the command is not supported in open source Redis. For example, the
TOUCH command is supported only by Redis 3.2.1 and later. This command is marked as ➖ in
the Redis 2.8 column of the table.
- Footnote ①: If you want to run the command on a cluster instance, you must enable
the direct connection mode to use a private endpoint to connect to the instance. For
more information, see Use a private endpoint to connect to an ApsaraDB for Redis instance. You can also run the command if you use the endpoint of a proxy node to connect
to an instance.
- Footnote ②: The CONFIG SET command returns only
OK
. The command does not modify the parameters. This ensures that the instance remains
compatible with specific client frameworks.
Note By default, commands in all command groups are supported by standard instances, cluster
instances, and read/write splitting instances. For more information about instance
architectures, see
Overview.
Cluster command group
Note
- The commands in the cluster command group are not supported by standard instances.
- However, if you use the endpoint of a proxy node to connect to an instance, specific
commands in the cluster command group are supported. These commands include CLUSTER INFO, CLUSTER KEYSLOT, CLUSTER NODES, CLUSTER SLAVES, and CLUSTER SLOTS.
- The READONLY and READWRITE commands are supported as of minor versions 0.1.14 of ApsaraDB
for Redis 5.0 and 6.0.
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
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 SETSLOT |
➖ |
❌ |
❌ |
❌ |
CLUSTER SLAVES |
➖ |
❌ |
❌ |
❌ |
CLUSTER SLOTS |
✔️ |
✔️ |
✔️ |
✔️ |
READONLY |
➖ |
❌ |
✔️ |
✔️ |
READWRITE |
➖ |
❌ |
✔️ |
✔️ |
Connection command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
AUTH |
✔️ |
✔️ |
✔️ |
✔️ |
CLIENT CACHING |
➖ |
➖ |
➖ |
✔️ |
CLIENT GETNAME |
✔️ |
✔️ |
✔️ |
✔️ |
CLIENT GETREDIR |
➖ |
➖ |
➖ |
✔️ |
CLIENT ID |
➖ |
➖ |
✔️ |
✔️ |
CLIENT KILL |
✔️ |
✔️ |
✔️ |
✔️ |
CLIENT LIST |
✔️ |
✔️ |
✔️ |
✔️ |
CLIENT PAUSE |
❌ |
❌ |
❌ |
❌ |
CLIENT REPLY |
❌ |
❌ |
❌ |
❌ |
CLIENT SETNAME |
✔️ |
✔️ |
✔️ |
✔️ |
CLIENT TRACKING |
➖ |
➖ |
➖ |
✔️ |
CLIENT UNBLOCK |
➖ |
➖ |
✔️ |
✔️ |
ECHO |
✔️ |
✔️ |
✔️ |
✔️ |
HELLO |
➖ |
➖ |
➖ |
✔️ |
PING |
✔️ |
✔️ |
✔️ |
✔️ |
QUIT |
✔️ |
✔️ |
✔️ |
✔️ |
SELECT |
✔️ |
✔️ |
✔️ |
✔️ |
Geo command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
GEOADD |
✔️ |
✔️ |
✔️ |
✔️ |
GEODIST |
✔️ |
✔️ |
✔️ |
✔️ |
GEOHASH |
✔️ |
✔️ |
✔️ |
✔️ |
GEOPOS |
✔️ |
✔️ |
✔️ |
✔️ |
GEORADIUS |
✔️ |
✔️ |
✔️ |
✔️ |
GEORADIUSBYMEMBER |
✔️ |
✔️ |
✔️ |
✔️ |
Hashes command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
HDEL |
✔️ |
✔️ |
✔️ |
✔️ |
HEXISTS |
✔️ |
✔️ |
✔️ |
✔️ |
HGET |
✔️ |
✔️ |
✔️ |
✔️ |
HGETALL |
✔️ |
✔️ |
✔️ |
✔️ |
HINCRBY |
✔️ |
✔️ |
✔️ |
✔️ |
HINCRBYFLOAT |
✔️ |
✔️ |
✔️ |
✔️ |
HKEYS |
✔️ |
✔️ |
✔️ |
✔️ |
HLEN |
✔️ |
✔️ |
✔️ |
✔️ |
HMGET |
✔️ |
✔️ |
✔️ |
✔️ |
HMSET |
✔️ |
✔️ |
✔️ |
✔️ |
HSCAN |
✔️ |
✔️ |
✔️ |
✔️ |
HSET |
✔️ |
✔️ |
✔️ |
✔️ |
HSETNX |
✔️ |
✔️ |
✔️ |
✔️ |
HSTRLEN |
✔️ |
✔️ |
✔️ |
✔️ |
HVALS |
✔️ |
✔️ |
✔️ |
✔️ |
HyperLogLog command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
PFADD |
✔️ |
✔️ |
✔️ |
✔️ |
PFCOUNT |
✔️ |
✔️ |
✔️ |
✔️ |
PFMERGE |
✔️ |
✔️ |
✔️ |
✔️ |
Keys command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
DEL |
✔️ |
✔️ |
✔️ |
✔️ |
DUMP |
✔️ |
✔️ |
✔️ |
✔️ |
EXISTS |
✔️ |
✔️ |
✔️ |
✔️ |
EXPIRE |
✔️ |
✔️ |
✔️ |
✔️ |
EXPIREAT |
✔️ |
✔️ |
✔️ |
✔️ |
KEYS |
✔️ |
✔️ |
✔️ |
✔️ |
MIGRATE |
❌ |
❌ |
❌ |
❌ |
MOVE |
✔️ |
✔️ |
✔️ |
✔️ |
OBJECT |
✔️ |
✔️ |
✔️ |
✔️ |
PERSIST |
✔️ |
✔️ |
✔️ |
✔️ |
PEXPIRE |
✔️ |
✔️ |
✔️ |
✔️ |
PEXPIREAT |
✔️ |
✔️ |
✔️ |
✔️ |
PTTL |
✔️ |
✔️ |
✔️ |
✔️ |
RANDOMKEY |
✔️ |
✔️ |
✔️ |
✔️ |
RENAME |
✔️ |
✔️ |
✔️ |
✔️ |
RENAMENX |
✔️ |
✔️ |
✔️ |
✔️ |
RESTORE |
✔️ |
✔️ |
✔️ |
✔️ |
SCAN |
✔️ |
✔️ |
✔️ |
✔️ |
SORT |
✔️ |
✔️ |
✔️ |
✔️ |
TOUCH |
➖ |
✔️ |
✔️ |
✔️ |
TTL |
✔️ |
✔️ |
✔️ |
✔️ |
TYPE |
✔️ |
✔️ |
✔️ |
✔️ |
UNLINK |
➖ |
✔️ |
✔️ |
✔️ |
WAIT |
➖ |
✔️ |
✔️ |
✔️ |
Note The WAIT command is not supported by proxy nodes of cluster instances. You can run
the WAIT command by using the private endpoint of a cluster instance to connect to
the instance.
Lists command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
BLPOP |
✔️ |
✔️ |
✔️ |
✔️ |
BRPOP |
✔️ |
✔️ |
✔️ |
✔️ |
BRPOPLPUSH |
✔️ |
✔️ |
✔️ |
✔️ |
LINDEX |
✔️ |
✔️ |
✔️ |
✔️ |
LINSERT |
✔️ |
✔️ |
✔️ |
✔️ |
LLEN |
✔️ |
✔️ |
✔️ |
✔️ |
LPOP |
✔️ |
✔️ |
✔️ |
✔️ |
LPUSH |
✔️ |
✔️ |
✔️ |
✔️ |
LPUSHX |
✔️ |
✔️ |
✔️ |
✔️ |
LRANGE |
✔️ |
✔️ |
✔️ |
✔️ |
LREM |
✔️ |
✔️ |
✔️ |
✔️ |
LSET |
✔️ |
✔️ |
✔️ |
✔️ |
LTRIM |
✔️ |
✔️ |
✔️ |
✔️ |
RPOP |
✔️ |
✔️ |
✔️ |
✔️ |
RPOPLPUSH |
✔️ |
✔️ |
✔️ |
✔️ |
RPUSH |
✔️ |
✔️ |
✔️ |
✔️ |
RPUSHX |
✔️ |
✔️ |
✔️ |
✔️ |
Pub and Sub command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
PSUBSCRIBE |
✔️ |
✔️ |
✔️ |
✔️ |
PUBLISH |
✔️ |
✔️ |
✔️ |
✔️ |
PUBSUB |
✔️ |
✔️ |
✔️ |
✔️ |
PUNSUBSCRIBE |
✔️ |
✔️ |
✔️ |
✔️ |
SUBSCRIBE |
✔️ |
✔️ |
✔️ |
✔️ |
UNSUBSCRIBE |
✔️ |
✔️ |
✔️ |
✔️ |
Scripting command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
EVAL |
✔️ |
✔️ |
✔️ |
✔️ |
EVALSHA |
✔️ |
✔️ |
✔️ |
✔️ |
SCRIPT DEBUG |
➖ |
❌ |
❌ |
❌ |
SCRIPT EXISTS |
✔️ |
✔️ |
✔️ |
✔️ |
SCRIPT FLUSH |
✔️ |
✔️ |
✔️ |
✔️ |
SCRIPT KILL |
✔️ |
✔️ |
✔️ |
✔️ |
SCRIPT LOAD |
✔️ |
✔️ |
✔️ |
✔️ |
Sentinel command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
SENTINEL sentinels |
❌ |
✔️ |
✔️ |
✔️ |
SENTINEL get-master-addr-by-name |
❌ |
✔️ |
✔️ |
✔️ |
Server command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
ACL CAT |
➖ |
➖ |
➖ |
❌ |
ACL DELUSER |
➖ |
➖ |
➖ |
❌ |
ACL GENPASS |
➖ |
➖ |
➖ |
❌ |
ACL GETUSER |
➖ |
➖ |
➖ |
❌ |
ACL HELP |
➖ |
➖ |
➖ |
❌ |
ACL LIST |
➖ |
➖ |
➖ |
❌ |
ACL LOAD |
➖ |
➖ |
➖ |
❌ |
ACL LOG |
➖ |
➖ |
➖ |
❌ |
ACL SAVE |
➖ |
➖ |
➖ |
❌ |
ACL SETUSER |
➖ |
➖ |
➖ |
❌ |
ACL USERS |
➖ |
➖ |
➖ |
❌ |
ACL WHOAMI |
➖ |
➖ |
➖ |
❌ |
BGREWRITEAOF |
❌ |
❌ |
❌ |
❌ |
BGSAVE |
❌ |
❌ |
❌ |
❌ |
COMMAND |
✔️ |
✔️ |
✔️ |
✔️ |
COMMAND COUNT |
✔️ |
✔️ |
✔️ |
✔️ |
COMMAND GETKEYS |
✔️ |
✔️ |
✔️ |
✔️ |
COMMAND INFO |
✔️ |
✔️ |
✔️ |
✔️ |
CONFIG GET |
✔️ |
✔️ |
✔️ |
✔️ |
CONFIG RESETSTAT |
✔️ |
✔️ |
✔️ |
✔️ |
CONFIG REWRITE |
❌ |
❌ |
❌ |
❌ |
CONFIG SET ② |
✔️ |
✔️ |
✔️ |
✔️ |
DBSIZE |
✔️ |
✔️ |
✔️ |
✔️ |
DEBUG OBJECT |
❌ |
❌ |
❌ |
❌ |
DEBUG SEGFAULT |
❌ |
❌ |
❌ |
❌ |
FLUSHALL |
✔️ |
✔️ |
✔️ |
✔️ |
FLUSHDB |
✔️ |
✔️ |
✔️ |
✔️ |
INFO |
✔️ |
✔️ |
✔️ |
✔️ |
LASTSAVE |
❌ |
❌ |
❌ |
❌ |
LATENCY DOCTOR |
✔️ |
✔️ |
✔️ |
✔️ |
LATENCY GRAPH |
✔️ |
✔️ |
✔️ |
✔️ |
LATENCY HELP |
❌ |
❌ |
✔️ |
✔️ |
LATENCY HISTORY |
✔️ |
✔️ |
✔️ |
✔️ |
LATENCY LATEST |
✔️ |
✔️ |
✔️ |
✔️ |
LATENCY RESET |
✔️ |
✔️ |
✔️ |
✔️ |
LOLWUT |
➖ |
➖ |
✔️ |
✔️ |
MEMORY DOCTOR |
➖ |
✔️ |
✔️ |
✔️ |
MEMORY HELP |
➖ |
✔️ |
✔️ |
✔️ |
MEMORY MALLOC-STATS |
➖ |
✔️ |
✔️ |
✔️ |
MEMORY PURGE |
➖ |
✔️ |
✔️ |
✔️ |
MEMORY STATS |
➖ |
✔️ |
✔️ |
✔️ |
MEMORY USAGE |
➖ |
✔️ |
✔️ |
✔️ |
MODULE LIST |
➖ |
❌ |
❌ |
❌ |
MODULE LOAD |
➖ |
❌ |
❌ |
❌ |
MODULE UNLOAD |
➖ |
❌ |
❌ |
❌ |
MONITOR |
✔️ |
✔️ |
✔️ |
✔️ |
PSYNC |
❌ |
❌ |
❌ |
❌ |
REPLICAOF |
➖ |
➖ |
❌ |
❌ |
ROLE |
❌ |
✔️ |
✔️ |
✔️ |
SAVE |
❌ |
❌ |
❌ |
❌ |
SHUTDOWN |
❌ |
❌ |
❌ |
❌ |
SLAVEOF |
❌ |
❌ |
❌ |
❌ |
SLOWLOG |
✔️ |
✔️ |
✔️ |
✔️ |
SWAPDB |
➖ |
✔️ |
✔️ |
✔️ |
SYNC |
❌ |
❌ |
❌ |
❌ |
TIME |
✔️ |
✔️ |
✔️ |
✔️ |
Sets command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
SADD |
✔️ |
✔️ |
✔️ |
✔️ |
SCARD |
✔️ |
✔️ |
✔️ |
✔️ |
SDIFF |
✔️ |
✔️ |
✔️ |
✔️ |
SDIFFSTORE |
✔️ |
✔️ |
✔️ |
✔️ |
SINTER |
✔️ |
✔️ |
✔️ |
✔️ |
SINTERSTORE |
✔️ |
✔️ |
✔️ |
✔️ |
SISMEMBER |
✔️ |
✔️ |
✔️ |
✔️ |
SMEMBERS |
✔️ |
✔️ |
✔️ |
✔️ |
SMISMEMBER |
❌ |
❌ |
❌ |
❌️ |
SMOVE |
✔️ |
✔️ |
✔️ |
✔️ |
SPOP |
✔️ |
✔️ |
✔️ |
✔️ |
SRANDMEMBER |
✔️ |
✔️ |
✔️ |
✔️ |
SREM |
✔️ |
✔️ |
✔️ |
✔️ |
SSCAN |
✔️ |
✔️ |
✔️ |
✔️ |
SUNION |
✔️ |
✔️ |
✔️ |
✔️ |
SUNIONSTORE |
✔️ |
✔️ |
✔️ |
✔️ |
Sorted sets command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
BZPOPMAX |
➖ |
➖ |
✔️ |
✔️ |
BZPOPMIN |
➖ |
➖ |
✔️ |
✔️ |
ZADD |
✔️ |
✔️ |
✔️ |
✔️ |
ZCARD |
✔️ |
✔️ |
✔️ |
✔️ |
ZCOUNT |
✔️ |
✔️ |
✔️ |
✔️ |
ZINCRBY |
✔️ |
✔️ |
✔️ |
✔️ |
ZINTERSTORE |
✔️ |
✔️ |
✔️ |
✔️ |
ZLEXCOUNT |
✔️ |
✔️ |
✔️ |
✔️ |
ZPOPMAX |
➖ |
➖ |
✔️ |
✔️ |
ZPOPMIN |
➖ |
➖ |
✔️ |
✔️ |
ZRANGE |
✔️ |
✔️ |
✔️ |
✔️ |
ZRANGEBYLEX |
✔️ |
✔️ |
✔️ |
✔️ |
ZRANGEBYSCORE |
✔️ |
✔️ |
✔️ |
✔️ |
ZRANK |
✔️ |
✔️ |
✔️ |
✔️ |
ZREM |
✔️ |
✔️ |
✔️ |
✔️ |
ZREMRANGEBYLEX |
✔️ |
✔️ |
✔️ |
✔️ |
ZREMRANGEBYRANK |
✔️ |
✔️ |
✔️ |
✔️ |
ZREMRANGEBYSCORE |
✔️ |
✔️ |
✔️ |
✔️ |
ZREVRANGE |
✔️ |
✔️ |
✔️ |
✔️ |
ZREVRANGEBYLEX |
✔️ |
✔️ |
✔️ |
✔️ |
ZREVRANGEBYSCORE |
✔️ |
✔️ |
✔️ |
✔️ |
ZREVRANK |
✔️ |
✔️ |
✔️ |
✔️ |
ZSCAN |
✔️ |
✔️ |
✔️ |
✔️ |
ZSCORE |
✔️ |
✔️ |
✔️ |
✔️ |
ZUNIONSTORE |
✔️ |
✔️ |
✔️ |
✔️ |
Streams command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
XACK |
➖ |
➖ |
✔️ |
✔️ |
XADD |
➖ |
➖ |
✔️ |
✔️ |
XCLAIM |
➖ |
➖ |
✔️ |
✔️ |
XDEL |
➖ |
➖ |
✔️ |
✔️ |
XGROUP |
➖ |
➖ |
✔️ |
✔️ |
XINFO |
➖ |
➖ |
✔️ |
✔️ |
XLEN |
➖ |
➖ |
✔️ |
✔️ |
XPENDING |
➖ |
➖ |
✔️ |
✔️ |
XRANGE |
➖ |
➖ |
✔️ |
✔️ |
XREAD |
➖ |
➖ |
✔️ |
✔️ |
XREADGROUP |
➖ |
➖ |
✔️ |
✔️ |
XREVRANGE |
➖ |
➖ |
✔️ |
✔️ |
XTRIM |
➖ |
➖ |
✔️ |
✔️ |
Strings command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
APPEND |
✔️ |
✔️ |
✔️ |
✔️ |
BITCOUNT |
✔️ |
✔️ |
✔️ |
✔️ |
BITFIELD |
✔️ |
✔️ |
✔️ |
✔️ |
BITOP |
✔️ |
✔️ |
✔️ |
✔️ |
BITPOS |
✔️ |
✔️ |
✔️ |
✔️ |
DECR |
✔️ |
✔️ |
✔️ |
✔️ |
DECRBY |
✔️ |
✔️ |
✔️ |
✔️ |
GET |
✔️ |
✔️ |
✔️ |
✔️ |
GETBIT |
✔️ |
✔️ |
✔️ |
✔️ |
GETRANGE |
✔️ |
✔️ |
✔️ |
✔️ |
GETSET |
✔️ |
✔️ |
✔️ |
✔️ |
INCR |
✔️ |
✔️ |
✔️ |
✔️ |
INCRBY |
✔️ |
✔️ |
✔️ |
✔️ |
INCRBYFLOAT |
✔️ |
✔️ |
✔️ |
✔️ |
MGET |
✔️ |
✔️ |
✔️ |
✔️ |
MSET |
✔️ |
✔️ |
✔️ |
✔️ |
MSETNX |
✔️ |
✔️ |
✔️ |
✔️ |
PSETEX |
✔️ |
✔️ |
✔️ |
✔️ |
SET |
✔️ |
✔️ |
✔️ |
✔️ |
SETBIT |
✔️ |
✔️ |
✔️ |
✔️ |
SETEX |
✔️ |
✔️ |
✔️ |
✔️ |
SETNX |
✔️ |
✔️ |
✔️ |
✔️ |
SETRANGE |
✔️ |
✔️ |
✔️ |
✔️ |
STRALGO |
➖ |
➖ |
➖ |
✔️ |
STRLEN |
✔️ |
✔️ |
✔️ |
✔️ |
Transaction command group
Command |
Redis 2.8 |
Redis 4.0 |
Redis 5.0 |
Redis 6.0 |
DISCARD |
✔️ |
✔️ |
✔️ |
✔️ |
EXEC |
✔️ |
✔️ |
✔️ |
✔️ |
MULTI |
✔️ |
✔️ |
✔️ |
✔️ |
UNWATCH |
✔️ |
✔️ |
✔️ |
✔️ |
WATCH |
✔️ |
✔️ |
✔️ |
✔️ |