Help Center/ GaussDB/ User Guide/ Instance Modifications/ Configuring Read Replicas
Updated on 2025-08-11 GMT+08:00

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.

Figure 1 Adding read replicas for a 1 primary + 2 standby instance
Figure 2 Adding read replicas for a 1 primary + 1 standby + 1 log instance

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

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. On the Instances page, click the name of the target instance to go to the Basic Information page.
  5. In the Configuration area, click Add in the Read Replicas field.
  6. 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.

  7. Click Next, confirm the information, and click Submit.
  8. 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

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. On the Instances page, click the name of the target instance to go to the Basic Information page.
  5. In the Configuration area, click Delete in the Read Replicas field.
  6. Select the read replica to be deleted and click Next.
  7. Confirm the information and click Submit.
  8. 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

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. On the Instances page, click the name of the target instance to go to the Basic Information page.
  5. In the Configuration area, click Change in the Read Replicas field.
  6. On the displayed page, select the target read replica and new specifications, and click Next.
  7. Confirm the specifications and click Submit.
  8. 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.