{
  "schema_version": 2,
  "id": "commands/cluster-links",
  "title": "CLUSTER LINKS",
  "url": "https://redis.io/docs/latest/commands/cluster-links/",
  "summary": "Returns a list of all TCP links to and from peer nodes.",
  "since": "7.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-01-30T12:29:26-06:00",
  "page_type": "content",
  "content_hash": "208e0e57f5fa87751a869a14a215245b4792c5c4bf5680717239827f9db8f0d9",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Each node in a Redis Cluster maintains a pair of long-lived TCP link with each peer in the cluster: One for sending outbound messages towards the peer and one for receiving inbound messages from the peer.\n\n`CLUSTER LINKS` outputs information of all such peer links as an array, where each array element is a map that contains attributes and their values for an individual link."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "The following is an example output:\n\n[code example]\n\nEach map is composed of the following attributes of the corresponding cluster link and their values:\n\n1. `direction`: This link is established by the local node `to` the peer, or accepted by the local node `from` the peer.\n2. `node`: The node id of the peer.\n3. `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.)\n4. `events`: Events currently registered for the link. `r` means readable event, `w` means writable event.\n5. `send-buffer-allocated`: Allocated size of the link's send buffer, which is used to buffer outgoing messages toward the peer.\n6. `send-buffer-used`: Size of the portion of the link's send buffer that is currently holding data(messages)."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): an array of maps where each map contains various attributes and their values of a cluster link.\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Map reply](../../develop/reference/protocol-spec#maps) where each map contains various attributes and their values of a cluster link."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "> CLUSTER LINKS\n1)  1) \"direction\"\n    2) \"to\"\n    3) \"node\"\n    4) \"8149d745fa551e40764fecaf7cab9dbdf6b659ae\"\n    5) \"create-time\"\n    6) (integer) 1639442739375\n    7) \"events\"\n    8) \"rw\"\n    9) \"send-buffer-allocated\"\n   10) (integer) 4512\n   11) \"send-buffer-used\"\n   12) (integer) 0\n2)  1) \"direction\"\n    2) \"from\"\n    3) \"node\"\n    4) \"8149d745fa551e40764fecaf7cab9dbdf6b659ae\"\n    5) \"create-time\"\n    6) (integer) 1639442739411\n    7) \"events\"\n    8) \"r\"\n    9) \"send-buffer-allocated\"\n   10) (integer) 0\n   11) \"send-buffer-used\"\n   12) (integer) 0",
      "section_id": "examples"
    }
  ]
}
