redis集群压测报错Error from server: MOVED
## redis集群压测报错Error from server: MOVED
## 故障描述
redis7集群压测报错
```sh
Summary:
throughput summary: 31250.00 requests per second
latency summary (msec):
avg min p50 p95 p99 max
7.907 1.664 7.007 12.999 13.775 14.127
Error from server: MOVED 13782 192.168.17.104:7000: -nan)
```
## 排查过程
- 节点网络是否畅通
- 检查防火墙&selinux
- 服务是否正常
- 节点槽位分配是否到位
- 手动测试是否可以路由到槽
## 结论
以上检查均正常,最后--help发现 redis-benchmark 集群模式压测需要加参数 --cluster 路由到槽
```sh
[root@redis102 redis]# redis-benchmark --help
Usage: redis-benchmark [OPTIONS] [COMMAND ARGS...]
Options:
-h <hostname> Server hostname (default 127.0.0.1)
-p <port> Server port (default 6379)
-s <socket> Server socket (overrides host and port)
-a <password> Password for Redis Auth
--user <username> Used to send ACL style 'AUTH username pass'. Needs -a.
-u <uri> Server URI.
-c <clients> Number of parallel connections (default 50)
-n <requests> Total number of requests (default 100000)
-d <size> Data size of SET/GET value in bytes (default 3)
--dbnum <db> SELECT the specified db number (default 0)
-3 Start session in RESP3 protocol mode.
--threads <num> Enable multi-thread mode.
--cluster Enable cluster mode.
If the command is supplied on the command line in cluster
mode, the key must contain "{tag}". Otherwise, the
command will not be sent to the right cluster node.
#启用集群模式。
如果在集群中的命令行上提供该命令
模式下,键必须包含“{tag}”。 否则,
命令将不会发送到正确的集群节点。
```
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!