All Products
Search
Document Center

PolarDB:Read-only instances

Last Updated:Nov 28, 2023

This topic describes how to create a read-only PolarDB-X instance for a primary PolarDB-X instance.

Background information

An X-Paxos-based architecture is used for the data nodes of a primary PolarDB-X instance. This architecture uses a three-replica mechanism to ensure high availability. Learners are added to the data nodes of a read-only PolarDB-X instance to ensure physical resource isolation. In addition, strong consistency in read-only queries are ensured based on Timestamp Oracle (TSO).

Usage notes

  • A primary instance and the read-only instances that are associated with the primary instance must be deployed in the same region and can be deployed in different zones within the region.
  • A read-only PolarDB-X instance must be associated with a primary PolarDB-X instance. If you create a database in a primary instance, the database is replicated to each read-only instance that is associated with the primary instance. If you delete a database in the primary PolarDB-X instance, the replicated database in each read-only PolarDB-X instance that is associated with the primary instance is also deleted.

Procedure

  1. Log on to the PolarDB for Xscale console.

  2. In the top navigation bar, select the region where the target instance is located.

  3. On the Instances page, click the PolarDB-X 2.0 tab.

  4. Find the instance that you want to manage, and click Read-only instance in the Operation column.
    You can also click the name of the instance to go to the instance details page. In the Read-only instance section on the right side of the page, click Add a read-only instance.
  5. On the page that appears, specify the parameters described in the following table.
    ParameterDescription
    Product TypeThe billing method of the read-only instance. Valid values: Subscription and Pay-As-You-Go.
    Note
    • The subscription billing method allows you to use resources only after you pay for them. This billing method is suitable for long-term and stable use in production environments. The unit price of the subscription billing method is lower than that of the pay-as-you-go billing method.
    • The pay-as-you-go billing method allows you to use resources before you pay for the resources. This billing method is suitable for testing and learning.
    • If you want to create a read-only instance that uses the pay-as-you-go billing method, make sure that the balance of your Alibaba Cloud account is at least USD 100.
    RegionThe region where the read-only instance is deployed. The read-only instance must be deployed in the same region as the primary instance. For example, if the primary instance is deployed in the China (Hangzhou) region, the Region parameter of the read-only instance is automatically set to China (Hangzhou). You do not need to change the parameter value.
    Primary Node ZoneThe zone in which the read-only instance is deployed. The read-only instance and the primary instance can be deployed in different zones.
    Network TypeThe network type of the read-only instance. The value of this parameter is automatically set to VPC and cannot be changed.
    VPCThe name of the VPC in which the read-only instance is deployed.
    vSwitchThe name of the vSwitch.
    MySQL VersionThe MySQL version of the read-only instance. The value of this parameter is automatically set to 5.7 and cannot be changed.
    Instance Model
    • Default: If you select the default model, the system uses the default configuration to deploy compute nodes and data nodes of each instance that you purchase. In this model, the ratio of the number of compute nodes to the number of data nodes of each instance is 1:1. After the instances are created, you can change the number and specifications of compute nodes and data nodes.
    • Custom: If you select the custom model, you can specify the number and specifications of compute nodes and data nodes based on your business requirements.
    Instance FamilyThe instance family of the read-only instance. Valid values: Dedicated and General-purpose. For more information, see Instance types.
    Node Specification The specifications for the nodes of the read-only instance. You are charged based on the specifications and number of nodes. You can configure this parameter to specify the number of CPU cores and memory size for the instance.
    Note Compute nodes and data nodes use the same node specifications.
    NodesThe number of nodes of the read-only instance. Default value: 2.
    Storage TypeThe storage type of the read-only instance. The value of this parameter is automatically set to Local SSD and cannot be changed.
    Storage CostThe storage capacity of each node is 3 TB by default. You do not need to select a storage capacity when you purchase the instance. You are charged per hour based on your actual usage.
    Validity PeriodThe subscription duration of the read-only instance.
    Note This parameter is valid only when the Product Type parameter is set to Subscription.
    QuantityThe number of read-only instances that you want to purchase.
  6. Click Buy Now.

  7. On the Confirm Order page, select PolarDB-X 2.0 (Subscription) Terms of Service and click Pay.

  8. After you complete the payment, it takes approximately 10 to 15 minutes to create the specified number of instances. Then, you can return to the Instance List page of the console to view the read-only instance that you created.