| 交互模式 | redis-cli --cluster reshard <任一节点> |
|---|---|
| 批处理 | --cluster reshard --cluster-from <id> --cluster-to <id> --cluster-slots <n> --cluster-yes |
| 收尾 | 自动执行 SETSLOT NODE 广播 |
示例
示例
redis-cli --cluster reshard 10.0.0.11:7000 --cluster-from <源id> --cluster-to <目标id> --cluster-slots 1000 --cluster-yes迁移期间对应槽的访问会短暂重定向(ASK),客户端正确处理后对业务透明;大 key 会拉长单次迁移。