Creating a Read Replica

Scenarios

Read replicas are used to enhance the read capabilities and reduce the load on primary DB instances.

You can create read replicas as needed.

Note

A maximum of five read replicas can be created for a primary DB instance.

The specifications of read replicas must be greater than or equal to the specifications of the current primary DB instance.

Procedure

  1. Log in to the management console.

  2. Click image1 in the upper left corner and select a region and a project.

  3. Click Service List. Under Database, click Relational Database Service. The RDS console is displayed.

  4. On the Instances page, locate the target DB instance and click Create Read Replica in the Operation column.

    Alternatively, click the target DB instance. In the DB instance topology, click image2 under the primary DB instance to create read replicas.

  5. On the displayed page, configure information about the DB instance and click Next.

    Table 1 Basic information

    Parameter

    Description

    Region

    By default, read replicas are in the same region as the primary DB instance.

    DB Instance Name

    Must start with a letter and consist of 4 to 64 characters. It can contain only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_).

    DB Engine

    Same as the DB engine of the primary DB instance by default and cannot be changed.

    DB Engine Version

    Same as the DB engine version of the primary DB instance by default and cannot be changed.

    AZ

    RDS allows you to deploy primary DB instances and read replicas in a single AZ or across AZs to improve reliability.

    Table 2 Instance specifications

    Parameter

    Description

    Instance Class

    Refers to the CPU and memory of a DB instance. Different instance classes have different numbers of database connections and maximum IOPS.

    For details about instance classes, see section DB Instance Classes.

    After a DB instance is created, you can change its CPU and memory. For details, see section Changing a DB Instance Class.

    Storage Type

    Determines the DB instance read/write speed. The higher the maximum throughput is, the higher the DB instance read/write speed can be.

    • Common I/O: uses the SATA disk type that supports a maximum throughput of 90 MB/s.

    • Ultra-high I/O: uses the SSD disk type that supports a maximum throughput of 350 MB/s.

    Storage Space

    Contains the file system overhead required for inode, reserved block, and database operation.

    By default, storage space of a read replica is the same as that of the primary DB instance.

    Disk Encryption

    • Disable: indicates the encryption function is disabled.

    • Enable: indicates the encryption function is enabled. Security is improved but system performance is affected.

      Key Name: indicates the tenant key. You can select an existing key or create a new one.

      Note

      • Once the DB instance is created, you cannot modify the disk encryption status or change the key. The backup data stored in OBS is not encrypted.

      • After an RDS DB instance is created, do not disable or delete a key that is currently in use. Otherwise, RDS will be unavailable and data cannot be restored.

      • For details about how to create a key, see the "Creating a CMK" section in the Key Management Service User Guide.

    Table 3 Network

    Parameter

    Description

    VPC

    Same as the primary DB instance's VPC.

    Subnet

    Same as the primary DB instance's subnet. A floating IP address is automatically assigned when you create a read replica. You can also enter an unused floating IP address in the subnet CIDR block. After the read replica is created, you can change the floating IP address.

    Security Group

    Same as the primary DB instance's VPC.

  6. Confirm specifications.

    • If you need to modify your settings, click Previous.

    • If you do not need to modify your settings, click Submit.

  7. After a read replica has been created, you can view and manage it on the Instances page by clicking image3 on the left of the DB instance to which it belongs.

    Alternatively, click the target DB instance. In the DB instance topology, click the target read replica. You can view and manage it in the displayed pane.

Follow-up Operations

Managing a Read Replica