Supported Redis commands

Last Updated: Jul 13, 2017

ApsaraDB for Redis is compatible with Redis 3.0 and supports Redis 3.0 GEO commands. There are some commands temporarily unavailable and restricted commands.

Supported commands
Keys 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
PEXPTREAT 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 RPOPLPUSH SSCAN ZUNIONSTORE
TTL MSETNX RPUSH ZINTERSTORE
TYPE PSETEX RPUSHX ZSCAN
SCAN SET ZRANGEBYLEX
OBJECT SETBIT ZLEXCOUNT
SETEX ZREMRANGEBYLEX
SETNX
SETRANGE
STRLEN

And

HyperLogLog Pub/Sub (publish/subscription) Transaction Connection Server Scripting Geo (geological position)
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
Commands temporarily unavailable
Keys Server
MIGRATE BGREWRITEAOF
BGSAVE
CONFIG REWRITE
CONFIG SET
CONFIG RESETSTAT
COMMAND
COMMAND COUNT
COMMAND GETKEYS
COMMAND INFO
DEBUG OBJECT
DEBUG SEGFAULT
LASTSAVE
ROLE
SAVE
SHUTDOWN
SLAVEOF
SYNC
Commands not supported by cluster instances
Scripting Keys Server
EVAL SCAN CLIENT KILL
EVALSHA CLIENT LIST
SCRIPT EXISTS CLIENT GETNAME
SCRIPT FLUSH CLIENT SETNAME
SCRIPT KILL MONITOR
SCRIPT LOAD
Commands restricted for cluster instances
Keys Strings Lists Sets Sorted Sets HyperLogLog Transaction
RENAME MSETNX RPOPLPUSH SINTERSTORE ZUNIONSTORE PFMERGE DISCARD
RENAMENX SINTER ZINTERSTORE PFCOUNT EXEC
SORT SUNIONSTORE MULTI
SUNION UNWATCH
SDIFFSTORE WATCH
SDIFF
SMOVE

Note:

  • Restricted commands support only scenarios where keys to be operated are evenly distributed in a single hash slot and cannot merge hash slot data. Therefore, you need to use the hash tag to ensure keys to be operated are evenly distributed in one hash slot.

    For example, if there are key1, aakey, and abkey3 to be operated, you need to store them in the {key}1, aa{key}, and ab{key}3 mode, so that restricted commands can take effect when being called. For detailed usage of hash tag, refer to the official document of ApsaraDB for Redis at: http://redis.io/topics/cluster-spec.

  • For details about Redis commands, refer to this official document.

Thank you! We've received your feedback.