CLUSTER-REPLICAS(3valkey)
π CLUSTER-REPLICAS π
okay bestie, this is the valkey command manual, section 3valkey, and today's main character is cluster-replicas. it's giving "who's in whose group chat" energy. let's go π
β¨ NAME β¨
cluster-replicas β lists the replica nodes of a primary node. yes, that's it, that's the whole job, and it does it flawlessly. π
πΈ SYNOPSIS πΈ
CLUSTER REPLICAS node-id
π¦ DESCRIPTION π¦
so basically, this command hands you a list of all the replica nodes that are replicating from the primary node you specified. that's it. that's the tea. π΅
the list comes back in the exact same format used by valkey-cluster-nodes(7)'s CLUSTER NODES β so if you need the full spec of that format, go read that page, because this one is not about to re-explain it, it's just borrowing the fit. β¨
now, the vibe check: the command will fail if the node you named is not known, OR if it's not a primary according to the node table of whatever node is receiving the command. so if you point it at a replica and ask "who are your replicas", bestie, that's not how this works π
β οΈ important lowkey warning: if a replica gets added, moved, or removed from a given primary node, and you ask CLUSTER REPLICAS on a node that hasn't received the configuration update yet, it may show you stale information. it's not lying to you, it just hasn't heard the news yet π
but β and this is the slay part β 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 the drama always resolves. π
π¬ 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. it's a little array of besties, essentially π«Ά
π₯ COMPLEXITY π₯
O(N) where N is the number of replicas. not bad, not bad at all π
π ACL CATEGORIES π
@admin @dangerous @slow
bestie these are the three little badges it wears.@adminmeans it's admin-tier,@dangerousmeans treat it with respect,@slowmeans don't spam it in a hot loop unless you want to be the problem π
β HISTORY β
- Available since:
5.0.0
so it's been here since 5.0.0, a true veteran. iconic behavior π
π SEE ALSO π
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-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 that π«Ά this was valkey manual version 9.0.0, dated 2025-10-21, and you're officially a cluster-replicas understander now. periodt. πβ¨π
π¦ 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