Updated on 2024-01-12 GMT+08:00

Managing Nodes

This section describes how to query the shards and replicas of a master/standby, cluster, or read/write splitting DCS Redis instance, and how to manually promote a replica to master.

  • By default, a master/standby or read/write splitting instance has only one shard with one master and one replica. You can view the sharding information on the Node Management page. To manually switch the master and replica roles, see Performing a Master/Standby Switchover.
  • If a master/standby instance has multiple replicas, you can remove the IP address from a replica and set the failover priority on the Node Management page.
  • A Proxy Cluster or Redis Cluster instance has multiple shards. Each shard has one master and one replica. On the Node Management page, you can view the sharding information and manually switch the master and replica roles.
    • This feature is called "Node Management" in some regions and "Shard and Replica" in the other regions. Refer to the console for the actual name.
    • This feature is supported by DCS Redis 4.0 instances and later.
    • For single-node DCS instances, this feature is supported only in regions where Node Management is used.
    • For details about the number of shards for different instance specifications, see Redis Cluster and Proxy Cluster Redis.
    • You can add shards to a cluster instance by referring to Modifying Specifications.

Procedure

  1. Log in to the DCS console.
  2. Click in the upper left corner of the management console and select the region where your instance is located.
  3. In the navigation pane, choose Cache Manager.
  4. Click an instance.
  5. Click Node Management or Shards and Replicas.

    The page displays all shards in the instance and the list of replicas of each shard.

  6. Click to show all replicas of a shard, as shown in the following figure.

    Figure 1 Node management (cluster instance)
    Figure 2 Node management (master/standby instance)
    Figure 3 Node management (single-node instance)
    • Cluster

      To promote a replica to the master role, expand a shard and click Promote to Master in the row that contains a node whose Role is Replica.

      You can view the proxy information of a Proxy Cluster instance on the Proxies tab page only in regions where Node Management is used. Other types of instances do not have the Proxies tab page.

    • Master/Standby or read/write splitting
      1. If a master/standby instance has multiple replicas, click Remove IP Address in the row containing a read-only replica. After a replica IP address is removed, the read-only domain name will no longer be resolved to the replica IP address.

        If a master/standby instance has only one replica, its IP address cannot be removed.

      2. If a master/standby or read/write splitting instance has multiple replicas, click in the Failover Priority column to change the priority of the replica to be promoted to master.

        If the master fails, the replica with the smallest priority number is automatically promoted to master. For multiple replicas that have the same priority, a selection process will be performed. 0 indicates that the replica will never be automatically promoted, 1 indicates the highest priority, and 100 indicates the lowest priority.

    • Single-node

      A single-node instance has only one replica. You can view its node information on the Node Management page.