This topic describes the compatibility of Orca in a PolarDB for MySQL cluster.
Compatibility with Redis
Orca is compatible with specific commands of Redis 7.0 and later versions and supports RESP2 and RESP3. The following table describes the support of Orca for Redis commands.
Orca does not support Redis commands that are not included in the following table. Orca only supports only operations within a single DB and does not support cross-DB commands such as the MOVE command.
Category | Command | Supported |
Bitmap | BITCOUNT | Yes |
BITOP | Yes | |
BITPOS | Yes | |
SETBIT | Yes | |
GETBIT | Yes | |
Other commands | No | |
Connection management | PING | Yes |
ECHO | Yes | |
HELLO | Yes Note
| |
AUTH | Yes Note
| |
Other commands | No | |
Generic | DEL | Yes |
UNLINK | Yes | |
EXISTS | Yes | |
KEYS | Yes | |
RENAME | Yes | |
RENAMENX | Yes | |
TYPE | Yes | |
EXPIRE | Yes | |
EXPIREAT | Yes | |
EXPIRETIME | Yes | |
PERSIST | Yes | |
PEXPIRE | Yes | |
PEXPIREAT | Yes | |
PEXPIRETIME | Yes | |
TTL | Yes | |
PTTL | Yes | |
RANDOMKEY | Yes | |
DUMP | Yes | |
RESTORE | Yes | |
INFO | Yes | |
SCAN | Yes | |
Other commands | No | |
Hash | HDEL | Yes |
HEXISTS | Yes | |
HGET | Yes | |
HGETALL | Yes | |
HINCRBY | Yes | |
HINCRBYFLOAT | Yes | |
HKEYS | Yes | |
HLEN | Yes | |
HMGET | Yes | |
HMSET | Yes | |
HSET | Yes | |
HSETNX | Yes | |
HRANDFIELD | Yes | |
HVALS | Yes | |
HSTRLEN | Yes | |
HSCAN | Yes | |
Other commands | No | |
List | LINDEX | Yes |
LINSERT | Yes | |
LLEN | Yes | |
LMOVE | Yes | |
LMPOP | Yes | |
LPOP | Yes | |
LPOS | Yes | |
LPUSH | Yes | |
LPUSHX | Yes | |
LRANGE | Yes | |
LREM | Yes | |
LSET | Yes | |
LTRIM | Yes | |
RPOP | Yes | |
RPOPLPUSH | Yes | |
RPUSH | Yes | |
RPUSHX | Yes | |
Other commands | No | |
Server management | DBSIZE | Yes |
FLUSHALL | Yes Note
| |
FLUSHDB | Yes Note
| |
Other commands | No | |
Set | SADD | Yes |
SCARD | Yes | |
SDIFF | Yes | |
SDIFFSTORE | Yes | |
SINTER | Yes | |
SINTERCARD | Yes | |
SINTERSTORE | Yes | |
SISMEMBER | Yes | |
SMEMBERS | Yes | |
SMISMEMBER | Yes | |
SMOVE | Yes | |
SREM | Yes | |
SUNION | Yes | |
SUNIONSTORE | Yes | |
SPOP | Yes | |
SRANDMEMBER | Yes | |
SSCAN | Yes | |
Other commands | No | |
Sorted set | ZADD | Yes |
ZCARD | Yes | |
ZCOUNT | Yes | |
ZDIFF | Yes | |
ZDIFFSTORE | Yes | |
ZINCRBY | Yes | |
ZINTERCARD | Yes | |
ZINTERSTORE | Yes | |
ZLEXCOUNT | Yes Note In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis. | |
ZMPOP | Yes | |
ZMSCORE | Yes | |
ZPOPMAX | Yes | |
ZPOPMIN | Yes | |
ZRANGE | Yes Note Syntax: If you specify the optional parameter | |
ZRANGEBYLEX | Yes Note In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis. | |
ZRANGEBYSCORE | Yes | |
ZRANGESTORE | Yes | |
ZRANK | Yes | |
ZREM | Yes | |
ZREMRANGEBYLEX | Yes Note In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis. | |
ZREMRANGEBYRANK | Yes | |
ZREMRANGEBYSCORE | Yes | |
ZREVRANGE | Yes | |
ZREVRANGEBYLEX | Yes Note In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis. | |
ZREVRANGEBYSCORE | Yes | |
ZREVRANK | Yes | |
ZSCORE | Yes | |
ZUNION | Yes | |
ZUNIONSTORE | Yes | |
ZRANDMEMBER | Yes | |
ZSCAN | Yes | |
Other commands | No | |
String | APPEND | Yes |
DECR | Yes | |
DECRBY | Yes | |
GET | Yes | |
GETDEL | Yes | |
GETEX | Yes | |
GETRANGE | Yes | |
GETSET | Yes | |
LCS | Yes | |
INCR | Yes | |
INCRBY | Yes | |
INCRBYFLOAT | Yes | |
MGET | Yes | |
MSET | Yes | |
MSETNX | Yes | |
PSETEX | Yes | |
SET | Yes | |
SETEX | Yes | |
SETNX | Yes | |
SETRANGE | Yes | |
STRLEN | Yes | |
SUBSTR | Yes |
Key length limits
In Redis, the maximum length of a single key is 512 MB. In Orca, the maximum length of a single key is 4 GB.
We recommend that you use a key that does not exceed 2560 bytes to achieve the optimal performance.