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 database is on v4.0 or above.
Instance status is Running.
Directions
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
|
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
|
| This API only supports the promotion of multi-AZ instance replica groups and single-AZ replicas. |
この記事はお役に立ちましたか?