tencent cloud

Feedback

Switch Between Read-Write Nodes and Read-Only Nodes

Last updated: 2024-05-14 14:12:42
    TencentDB for MySQL Cluster Edition instances support switching between read-write nodes and read-only nodes, i.e., primary/replica switch. In the event of an instance failure, the system will automatically switch a read-only node to a read-write node to ensure system availability and data integrity. This automatic switching is triggered under special circumstances such as failures. In addition to automatic switching, you can also perform manual switching through the console. This document introduces the read-write node switching for the Cluster Edition. For information on primary/replica switch for two-node and three-node instances, see Primary/Replica Switch.

    Background

    In enterprise-level applications, the database is usually a critical part of the business system. Any database failure or downtime can have a severe impact on business operations. Therefore, to ensure system availability and data integrity, it is necessary to adopt a high availability solution like primary/replica switch. This solution allows for a quick switch from a read-write node to a read-only node within the cluster in the event of a failure, preventing business interruptions and data loss.

    Prerequisites

    For instances of the TencentDB for MySQL Cluster Edition, see Purchase Methods for creation.
    The instance is running, with no other tasks in progress.

    Notes

    During the read-write node switching process, there will be brief disconnections lasting a few seconds. It is recommended to perform the switching operation during off-peak business hours and ensure that your application has a reconnection mechanism.
    Once the read-write node has been switched, the instance connection address remains unchanged. The original read-write node will serve as a read-only node, and applications will automatically connect to the new read-write node (which was previously a read-only node).

    Directions

    1. Log in to the MySQL Console. In the instance list, click Instance ID or Manage in the Operation column to enter the Instance Details page.
    2. After going to Instance Details > Availability Information > Read-Write Node Availability Zone, click Read-Write Node Switch.
    Note:
    You can also directly find the target read-only instance under Instance Details > Instance Architecture Diagram, and click the Switch Icon on the topology chart to enter the Read-Write Node Switch popup.
    3. In the pop-up, select the switch time, specify the node, check the notes, and then click OK.
    During Maintenance Time: The read-write node switch will be carried out during the maintenance time. To modify the instance maintenance time, see Setting Instance Maintenance Time.
    Upon Upgrade Completion: After the settings are completed, you can immediately perform read-write node switching.
    4. After the instance status changes from Primary/Replica Switching to Running, the switch is completed.
    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