tencent cloud

Feedback

Promotion of Replicas

Last updated: 2024-03-13 10:03:03
    TencentDB for Redis allows you to promote a replica to the primary node/group based on your business deployment requirements. The principle of promoting a replica node to primary node (group) in TencentDB for Redis instance is to execute cluster failover command in the cluster to switch the role of the primary node to the secondary node.

    Standard Architecture

    In a standard architecture instance, an instance can only have one primary node. You can promote a specified node to primary node using promoting replica node to primary node. In a multi-availability zone deployed standard architecture instance, after switching the primary node, your visit may cross availability zones, leading to increased access latency and reduced QPS.

    Cluster Architecture

    For a cluster architecture instance with multiple replicas for a single shard, TencentDB for Redis divides the primary node and multiple replicas into different node groups for easier node management. Each node group has a node group name. For a multi-availability zone deployed cluster architecture instance, you can promote all nodes in a specified node group to a primary node group. After some of the primary nodes of the shards in the node group have switched to other node groups, you can revert all primary nodes back to the specified node group using promoting replica node to primary node. The execution process is as follows:
    1. Promote all Nodes in the Node Group to Primary Nodes.
    2. Mark this node group as the primary node group. After the failure recovery, the system will automatically promote the replicas in the group to primary nodes.
    3. Mark this availability zone as the primary availability zone.

    Notes

    Service will have a brief access jitter during the promotion process. The jitter time is within a few seconds to 3 minutes. During the switching process, blocking commands such as BLPOP, BRPOP, BRPOPLPUSH, SUBSCRIBE will fail once or multiple times.
    During the replica promotion process, the instance will become read-only for less than one minute and a momentary disconnection will occur in your service; the execution process may fail, but retrying usually results in successful execution.

    Prerequisites

    The instance has been Configuring Multi-AZ Deployment.
    The database is on v4.0 or above.
    Instance status is Running.

    Directions

    1. Log in to the TencentDB for Redis console.
    2. Above the Instance List on the right, select the region.
    3. In the Instance List, locate the Multi-AZ deployable instance that requires replica promotion.
    4. Click the Instance ID to enter the Instance Details page.
    5. On the Instance Details page, click the Node Management tab, click on the Promote Replica to Master at the top right of the page.
    
    6. In the Promote to Master Node/AZ window, configure the new primary node and set the switch time, as shown in the figure below.
    Standard Architecture
    
    Cluster architecture
    
    Interface Parameter
    Parameter Meaning
    Configuration Method
    Instance ID
    Current multi-availability zone instance ID awaiting replica promotion.
    Confirm the correctness of the instance.
    Memory Configuration
    Current instance memory configuration specification.
    Confirm the specification information of the instance.
    Original Master Node ID
    The standard architecture displays the current primary node's ID.
    Confirm the current primary node's ID information.
    New Master Node ID
    The standard architecture shows this parameter, and the configuration needs to be switched to the replica node of the primary node.
    Please select the replica node to be promoted to primary node from the drop-down list.
    Original Master Node Group
    The cluster architecture shows this parameter, displaying the current name of the primary node set.
    Confirm the current primary node set name.
    New Master Node Group
    The cluster architecture shows this parameter, and the configuration needs to be switched to the replica node set of the primary node set.
    Please select the replica node set to be promoted to primary node set from the drop-down list.
    Switch Time
    Select the switch time period for promoting replica to primary.
    Switch Now: The switch task will be initiated immediately.
    Switch in Maintenance Time: This indicates initiating a switch task in the maintenance window. For related introduction and configuration of the maintenance window, see Setting Maintenance Time.
    7. After the configuration is complete, confirm that there are no errors, and click OK.

    Related APIs

    API Name
    Description
    This API only supports the promotion of multi-AZ instance replica groups and single-AZ replicas.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support