This topic describes the commands supported by the engine version Redis 5.0 of ApsaraDB for Redis instances. The commands include standard instances, cluster instances, and read/write splitting instances.

Supported Redis commands

Table 1. Supported Redis commands 1
Key String Hash List Set SortedSet Stream
DEL APPEND HDEL BLPOP SADD ZADD XINFO
DUMP BITCOUNT HEXISTS BRPOP SCARD ZCARD XADD
EXISTS BITOP HGET BRPOPLPUSH SDIFF ZCOUNT XTRIM
EXPIRE BITPOS HGETALL LINDEX SDIFFSTORE ZINCRBY XDEL
EXPIREAT DECR HINCRBY LINSERT SINTER ZRANGE XRANGE
MOVE DECRBY HINCRBYFLOAT LLEN SINTERSTORE ZRANGEBYSCORE XREVRANGE
PERSIST GET HKEYS LPOP SISMEMBER ZRANK XLEN
PEXPIRE GETBIT HLEN LPUSH SMEMBERS ZREM XREAD
PEXPIREAT GETRANGE HMGET LPUSHX SMOVE ZREMRANGEBYRANK XGROUP
PTTL GETSET HMSET LRANGE SPOP ZREMRANGEBYSCORE XREADGROUP
RANDOMKEY INCR HSET LREM SRANDMEMBER ZREVRANGE XACK
RENAME INCRBY HSETNX LSET SREM ZREVRANGEBYSCORE XCLAIM
RENAMENX INCRBYFLOAT HVALS LTRIM SUNION ZREVRANK XPENDING
RESTORE MGET HSCAN RPOP SUNIONSTORE ZSCORE
SORT MSET RPOPLPUSH SSCAN ZUNIONSTORE
TTL MSETNX RPUSH ZINTERSTORE
TYPE PSETEX RPUSHX ZSCAN
SCAN SET ZRANGEBYLEX
OBJECT SETBIT ZLEXCOUNT
UNLINK SETEX ZREMRANGEBYLEX
SETNX ZPOPMAX
SETRANGE ZPOPMIN
STRLEN BZPOPMIN
BZPOPMAX
Table 2. Supported Redis commands 2
HyperLogLog Pub/Sub Transaction Connection Server Scripting Geo
PFADD PSUBSCRIBE DISCARD AUTH FLUSHALL EVAL GEOADD
PFCOUNT PUBLISH EXEC ECHO FLUSHDB EVALSHA GEOHASH
PFMERGE PUBSUB MULTI PING DBSIZE SCRIPT EXISTS GEOPOS
PUNSUBSCRIBE UNWATCH QUIT TIME SCRIPT FLUSH GEODIST
SUBSCRIBE WATCH SELECT INFO SCRIPT KILL GEORADIUS
UNSUBSCRIBE KEYS SCRIPT LOAD GEORADIUSBYMEMBER
CLIENT KILL
CLIENT LIST
CLIENT GETNAME
CLIENT SETNAME
CONFIG GET
MONITOR
SLOWLOG
SWAPDB
MEMORY
CLIENT UNBLOCK
CLIENT ID
LOLWUT
Note
  • On ApsaraDB for Redis cluster instances:
    • When you run the CLIENT LIST command, you can retrieve information about all connections to the specified proxy server. In this list, the fields including id, age, idle, addr, fd, name, db, multi, omem, and cmd indicate the same meanings as those in the native Redis kernel. The values of the sub and psub fields are either both 1 or both 0 for all proxy servers. The qbuf, qbuf-free, obl, and oll fields have no meanings and can be ignored.
    • You can run the CLIENT KILL command in two ways: client kill ip:port and client kill addr ip:port.
  • On ApsaraDB for Redis read-write-splitting and cluster instances:CLIENT ID is not available.