cluster keyslot、cluster countkeysinslot、cluster getkeysinslot、cluster slots、cluster shards。其中 cluster shards 仅 Redis 7.0 及 Valkey 8.0、9.0 的标准架构与集群架构支持;其余4个在 Redis 4.0 及之后各版本的集群架构中均支持,标准架构不支持。cluster slots 返回槽到节点映射,cluster shards 返回槽到分片映射(7.0+ 的改进版本)。cluster nodes、cluster info。在 Redis 4.0 及之后各版本的集群架构中均支持,标准架构不支持。cluster 命令均不适用(✗)。集群架构下仅槽位查询(cluster keyslot、cluster countkeysinslot、cluster getkeysinslot、cluster slots、cluster shards)及集群信息查询(cluster nodes、cluster info)子命令受支持,其余涉及拓扑变更的运维管理命令全局不可用。cluster shards 是 cluster slots 的改进版本(Redis 7.0+ 引入),提供按分片聚合的槽位映射信息。命令 | Valkey 9.0标准架构 | Valkey 9.0集群架构 | Redis 7.0 / Valkey 8.0标准架构 | Redis 7.0 / Valkey 8.0集群架构 | Redis 6.2标准架构 | Redis 6.2集群架构 | Redis 5.0标准架构 | Redis 5.0集群架构 | Redis 4.0标准架构 | Redis 4.0集群架构 | Redis 2.8标准架构 | 集群架构跨 Slot 支持 |
cluster keyslot | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | — |
cluster countkeysinslot | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | — |
cluster getkeysinslot | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | — |
cluster slots | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | — |
cluster shards | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | — |
cluster nodes | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | — |
cluster info | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | — |
文档反馈