redis集群压测报错Error from server: MOVED

文章讲述了在Redis7集群进行压测时遇到MOVED错误,通过网络检查、防火墙与SELinux服务验证,确认节点配置无误后,发现需在redis-benchmark中添加--cluster参数以指定槽位,以正确路由命令到集群节点。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

redis集群压测报错Error from server: MOVED

故障描述

redis7集群压测报错


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 路由到槽


[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}”。 否则,

                命令将不会发送到正确的集群节点。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值