Creating a Proxy Instance
A proxy instance enables read and write requests to be automatically routed through its IP address.
This section describes how to create a proxy instance.
Constraints
Proxy instances cannot be created if the TaurusDB kernel version is:
- From 2.0.26.2 to 2.0.28.3
- 2.0.29.1
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page, choose .
- On the Instances page, click the instance name.
- In the navigation pane, choose Database Proxy.
- Click Create Proxy Instance.
- In the displayed dialog box, configure required parameters by referring to Table 1 and click OK.
After a proxy instance has been created, you can click Create Proxy Instance in the Database Proxy page to add a new proxy instance.
Table 1 Parameter description Parameter
Description
Proxy Instance Name
The name can consist of 4 to 64 characters and must start with a letter. Only letters (case-sensitive), digits, hyphens (-), and underscores (_) are allowed.
Proxy Mode
- Read/Write: All write requests are routed only to the primary node, and all read requests are routed to the selected nodes based on the read weights or active connections. The default read weight of a node is 100.
- Read-only: All read requests are routed to the selected read replicas based on the read weights or active connections. The read requests will not be routed to the primary node.
NOTE:
- Only read requests are supported. If write requests are forwarded to the selected nodes, an error message is displayed.
- This mode offloads the pressure of the primary node by routing all read requests to read replicas.
- DDL, DML, and temporary table operations are not supported in the read-only mode.
Routing Policy
Values:
- Weighted: Read requests are assigned to nodes based on the weights you specify.
- Load balancing: Read requests are assigned to nodes with fewer active connections.
To use load balancing, the kernel version of your proxy instance must be 2.22.07.000 or later.
Proxy Instance Specifications
You can select the proxy instance specifications as needed.
- Kunpeng general computing-plus: 2 vCPUs | 4 GB, 4 vCPUs | 8 GB, and 8 vCPUs | 16 GB
- General-enhanced: 2 vCPUs | 4 GB, 4 vCPUs | 8 GB, and 8 vCPUs | 16 GB
Proxy Instance Nodes
Number of recommended proxy instance nodes = (Number of vCPUs of the primary node + Total number of vCPUs of all read replicas)/(4 x Number of vCPUs of the proxy instance), rounded up.
Associate New Nodes
After you enable this function, new read replicas are automatically associated with the proxy instance.
New Node Weight
If Associate New Nodes is enabled and Routing Policy is Weighted, you need to configure read weights for the new nodes. The default weight of a node is 100. Nodes with higher weights process more read requests.
Database Nodes
Select the nodes that need to be associated with the database proxy to process read requests.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.