TencentDB for SQL Server 2017/2019/2022 instances with Always On Dual-Node Cloud Disk architecture support the replica node read-only feature. Enabling the replica node read-only allows access to the replica node through its unique read-only address reserved for the replica node, sharing the read requests of the primary node. This can effectively save you the cost of an additional read-only instance. You can enable or disable the replica node read-only feature through the console, as well as modify the network settings of the read-only address for the replica node.
Prerequisites
The architecture and version of the primary instance are: TencentDB for SQL Server 2017/2019/2022 Always On Dual-Node.
The storage type of the primary instance is: Enhanced SSD / Balanced SSD.
The primary instance is running.
Note:
You can view whether the above information meets the requirements in the instance list.
The primary and replica instances must be synchronized properly.
Note:
If the instance is new, it is necessary to wait until the AG group of both nodes is established and the primary node and replica node are in normal synchronization state before you enable the replica node read-only feature.
Feature Limits
The enabling of replica node read-only feature is affected by the data synchronization between the primary and replica instances. When the data is not synchronized, the feature cannot be enabled.
The read-only mode of the replica node operates as an independent instance state and can only be accessed through its unique read-only address reserved for the replica node. It is unrelated to RO instances and the RO groups they are in; therefore, the replica node cannot join an RO group to participate in weight setting.
After replica node read-only is enabled, it supports access only via private network addresses, and enabling public network access on the replica node is not supported.
After replica node read-only is enabled, the replica node will not be removed if the replica node crashes or experiences a delay timeout. Accessing the replica node through the read-only address may result in data delays at this time. Once the node recovers, data synchronization will return to normal state.
After replica node read-only is enabled, if the instance undergoes a migration or switch across availability zones, the read-only replica node may experience a brief disconnection. Please ensure that your business has the reconnection mechanism.
After replica node read-only is enabled, if the instance undergoes a migration or configuration switch, the read-only replica node may experience a brief disconnection. Please ensure that your business has the reconnection mechanism.
After replica node read-only is enabled, if the instance undergoes HA switch, the read-only replica node may experience a brief disconnection or prolonged interrupts. Please ensure that your business has the reconnection mechanism.
Replica Node Read-Only Architecture Diagram
Enabling Replica Node Read-only
1. Log in to the SQL Server Console. Under the instance list, click the Instance ID or the Manage option in the Operation column to enter the instance details page. 2. In the instance information on the right side of the Instance Details page, click Enable Replica Node Read-Only next to the replica node, or click the + icon in the replica node read-only address area of the topology diagram.
3. On the page where replica node read-only is enabled, complete the following configuration and click OK.
|
Select Network | Select VPC network. The VPC, Subnet, and Read/Write address are the same as those of the primary node by default. You can also manually select them. After confirming the VPC, only hosts corresponding to the VPC can access the database. |
Read-only Address | Auto-Assign IP: The system automatically assigns an IP address. Specify IP: You can manually define the Subnet IP address. |
Note:
The replica node read-only feature is enabled for the primary node. When the replica node switches, the read-only address will be bound to the new replica node.
4. Once the instance status returns to Running, the read-only setting for the replica node will be completed.
Changing the Replica Node Read-only Network
After the replica node read-only is enabled, if you want to change the network of the replica node read-only address, please see Changing Network. Disabling Replica Node Read-only
Note:
After the replica node read-only feature is disabled, the read-only address will be closed, and you will not be able to access the replica node via the read-only address. Additionally, the IP address will be released. If you want to disable the replica node read-only feature, please ensure your application system does not access the network through the read-only address to avoid losses.
1. Log in to the SQL Server console. In the instances list, click the Instance ID or the Manage option in the Operation column to enter the instance details page. 2. In the instance information on the right side of the Instance Details page, click Disable Replica Node Read-Only next to the replica node.
3. In the pop-up window, click OK.
FAQs
After the replica node read-only feature is enabled, what impact will be on the application system's access to the replica node read-only address if the primary node or the replica node fails?
After the replica node read-only feature is enabled, if the primary node fails and triggers a Primary-Replica Switch, access via the read-only address will not be provided until the original primary node recovers to prevent the original replica node from being overwhelmed by a sudden surge in traffic. Consequently, the corresponding application system temporarily cannot access the data of the replica node, until the original primary node is recovered and switched to the new replica node, read-only access to the replica node can be resumed;
After the replica node read-only feature is enabled, if the replica node fails, the replica node will not provide services temporarily, and the application system cannot access the instance through the replica node read-only address until the replica node is recovered.
Was this page helpful?