This document describes how to set the database proxy connection address in the TencentDB for MySQL console.
The database proxy connection address is independent of the original database connection address. Requests proxied at the proxy address are all relayed through the proxy cluster to the source and replica nodes of the database, so that read and write requests are separated, with reads being forwarded to read-only instances. In this way, the load of the source database is lowered.
After database proxy is enabled for TencentDB for MySQL, a database proxy connection address will be added by default, and you can also add, modify, or delete the connection address for database proxy.
You have enabled the database proxy. For more information, see Enabling Database Proxy..
Note:Modifying the proxy address affects the database business being accessed. We recommend you modify the address during off-peak hours. Make sure that your business has a reconnection mechanism.
Note:
- The number of connection addresses is the same as that of database proxy nodes.
- An connection address will be created by default when the database proxy is enabled.
Step 1. Configure a network
Parameter | Description |
---|---|
Network | Database proxy only supports VPC. You can choose to automatically assign or specify an address. |
Security group | The security group of the source instance is selected by default. You can also select another or more existing security groups or create a new one as needed.
|
Remarks | Optional. You can add remarks for the new database proxy connection address. |
Parameter | Description |
---|---|
Read-Write Attribute | Select the read-write attribute of the proxy access address, which can be **Read/Write Separation** or **Read-Only**. |
Remove Delayed RO Instances | Set the **Remove Delayed RO Instances** policy. After this option is enabled, you can set **Delay Threshold** and **Least RO Instances**. The system will try removing or restoring a failed read-only instance no matter whether this option is enabled.
|
Connection Pool Status | The connection pool feature mainly mitigates the instance load caused by frequent new connections in non-persistent connection business scenarios. After this option is enabled, you can select the supported connection pool type, which currently can only be the session-level connection pool by default. |
Transaction Split | You can set whether to enable this feature. After it is enabled, reads and writes in one transaction will be separated to different instances for execution, and read requests will be forwarded to read-only instances to reduce the load of the source instance. |
Assign Read Weight | You can select **Assigned by system** or **Custom**. If multiple AZs are configured when the database proxy is enabled, you can separately assign the weights of proxy nodes in different AZs. |
Failover (with **Read-Write Attribute** being **Read/Write Separation**) | You can set whether to enable this feature. After it is enabled, if database proxy fails, the database proxy address will route requests to the source instance. |
Apply to Newly Added RO Instances | You can set whether to enable this feature. After it is enabled, a newly purchased read-only instance will be automatically added to the database proxy.
|
Note:If your database proxy has multiple connection addresses, you can delete unnecessary ones while keeping the last one.
Was this page helpful?