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 FORGET

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

CLUSTER FORGET removes a node from the receiving node’s list of known nodes. The forgotten node’s slots become unassigned here, its link is closed, and any slot migration to or from it ends. For the next 60 seconds (cluster-blacklist-ttl) this node ignores what it hears about the forgotten node, and it tells the other nodes to forget it too, so the node does not come back through gossip while you remove it everywhere.

To take a node out of a cluster, move its slots away first, then run CLUSTER FORGET for it on every remaining node within that minute. redis-cli --cluster del-node does this for you.

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

Case Error
No such node (and not forgotten in the last minute) ERR Unknown node <node-id>
The node’s own ID ERR I tried hard but I can't forget myself...
A replica’s own primary ERR Can't forget my master!
Cluster mode is off ERR This instance has cluster support disabled

Running CLUSTER FORGET again for a node that another node already made this one forget replies OK.

127.0.0.1:6379> CLUSTER FORGET 087d5d8db5c8df0f3152afcd17b94d5879f9107f
OK
127.0.0.1:6379> CLUSTER FORGET b4240bf759694b9ba85b3b5efd51785b86261c3e
(error) ERR I tried hard but I can't forget myself...

Same behaviour, 60-second ban and error strings as Redis 7 and Valkey 8.

CLUSTER MEET, CLUSTER NODES, CLUSTER RESET, Scaling a cluster