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 that features high availability and three replicas is used for the data nodes of a primary PolarDB-X instance. We add learners to the data nodes of a read-only PolarDB-X instance to ensure physical resource isolation. We ensure strong consistency in read-only queries for the data nodes of the read-only PolarDB-X instance based on Timestamp Oracle (TSO).

Additional considerations

  • 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 deleted.

Procedure

  1. Log on to the PolarDB-X console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. On the Instance List 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 in the right corner of the page, click Add a read-only instance.
    456789
  5. On the page that appears, configure the following parameters.
    Parameter Description
    Product type The billing method of the read-only instance. Valid values: Monthly package and The pay-as-you-go billing method.
    Note
    • The subscription billing method is a pre-payment plan. This billing method is suitable for long-term use in stable 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 is a post-payment plan. This billing method is suitable for scenarios such as 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 greater than or equal to USD 100.
    Region The 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 China (Hangzhou), the region parameter of the read-only instance is automatically set to China (Hangzhou). You do not need to modify the parameter value.
    Availability Zone The zone in which the read-only instance is deployed. The read-only instance can be deployed in a different zone to the primary instance.
    Network type The network type of the read-only instance. This parameter is automatically set to VPC. You cannot change the network type.
    Virtual private cloud (VPC) The name of the VPC in which the read-only instance is deployed.
    vSwitch The name of the vSwitch.
    MySQL version The MySQL version of the read-only instance. This parameter is automatically set to 5.7. You cannot change the MySQL version.
    Node Class The specification for the nodes of the read-only instance. You are charged based on the number and specification of nodes. You can configure this parameter to specify the memory and CPU cores of the nodes.
    Note Compute and data nodes use the same node specification.
    NodeCount The number of the nodes of the read-only instance. Default value: 2.
    Storage type The storage type of the read-only instance. This parameter is automatically set to Local SSD disk. You cannot change the storage type.
    Storage cost By default, the storage capacity of each node is 3 TB. You do not need to select a storage capacity. You are charged based on the number of hours for which you use the nodes.
    Subscription duration The subscription duration of the read-only instance.
    Note This parameter is valid only if the product type parameter is set to Monthly package.
    Instance number The number of read-only instances that you want to purchase.
  6. Select PolarDB-X 2.0 (Subscription) Terms of Service and click Buy Now.
  7. On the Purchase page, confirm the unpaid order and the payment method, and click Purchase.
  8. After you complete the payment, the read-only instance or instances are created within 10 to 15 minutes. Then, you can return to the Instance List page of the console to view the read-only instance or instances that are created.