Offload read traffic from your primary PolarDB-X instance by creating read-only instances. Read-only instances provide physical resource isolation from the primary instance while maintaining strong data consistency.
How it works
PolarDB-X data nodes use an X-Paxos-based architecture with a three-replica mechanism for high availability. A read-only instance adds Learners (non-voting replicas in the X-Paxos protocol) to the data nodes. This design isolates resources between the primary and read-only instances. Read-only queries maintain strong consistency through the timestamp oracle (TSO).
A primary instance and its read-only instances must be in the same region but can be in different zones. When you create or delete a database in the primary instance, the change is automatically replicated to all associated read-only instances.
Create a read-only instance
-
Log on to the PolarDB-X console.
-
In the top navigation bar, select the region where the instance is deployed.
-
On the Instances page, click the PolarDB-X 2.0 tab.
-
Find the target instance. In the Actions column, click the
icon and then click Read-only Instance.Alternatively, click the instance name to go to the Basic Information page. In the Read-only Instances section on the right side, click Create Read-only Instance.
-
On the buy page, configure the following parameters.
Parameter
Description
Product Type
Select a billing method: Subscription or Pay-as-you-go.
- Subscription: You pay upfront at purchase.
- Pay-as-you-go: You are billed hourly based on resource usage.NotePay-as-you-go requires a minimum account balance of USD 100.
Region
The region is the same as that of the primary instance.
Zone
Select a zone for the primary node.
Network Type
Defaults to Virtual Private Cloud.
VPC
Select a VPC. If you do not have one, create a VPC.
NoteYou cannot change the VPC after the read-only instance is created.
vSwitch
Select a vSwitch. If you do not have one, create a vSwitch.
NoteYou can change the vSwitch after the read-only instance is created.
MySQL Version
The MySQL version is the same as that of the primary instance.
Series
The series is the same as that of the primary instance.
Instance Family
Select an instance family:
- General-purpose: Shares idle computing resources such as CPUs with other instances on the same server. Provides higher cost efficiency.
- Dedicated: Does not share computing resources with other instances on the same server. Provides higher reliability and stability.CN Node Spec
Select the compute node specifications.
DN Node Spec
Select the data node specifications.
CN Nodes
The number of compute nodes. By default, this value is the same as that of the primary instance.
DN Nodes
The number of data nodes. By default, this value is the same as that of the primary instance.
Node Specification
The node specifications. Available only for the Standard Edition series.
Storage Type
Defaults to Local SSD-Custom.
NoteYou do not need to specify the storage capacity. The system charges you based on actual disk usage on an hourly basis. Usage less than one hour is rounded up to a full hour.
Subscription Duration
The subscription duration. Available only if you set Product Type to Subscription.
Quantity
The number of read-only instances to purchase.
-
Click Buy Now.
-
On the Confirm Order page, read and agree to the terms of service and click Pay to complete the payment.
-
After payment, wait 10 to 15 minutes for the instance to be provisioned. Return to the Instances page to view the new read-only instance.
Related topics
PolarDB-X also supports read-only columnar instances for querying Clustered Columnar Index (CCI) data. For more information, see Add a read-only columnar instance.