CLUSTER LINKS
CLUSTER LINKS
- Group
- Cluster
- Complexity
- O(N) where N is the number of links
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CLUSTER LINKS lists the cluster bus connections of the receiving node. For
each other node there can be two: the one this node opened to it (to) and
the one it opened to this node (from). Use it to find a node that is not
connected, or a link whose send buffer keeps growing (see
cluster-link-sendbuf-limit in Monitoring a cluster).
An incoming connection is listed once a message on it has said which node it comes from.
Return value
Section titled “Return value”An array with one entry per link. Each entry is a map in RESP3 and a flat array of field and value pairs in RESP2:
| Field | Type | Meaning |
|---|---|---|
direction |
Bulk string | to or from |
node |
Bulk string | The other node’s ID |
create-time |
Integer | When the link was created, Unix time in milliseconds |
events |
Bulk string | r while connected, rw while it also has data to send, w while connecting, empty without a connection |
send-buffer-allocated |
Integer | Bytes waiting to be sent on the link |
send-buffer-used |
Integer | Bytes waiting to be sent on the link |
With cluster mode off, the reply is an empty array.
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER LINKS1) 1) "direction" 2) "to" 3) "node" 4) "0e2a97d798979a2e3e5e7f940e2ac533fb36b69b" 5) "create-time" 6) (integer) 1790850423117 7) "events" 8) "r" 9) "send-buffer-allocated" 10) (integer) 0 11) "send-buffer-used" 12) (integer) 02) 1) "direction" 2) "from" 3) "node" 4) "0e2a97d798979a2e3e5e7f940e2ac533fb36b69b" 5) "create-time" 6) (integer) 1790850423121 7) "events" 8) "r" 9) "send-buffer-allocated" 10) (integer) 0 11) "send-buffer-used" 12) (integer) 0Compatibility
Section titled “Compatibility”Same fields as Redis 7 and Valkey 8, as a map in RESP3. In HotKV
send-buffer-allocated and send-buffer-used both report the bytes waiting
to be sent.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.