{
  "schema_version": 2,
  "id": "operate/rs/clusters/change-node-role",
  "title": "Change node roles",
  "url": "https://redis.io/docs/latest/operate/rs/clusters/change-node-role/",
  "summary": "Change node roles to demote the primary node to a secondary node or promote a secondary node to become the primary node.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-10-01T15:27:03+01:00",
  "page_type": "content",
  "content_hash": "bc1a34326e6ec433f61a5f1afa2111c455fae69a1c42a5d47af674dc2c4f134a",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "A Redis Software cluster contains a primary node, which coordinates cluster-wide management operations, and multiple secondary nodes. Nodes with either role can host database shards."
    },
    {
      "id": "demote-primary-node",
      "title": "Demote primary node",
      "role": "example",
      "text": "**Cluster Manager UI:**\n\nTo demote the primary node to a secondary node using the Cluster Manager UI:\n\n1. On the **Nodes** screen, click the **More actions** button (**&vellip;**) for the primary node you want to demote.\n\n    ![Click the more actions button for a node to access node actions.](https://redis.io/docs/latest/images/rs/screenshots/nodes/primary-node-more-actions.png)\n\n1. Select **Set as a secondary node** from the list.\n\n1. Select one of the options to determine the new primary node:\n\n    - **Automatically**: The cluster decides which node becomes the new primary node.\n\n    - **Choose specific node**: You can manually select which node becomes the new primary node.\n\n    ![The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.](https://redis.io/docs/latest/images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png)\n\n1. Click **Confirm**.\n\n**rladmin:**\n\nTo demote the primary node to a secondary node using `rladmin`:\n\n1. Identify the primary node's ID with [`rladmin cluster master`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/master):\n\n    [code example]\n\n1. Run [`rladmin node enslave`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/node/enslave#node-enslave) with the `demote_node` option:\n\n    [code example]\n\n    Replace `<primary-node-ID>` with the ID returned by `rladmin cluster master`."
    },
    {
      "id": "promote-secondary-node",
      "title": "Promote secondary node",
      "role": "content",
      "text": "**Cluster Manager UI:**\n\nTo promote a secondary node to become the primary node using the Cluster Manager UI:\n\n1. On the **Nodes** screen, click the **More actions** button (**&vellip;**) for the secondary node you want to promote.\n\n    ![Click the more actions button for a node to access node actions.](https://redis.io/docs/latest/images/rs/screenshots/nodes/secondary-nodes-more-actions.png)\n\n1. Select **Set as the primary node** from the list.\n\n1. Click **Confirm**.\n\n**rladmin:**\n\nTo promote a secondary node to become the primary node using `rladmin`:\n\n1. To find the IDs of secondary nodes, run [`rladmin status nodes`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/status#status-nodes):\n\n    [code example]\n\n    Nodes with the `slave` role are secondary nodes.\n\n1. Run [`rladmin cluster master set`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/master):\n\n    [code example]\n\n    Replace `<secondary-node-ID>` with the ID of the secondary node you want to promote.\n\n\n\nAfter this node becomes the primary node, all cluster management traffic is directed to it."
    }
  ],
  "examples": [
    {
      "id": "demote-primary-node-ex0",
      "language": "sh",
      "code": "$ rladmin cluster master\n    Node <primary-node-id> is the cluster master node",
      "section_id": "demote-primary-node"
    },
    {
      "id": "demote-primary-node-ex1",
      "language": "sh",
      "code": "rladmin node <primary-node-ID> enslave demote_node",
      "section_id": "demote-primary-node"
    },
    {
      "id": "promote-secondary-node-ex0",
      "language": "sh",
      "code": "$ rladmin status nodes\n    CLUSTER NODES:\n    NODE:ID     ROLE       ADDRESS          EXTERNAL_ADDRESS          HOSTNAME            SHARDS     CORES          FREE_RAM                 PROVISIONAL_RAM          VERSION        STATUS   \n    node:1      master     198.51.100.2                                 3d99db1fdf4b        4/100      6              14.74GB/19.54GB          10.73GB/16.02GB          7.22.0-250     OK       \n    *node:3     slave      198.51.100.4                                 b87cc06c830f        0/100      6              14.74GB/19.54GB          11.22GB/16.02GB          7.22.0-250     OK       \n    node:2      slave      198.51.100.3                                 fc7a3d332458        0/100      6              14.74GB/19.54GB          11.22GB/16.02GB          7.22.0-250     OK",
      "section_id": "promote-secondary-node"
    },
    {
      "id": "promote-secondary-node-ex1",
      "language": "sh",
      "code": "rladmin cluster master set <secondary-node-ID>",
      "section_id": "promote-secondary-node"
    }
  ]
}
