Hi, I am running this command redis-benchmark -c 50 -n 10000 -h 127.0.0.1 -p 6380 --cluster -r 10000 SET {account}:__rand_int__ 1000

But I got the following error and there are only a few records created

Cluster has 3 master nodes:

Master 0: 46f7105e11ac059bd100f8dcfb12d1709c980294 172.23.0.5:6379
Master 1: 2ae767e4f309f7b55c0004c5e0cca6f722fcc594 172.23.0.6:6379
Master 2: 0c0a34d1ecc4f7b18af771dccdaac1dcc2a0e9c6 172.23.0.8:6379

Error from server 172.23.0.6:6379: MOVED 3665 172.23.0.5:6379

My Redis cluster is running in docker containers with a bridge network

My redis-benmark version is redis-benchmark 7.4.0 (git:760ee5d1) redis server image is redis:latest

Comment From: sundb

@godjoem thanks, same error in my local, please wait us to fix it. you can also make a PR to fix if you want. you can also use memtier_benchmark which supports cluster mode if you're in hurry.

Comment From: godjoem

@sundb Thank you for the response. I'll use memtier_benchmark for now and await your fix.

Comment From: sundb

@godjoem i realize that this is not a bug. please try: redis-benchmark -c 50 -n 10000 -h 127.0.0.1 -p 6380 --cluster -r 10000 SET {tag}:__rand_int__ 1000

 --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.

Comment From: godjoem

redis-benchmark -c 50 -n 10000 -h 127.0.0.1 -p 6380 --cluster -r 10000 SET {tag}:__rand_int__ 1000

Thank you @sundb, it works. (I had previously noticed this part of the manual, but I thought the tag was a placeholder that should be replaced with a specific hash tag.)

But it seems to automatically generate the hash tags for me. Is there no way to use a specific, fixed hash tag like {account} (I know it's a bit strange to do so in a Redis cluster)?

Comment From: sundb

@godjoem if you just want to benchmark one node and you know the key belongs to this node, you can run without --cluster.

Comment From: godjoem

@godjoem if you just want to benchmark one node and you know the key belongs to this node, you can run without --cluster.

Noted, thank you very much.