Proxy命令支持情况
概述
本文档以 Redis 6.2 版本的全部命令为基准,列出了 Redis Proxy 当前命令的支持情况。 目前 Redis 6.2 支持命令 281 个,Redis 支持命令 190 个,命令支持率为 190/281 = 0.6761。
更新
-
2022-04-15 更新:
新增支持:role、hello、monitor、client info、client id、zrevrangebylex、randomkey,补齐支持 client list、client kill 命令新增参数。
命令支持率 (195+7) / 281 = 71.8%。
-
2022-04-08 更新:
新增支持:支持事务类命令,包含: multi、exec、discard、watch、unwatch
命令支持率 (190+5) / 281 = 69.4%。
-
2022-03-11 更新:
新增支持:支持阻塞型命令,包含: blpop、brpop、blmove、brpoplpush、bzpopmin、bzpopmax 以及 xread 和 xreadgroup 中的 BLOCK 参数。
命令支持率 (184+6) / 281 = 67%。
-
2022-01-06 更新:
config set 是支持的,但是执行后不会生效。
命令支持率: (183+1) / 281 = 65%。
-
2021-12-17 更新:
对 redis 5x 和 redis 6x 的命令进行支持 017. 支持 Redis 5、Redis 6 新增命令 新增: getdel、getex、lpos、lmove zdiff、zdiffstore、zinter、zpopmax、zpopmin、zrandmember、zrangestore、zunion、zmscore、 hrandfield、 smismember、 copy、 geosearch 、geosearchstore xinfo、xadd、xtrim、xdel、xrange、xrevrange、xlen、xread、xgroup、xreadgroup、xack、xclaim、xautoclaim、xpending。
命令支持率: (151+32=183) / 281 = 64%。
-
2021-08-10 更新:
新增命令:dbsize、msetnx、rename、renamenx。
命令支持率: (147+4 = 151) / 281 = 53.38%。
-
2021-05-20 更新:
新增命令 9 个,现在 Redis 支持命令 147 个,命令支持率 147/281 = 0.5231 新增命令: time、hstrlen、object、bitpos、bitfield、bitop、memory usage、move、touch (9 个)。
命令支持情况详情
下面按类别列出了 Redis 6.2 支持的所有命令,并标明了当前 Redis 平台是否支持。
说明:
- 表格中 Y 表示支持,N 表示不支持,Y # 表示需要依赖于 hash tag 来支持(保证多个 key 在同一分片)。
- Redis 版本,表示从哪个版本 Redis 中才出现这个命令。
server
支持 14 / 58
命令 | 描述 | Redis 版本 | Redis 是否支持 | 备注 | acl load | Reload the ACLs from the configured ACL file. doc | 6.0.0 | N | acl save | Save the current ACL rules in the configured ACL file. doc | 6.0.0 | N | acl list | List the current ACL rules in ACL config file format. doc | 6.0.0 | N | acl users | List the username of all the configured ACL rules. doc | 6.0.0 | N | acl getuser | Get the rules for a specific ACL user. doc | 6.0.0 | N | acl setuser | Modify or create the rules for a specific ACL user. doc | 6.0.0 | N | acl deluser | Remove the specified ACL users and the associated rules. doc | 6.0.0 | N | acl cat | List the ACL categories or the commands inside a category. doc | 6.0.0 | N | acl genpass | Generate a pseudorandom secure password to use for ACL users. doc | 6.0.0 | N | acl whoami | Return the name of the user associated to the current connection. doc | 6.0.0 | N | acl log | List latest events denied because of ACLs in place. doc | 6.0.0 | N | acl help | Show helpful text about the different subcommands. doc | 6.0.0 | N | bgrewriteaof | Asynchronously rewrite the append-only file. doc | 1.0.0 | N | bgsave | Asynchronously save the dataset to disk. doc | 1.0.0 | N | command | Get array of Redis command details. doc | 2.8.1 | Y | command count | Get total number of Redis commands. doc | 2.8.1 | Y | command getkeys | Extract keys given a full Redis command. doc | 2.8.1 | Y | command info | Get array of specific Redis command details. doc | 2.8.1 | Y | config get | Get the value of a configuration parameter. doc | 2.0.0 | Y | config rewrite | Rewrite the configuration file with the in memory configuration. doc | 2.8.0 | N | config set | Set a configuration parameter to the given value. doc | 2.0.0 | Y | 假实现,执行后无效 | config resetstat | Reset the stats returned by INFO. doc | 2.0.0 | N | dbsize | Return the number of keys in the selected database. doc | 1.0.0 | Y | debug object | Get debugging information about a key. doc | 1.0.0 | N | debug segfault | Make the server crash. doc | 1.0.0 | N | failover | Start a coordinated failover between this server and one of its replicas.. doc | 6.2.0 | N | flushall | Remove all keys from all databases. doc | 1.0.0 | Y | 支持,但其实在 Redis 层把此命令 rename 了 | flushdb | Remove all keys from the current database. doc | 1.0.0 | Y | info | Get information and statistics about the server. doc | 1.0.0 | Y | 不支持 info replication | persistence | tkeyspace | lolwut | Display some computer art and the Redis version. doc | 5.0.0 | N | lastsave | Get the UNIX time stamp of the last successful save to disk. doc | 1.0.0 | N | memory doctor | Outputs memory problems report. doc | 4.0.0 | N | memory 族命令大多需要和多个分片通信获取 memory 使用信息,代价太大。而且获取到的是文本信息,无法汇总诊断报告 | memory help | Show helpful text about the different subcommands. doc | 4.0.0 | N | memory malloc-stats | Show allocator internal stats. doc | 4.0.0 | N | memory purge | Ask the allocator to release memory. doc | 4.0.0 | N | memory stats | Show memory usage details. doc | 4.0.0 | N | memory usage | Estimate the memory usage of a key. doc | 4.0.0 | Y | module list | List all modules loaded by the server. doc | 4.0.0 | N | module load | Load a module. doc | 4.0.0 | N | module unload | Unload a module. doc | 4.0.0 | N | monitor | Listen for all requests received by the server in real time. doc | 1.0.0 | Y | 观察 Proxy 上的请求, since 3.2.5 | role | Return the role of the instance in the context of replication. doc | 2.8.1 | Y | save | Synchronously save the dataset to disk. doc | 1.0.0 | N | shutdown | Synchronously save the dataset to disk and then shut down the server. doc | 1.0.0 | N | slaveof | Make the server a replica of another instance, or promote it as master. Deprecated starting with Redis 5. Use REPLICAOF instead.. doc | 1.0.0 | N | replicaof | Make the server a replica of another instance, or promote it as master.. doc | 5.0.0 | N | slowlog | Manages the Redis slow queries log. doc | 2.2.1 | N | slowlog 需要与多个分片通信,才能获得完整的信息 | swapdb | Swaps two Redis databases. doc | 4.0.0 | N | sync | Internal command used for replication. doc | 1.0.0 | N | psync | Internal command used for replication. doc | 2.8.0 | N | time | Return the current server time. doc | 2.6.0 | Y | latency doctor | Return a human readable latency analysis report.. doc | 2.8.1 | N | latency graph | Return a latency graph for the event.. doc | 2.8.1 | N | latency history | Return timestamp-latency samples for the event.. doc | 2.8.1 | N | latency latest | Return the latest latency samples for all events.. doc | 2.8.1 | N | latency reset | Reset latency data for one or more events.. doc | 2.8.1 | N | latency help | Show helpful text about the different subcommands.. doc | 2.8.1 | N |
string
支持率:26 / 27
connection
支持率:12 / 21
list
支持率:20 / 20
sorted_set
支持率:32 / 32
hash
支持率:16 / 16
set
支持率:16 / 16
generic
支持率:22 / 25
pubsub
支持率:6 / 6
命令 | 描述 | Redis 版本 | Redis 是否支持 | 备注 |
---|---|---|---|---|
psubscribe | Listen for messages published to channels matching the given patterns. doc | 2.0.0 | Y | |
pubsub | Inspect the state of the Pub/Sub subsystem. doc | 2.8.0 | Y | |
publish | Post a message to a channel. doc | 2.0.0 | Y | |
punsubscribe | Stop listening for messages posted to channels matching the given patterns. doc | 2.0.0 | Y | |
subscribe | Listen for messages published to the given channels. doc | 2.0.0 | Y | |
unsubscribe | Stop listening for messages posted to the given channels. doc | 2.0.0 | Y |
scripting
支持率:6 / 7
命令 | 描述 | Redis 版本 | Redis 是否支持 | 备注 |
---|---|---|---|---|
eval | Execute a Lua script server side. doc | 2.6.0 | Y | |
evalsha | Execute a Lua script server side. doc | 2.6.0 | Y | |
script debug | Set the debug mode for executed scripts.. doc | 3.2.0 | N | |
script exists | Check existence of scripts in the script cache.. doc | 2.6.0 | Y | |
script flush | Remove all the scripts from the script cache.. doc | 2.6.0 | Y | |
script kill | Kill the script currently in execution.. doc | 2.6.0 | Y | |
script load | Load the specified Lua script into the script cache.. doc | 2.6.0 | Y |
geo
支持率:8 / 8
hyperloglog
支持率:3 / 3
命令 | 描述 | Redis 版本 | Redis 是否支持 | 备注 |
---|---|---|---|---|
pfadd | Adds the specified elements to the specified HyperLogLog.. doc | 2.8.9 | Y | |
pfcount | Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).. doc | 2.8.9 | Y | |
pfmerge | Merge N different HyperLogLogs into a single one.. doc | 2.8.9 | Y |
cluster
支持率:2 / 24
stream
支持率:14 / 14
transactions
支持率:4 / 4
命令 | 描述 | Redis 版本 | Redis 是否支持 | 备注 |
---|---|---|---|---|
discard | Discard all commands issued after MULTI. doc | 2.0.0 | Y # | |
exec | Execute all commands issued after MULTI. doc | 1.2.0 | Y # | |
multi | Mark the start of a transaction block. doc | 1.2.0 | Y # | |
unwatch | Forget about all watched keys. doc | 2.2.0 | Y # | |
watch | Watch the given keys to determine execution of the MULTI/EXEC block. doc | 2.2.0 | Y # |