Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

CLUSTER SETNODENAME

Last updated
CLUSTER SETNODENAME name
Group
Cluster
Complexity
O(1)
Arity
3 (exactly, counting the command name)
HotKV Cloud
Not available
On-Premise
no license needed

CLUSTER SETNODENAME sets the receiving node’s human-readable name, the value of cluster-announce-human-nodename. The name is saved in nodes.conf and sent to every other node at once, and all nodes then use it for this node in their log lines instead of its address, which makes the logs of a large cluster easier to follow. "" removes the name.

The name can be up to 40 characters of printable ASCII, without spaces, ,, =, quotes or backslashes. The command has the same effect as CONFIG SET cluster-announce-human-nodename name. A name set this way stays after a restart unless the configuration file sets another one.

Simple string OK in RESP2 and RESP3, or one of these errors:

Case Error
More than 40 characters ERR Node name too long (max 40 characters)
A character that is not allowed ERR Invalid node name: it may not contain spaces, control characters, ',', '=', quotes or backslashes
Cluster mode is off ERR This instance has cluster support disabled
127.0.0.1:6379> CLUSTER SETNODENAME eu-west-primary-1
OK
127.0.0.1:6379> CLUSTER SETNODENAME "primary 1"
(error) ERR Invalid node name: it may not contain spaces, control characters, ',', '=', quotes or backslashes

HotKV-only subcommand. Redis 7.2 and Valkey 8 set the same name through cluster-announce-human-nodename only.

CLUSTER NODES, CLUSTER MYID

In a cluster: Monitoring a cluster