{
  "schema_version": 2,
  "id": "commands/cluster-replicate",
  "title": "CLUSTER REPLICATE",
  "url": "https://redis.io/docs/latest/commands/cluster-replicate/",
  "summary": "Configure a node as replica of a master node.",
  "since": "3.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-15T06:26:34-07:00",
  "page_type": "content",
  "content_hash": "1abf0bb0a17fe526e823c4c58549cd9e48c7d66b50ced58a0b5c0c6073dd21d6",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The command reconfigures a node as a replica of the specified master.\nIf the node receiving the command is an *empty master*, as a side effect\nof the command, the node role is changed from master to replica.\n\nOnce a node is turned into the replica of another master node, there is no need\nto inform the other cluster nodes about the change: heartbeat packets exchanged\nbetween nodes will propagate the new configuration automatically.\n\nA replica will always accept the command, assuming that:\n\n1. The specified node ID exists in its nodes table.\n2. The specified node ID does not identify the instance we are sending the command to.\n3. The specified node ID is a master.\n\nIf the node receiving the command is not already a replica, but is a master,\nthe command will only succeed, and the node will be converted into a replica,\nonly if the following additional conditions are met:\n\n1. The node is not serving any hash slots.\n2. The node is empty, no keys are stored at all in the key space.\n\nIf the command succeeds the new replica will immediately try to contact its master in order to replicate from it."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>node-id</code></summary>\n\nThe ID of the master node that the current node should replicate.\n\n</details>"
    },
    {
      "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[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned."
    }
  ],
  "examples": []
}
