Configuring Read Replicas
Scenarios
In a centralized instance, a surge in read requests can consume excessive compute resources. This heavy load may interfere with transaction log (Xlog) replay on standby nodes, leading to increased replication lag between primary and standby nodes. If the primary node fails, the accumulated Xlogs may delay failover. To mitigate this, you can add read replicas to offload and distribute read workloads.
You can also delete read replicas or adjust their specifications to better match changing read demands.
Technical Details
The primary node handles both read and write operations, while standby and log nodes synchronize Xlogs from it. When read traffic increases, high compute resource usage can hinder Xlog replay on standby nodes. Adding read replicas helps offload read requests. They synchronize Xlogs from standby nodes, reducing the primary node's workload and maintaining stable Xlog replay.


Precautions
- Read replica-related operations are supported for centralized (1 primary + 2 standby) instances of V2.0-2.7.1 or later. For details about how to view the instance version, see Checking the DB Engine Version.
- Read replica-related operations are supported for centralized (1 primary + 1 standby + 1 log) instances of V2.0-8.0.0 or later. For details about how to view the instance version, see Checking the DB Engine Version.
- After snapshot-based backup is enabled, read replicas cannot be added.
- Adding read replicas temporarily stops backups. Once the replicas are ready, the system re-enables backups and runs a full backup automatically.
Billing
Billing Mode |
Operation |
Impact on Fees |
---|---|---|
Pay-per-use |
Adding a read replica |
Added read replicas are billed by the hour. |
Deleting a read replica |
Deleted read replicas are no longer billed. |
Adding a Read Replica
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the Configuration area, click Add in the Read Replicas field.
- Select the specifications and parameter template of the read replica, and click Add Read Replica.
Figure 3 Adding a read replica
Table 1 Parameter description Parameter
Description
AZ
An AZ is a physical region where resources have independent power supply and networks. AZs are physically isolated but interconnected through an internal network.
Select either one or three AZs.
New Instance Specifications
CPU and memory specifications of the instance. Different instance specifications have different numbers of database connections.
For details, see Instance Specifications.
Read Replica
A maximum of three read replicas can be added to a single instance.
- Click Next, confirm the information, and click Submit.
- Check the result of adding a read replica.
On the Instances page, the instance status is Creating read replicas. After the instance status becomes Available, click the instance name. On the Basic Information page, check the number of read replicas.
Deleting a Read Replica
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the Configuration area, click Delete in the Read Replicas field.
- Select the read replica to be deleted and click Next.
- Confirm the information and click Submit.
- Check the result of deleting a read replica.
On the Instances page, the instance status is Deleting a read replica. After the instance status becomes Available, click the instance name. On the Basic Information page, check the number of read replicas.
Changing the Specifications of Read Replicas
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the Configuration area, click Change in the Read Replicas field.
- On the displayed page, select the target read replica and new specifications, and click Next.
- Confirm the specifications and click Submit.
- Check the specification change result.
After the task is submitted, click Go to Instance List. On the Instances page, the instance status is Changing instance specifications. After a few minutes, check the new instance specifications on the Basic Information page.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot