CLUSTER-SLAVES(3valkey)
π CLUSTER-SLAVES β the valkey command manual, but make it make sense
okay bestie, sit down, hydrate, and let's talk about CLUSTER-SLAVES β a lil command from the Valkey Command Manual that goes and finds all the replica nodes chilling under one primary node. it's giving β¨inventory checkβ¨. it's also giving deprecated, but we'll get to that. π«Ά
β¨ NAME β¨
cluster-slaves β lists the replica nodes of a primary node. that's it, that's the whole job. π
πΈ SYNOPSIS πΈ
CLUSTER SLAVES node-id
one arg, one dream. you hand it a node-id, it hands you a list. no cap.
π¦ DESCRIPTION π¦
first things first, and this is important, so listen up: a note about the word slave used in this man page and in the command name β the Valkey project no longer uses the words βmasterβ and βslaveβ. please use the new command CLUSTER REPLICAS. the command CLUSTER SLAVES will continue to work for backward compatibility, so nothing's breaking, it's just... an old nickname we don't use anymore. π₯²
so, what does it actually do? the command provides a list of replica nodes replicating from the specified primary node. the list is provided in the same format used by CLUSTER NODES (please refer to its documentation for the specification of the format). so if you already know that format, you're set β it's the same vibe, just filtered down to the replicas of one primary. π
the command will fail if the specified node is not known or if it is not a primary according to the node table of the node receiving the command. so like, don't ask it about a replica and expect replicas back. it's not gonna do that. π
and now the caveat, because there's always one: note that if a replica is added, moved, or removed from a given primary node, and we ask CLUSTER SLAVES to a node that has not yet received the configuration update, it may show stale information. however eventually (in a matter of seconds if there are no network partitions) all the nodes will agree about the set of nodes associated with a given primary. so it's not wrong forever, it's just wrong for a sec. gossip takes a minute to travel, bestie. π«§
π REPLY π
valkey-protocol(7) Array reply: a list of replica nodes replicating from the specified primary node provided in the same format used by CLUSTER NODES.
an array. of replica nodes. in the CLUSTER NODES format. iconic behavior, honestly. π
β COMPLEXITY β
O(N) where N is the number of replicas.
linear, babes. more replicas = more walking. no magic shortcuts here. πΆββοΈ
π ACL CATEGORIES π
@admin @dangerous @slow
yeah she's in the dangerous club and she's slow. respect her for it. π
π§ HISTORY π§
- Available since:
3.0.0
an elder. been here since day one-ish. π
π NOTES π
This command is deprecated (since5.0.0) and replaced byCLUSTER REPLICAS.
fr fr, if you're writing new code, use CLUSTER REPLICAS. CLUSTER SLAVES still works for backward compatibility, but it's the old name and the docs are literally telling you to move on. we love growth. π¦
πΈ SEE ALSO πΈ
go read these too, bestie, they're all part of the same friend group:
asking(3valkey)cluster(3valkey)cluster-addslots(3valkey)cluster-addslotsrange(3valkey)cluster-bumpepoch(3valkey)cluster-cancelslotmigrations(3valkey)cluster-count-failure-reports(3valkey)cluster-countkeysinslot(3valkey)cluster-delslots(3valkey)cluster-delslotsrange(3valkey)cluster-failover(3valkey)cluster-flushslots(3valkey)cluster-forget(3valkey)cluster-getkeysinslot(3valkey)cluster-getslotmigrations(3valkey)cluster-help(3valkey)cluster-info(3valkey)cluster-keyslot(3valkey)cluster-links(3valkey)cluster-meet(3valkey)cluster-migrateslots(3valkey)cluster-myid(3valkey)cluster-myshardid(3valkey)cluster-nodes(3valkey)cluster-replicas(3valkey)cluster-replicate(3valkey)cluster-reset(3valkey)cluster-saveconfig(3valkey)cluster-set-config-epoch(3valkey)cluster-setslot(3valkey)cluster-shards(3valkey)cluster-slot-stats(3valkey)cluster-slots(3valkey)cluster-syncslots(3valkey)readonly(3valkey)readwrite(3valkey)
okay that's the whole page, you ate it, congrats. π
this was Valkey version 9.0.0, dated 2025-10-21, brought to you by the CLUSTER-SLAVES(3valkey) page herself. go use CLUSTER REPLICAS and make her proud. π«Άβ¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms