This topic describes the commands supported by ApsaraDB for Redis instances that use Redis 2.8. These instances include standard instances, cluster instances, and read/write splitting instances. ApsaraDB for Redis instances that use Redis 2.8 support the commands supported by native Redis 3.0.

Supported Redis commands

Table 1. Supported Redis commands 1
Key String Hash List Set SortedSet
DEL APPEND HDEL BLPOP SADD ZADD
DUMP BITCOUNT HEXISTS BRPOP SCARD ZCARD
EXISTS BITOP HGET BRPOPLPUSH SDIFF ZCOUNT
EXPIRE BITPOS HGETALL LINDEX SDIFFSTORE ZINCRBY
EXPIREAT DECR HINCRBY LINSERT SINTER ZRANGE
MOVE DECRBY HINCRBYFLOAT LLEN SINTERSTORE ZRANGEBYSCORE
PERSIST GET HKEYS LPOP SISMEMBER ZRANK
PEXPIRE GETBIT HLEN LPUSH SMEMBERS ZREM
PEXPIREAT GETRANGE HMGET LPUSHX SMOVE ZREMRANGEBYRANK
PTTL GETSET HMSET LRANGE SPOP ZREMRANGEBYSCORE
RANDOMKEY INCR HSET LREM SRANDMEMBER ZREVRANGE
RENAME INCRBY HSETNX LSET SREM ZREVRANGEBYSCORE
RENAMENX INCRBYFLOAT HVALS LTRIM SUNION ZREVRANK
RESTORE MGET HSCAN RPOP SUNIONSTORE ZSCORE
SORT MSET None RPOPLPUSH SSCAN ZUNIONSTORE
TTL MSETNX None RPUSH None ZINTERSTORE
TYPE PSETEX None RPUSHX None ZSCAN
SCAN SET None None None ZRANGEBYLEX
OBJECT SETBIT None None None ZLEXCOUNT
None SETEX None None None ZREMRANGEBYLEX
None SETNX None None None None
None SETRANGE None None None None
None STRLEN None None None None
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
None PUNSUBSCRIBE UNWATCH QUIT TIME SCRIPT FLUSH GEODIST
None SUBSCRIBE WATCH SELECT INFO SCRIPT KILL GEORADIUS
None UNSUBSCRIBE None None KEYS SCRIPT LOAD GEORADIUSBYMEMBER
None None None None CLIENT KILL None None
None None None None CLIENT LIST None None
None None None None CLIENT GETNAME None None
None None None None CLIENT SETNAME None None
None None None None CONFIG GET None None
None None None None MONITOR None None
None None None None SLOWLOG None None
Note
  • In an ApsaraDB for Redis cluster instance:
    • You can run the CLIENT LIST command to retrieve information about the connections to the specified proxy server. 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 disregarded.
    • You can run the CLIENT KILL command by using the following two methods: client kill ip:port and client kill addr ip:port.
  • The CLIENT ID command is not supported by read/write splitting instances and cluster instances.

Other Redis commands

  • For more information about other supported commands, see Overview.
  • For more information about unsupported commands, see Unsupported commands.