Help Center/ Distributed Cache Service/ User Guide/ Managing Instances/ Managing DCS Instance Shards and Replicas
Updated on 2024-10-17 GMT+08:00

Managing DCS Instance Shards and Replicas

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 for a DCS Instance.
  • On the Node Management page: The failover priority can be edited for master/standby instances with multiple replicas. The IP address of a replica can be removed (only when multiple replicas exist). The information returned when an instance is accessed at read-only domain names excludes the removed IP addresses.
  • 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 adjust shards of a cluster instance by referring to Modifying DCS Instance Specifications.

Managing DCS Instance Shards and Replicas

  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.

    All shards of the instance are displayed by Shard Name, Shard ID, and Replicas of a shard.

  6. Click to display all replicas of a shard by Replica IP Address, Node ID, Replica ID, Status, Role, and AZ.

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

    You can also perform the following operations on replicas:

    • 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.

      For Proxy Cluster instance, the proxy information (IP address, node ID, and name) can be viewed on the Node Management > Proxies page. 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.