CLUSTER-LINKS(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

okay bestie, so this one is a manual page from the valkey command manual, and it's all about CLUSTER LINKS, which is literally the gossip-girl of your cluster β€” it tells you about every single TCP link going to and from your node. πŸ¦‹


✨ NAME ✨

cluster-links β€” Returns a list of all TCP links to and from peer nodes. πŸ’«


πŸŽ€ SYNOPSIS πŸŽ€

CLUSTER LINKS

🌸 DESCRIPTION 🌸

So here's the vibe. Every node in a Valkey Cluster keeps a pair of long-lived TCP links going with each of its peers:

  • one for sending outbound messages towards the peer
  • one for receiving inbound messages from the peer

It's giving pen pals, but make it infrastructure. πŸ’–

CLUSTER LINKS outputs the info on all of those peer links as an array, where each element of the array is a map that contains attributes and their values for one individual link. no cap, that's the whole thing.


πŸ‘‘ REPLY πŸ‘‘

RESP2

valkey-protocol(7) Array reply: an array of maps, where each map contains various attributes and their values of a cluster link.

RESP3

valkey-protocol(7) Array reply: an array of valkey-protocol(7) Map reply, where each map contains various attributes and their values of a cluster link.


πŸ”₯ COMPLEXITY πŸ”₯

O(N) where N is the total number of Cluster nodes.


⭐ ACL CATEGORIES ⭐

@slow


πŸ¦‹ HISTORY πŸ¦‹

  • Available since: 7.0.0

πŸ’œ EXAMPLES πŸ’œ

The following is an example output:

> CLUSTER LINKS
1)  1) "direction"
    2) "to"
    3) "node"
    4) "8149d745fa551e40764fecaf7cab9dbdf6b659ae"
    5) "create-time"
    6) (integer) 1639442739375
    7) "events"
    8) "rw"
    9) "send-buffer-allocated"
   10) (integer) 4512
   11) "send-buffer-used"
   12) (integer) 0
2)  1) "direction"
    2) "from"
    3) "node"
    4) "8149d745fa551e40764fecaf7cab9dbdf6b659ae"
    5) "create-time"
    6) (integer) 1639442739411
    7) "events"
    8) "r"
    9) "send-buffer-allocated"
   10) (integer) 0
   11) "send-buffer-used"
   12) (integer) 0

Each map is composed of the following attributes of the corresponding cluster link and their values:

  1. direction: This link is established by the local node to the peer, or accepted by the local node from the peer.
  2. node: The node id of the peer.
  3. create-time: Creation time of the link. (In the case of a to link, this is the time when the TCP link is created by the local node, not the time when it is actually established.)
  4. events: Events currently registered for the link. r means readable event, w means writable event.
  5. send-buffer-allocated: Allocated size of the link's send buffer, which is used to buffer outgoing messages toward the peer.
  6. send-buffer-used: Size of the portion of the link's send buffer that is currently holding data(messages).

🌈 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-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)


aaaaand that's a wrap, bestie 🫢 this page is from version 9.0.0, dated 2025-10-21, and it slayed every single time. go read your cluster's links, you icon. πŸ’…βœ¨
πŸ“¦ where this page comes from