tencent cloud

Viewing and Modifying Access Policy
Last updated: 2025-12-01 18:15:24
Viewing and Modifying Access Policy
Last updated: 2025-12-01 18:15:24
After database proxy is enabled for TencentDB for MySQL, a database proxy connection address will be added by default. You can also add connection addresses later to implement different business logics. The number of connection addresses that can be created is the same as that of database proxy nodes. You can view and modify the access policy of a connection address in the console.

Prerequisites

You have enabled the database proxy. For more information, see Enabling Database Proxy.

Viewing the access policy

1. Log in to the TencentDB for MySQL console, select the region at the top of the page, and click the ID of the target instance to enter the instance management page.
2. On the instance management page, select Database Proxy > Access Policy.


Modifying the access policy

1. Log in to the TencentDB for MySQL console, select the region at the top of the page, and click the ID of the target instance to enter the instance management page.
2. On the instance management page, select Database Proxy > Access Policy, find the target access policy, and click Settings.
Note:
You can also find the target access address in Database Proxy > Overview > Connection Address. Then, click Adjust Configurations in the Operation column.
3. In the pop-up window, modify the policy configuration and click OK.

Note:
The read-only analysis engine does not support database proxy features such as transaction split, connection pool, delayed read-only instance removal, read-write separation, and weight setting. It only supports accessing the read-only analysis engine through Hint Syntax Usage.
Network forwarding is only supported for instances with TencentDB for MySQL Cluster Edition (cloud disk) architectures. If network forwarding is enabled during configuration, the following capabilities are not supported: adaptive load balancing, connection pool, and transaction split.
Parameter
Description
Read/Write Attribute
You can modify the read-write attribute of the proxy address to select either read-write separation or read-only mode. If read-write separation is selected, the primary instance and read-write nodes are enabled by default and cannot be disabled during the read weight distribution.
Network Forwarding
You can set whether to enable network forwarding. This option is supported only for instances with TencentDB for MySQL Cluster Edition (cloud disk) architectures. Once enabled, SQL distribution will be performed through network forwarding.
Access Mode
Select balanced distribution or nearby access to set the connection link from the client to the database proxy. For details, see Access Mode.
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.
Delay Threshold: Enter an integer greater than or equal to 1 (in seconds).
Least RO Instances: It is subject to the number of read-only instances owned by the source instance. If it is set to `0`, when all read-only nodes are removed, all read requests will be routed to the source instance until at least one of the removed read-only instances rejoins the database proxy to continue processing the read requests.
Adaptive Load Balancing
You can set whether to enable the adaptive load balancing feature. Once enabled, requests can be routed to instances with lower load based on backend load conditions to achieve database instance load balancing. For details, see Adaptive Load Balancing.
Connection Pool Status
The connection pool feature is mainly used to reduce the instance load caused by the frequent establishment of new connections in non-persistent connection services. If you enable this feature, you can select a supported connection pool type. Currently, session-level and transaction-level connection pools are supported.
Transaction Split
You can set whether to enable this feature. Once enabled, read requests before the first write request in a transaction can be forwarded to read-only instances to reduce the load on the primary instance.
Assign Read Weight
The database proxy needs to distribute read requests to different instances. By assigning read weights to each instance, it routes requests based on their weight values. The system supports either automatic assignment or custom assignment. If the custom assignment is selected, it supports configuring the weight for each instance's access to the database. If multiple availability zones (AZs) are configured when the database proxy is enabled, you can configure the weights for proxy nodes in different AZs to access the database. Below is the description related to enabling and configuring weights during the read weight assignment:
Enabling Status: If the switch is enabled, the corresponding instance will be assigned a weight for connection. If the switch is disabled, no weight will be assigned to the corresponding instance for connection.
Weight: The weight value range is from 0 to 100. 0 means that the corresponding instance will be assigned a weight for connection, but the weight is the lowest. The larger the value, the higher the weight, and the more read requests are received. After the read weights are assigned, read requests will be routed to the corresponding instances in proportion. For example, if the read weights of Instance 1, Instance 2, and Instance 3 are set to 3, 2, and 1, read requests from the database proxy connection address will be routed to Instance 1, Instance 2, and Instance 3 in the ratio of 3:2:1.
Note:
The weight here is for read requests (non-transactional).
The operation of setting the weight will not cause a momentary disconnection.
Setting it to Disabled may cause a small number of connections to be affected. To avoid this impact, it is recommended to first adjust the read weight of the corresponding instance/node to 0 before it is set to Disabled.
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.
Forwarding Upon Analysis Engine Faults
You can set whether to enable this feature. Once enabled, when the accessed read-only analysis engine fails, requests will be automatically forwarded to other read-only analysis engines based on rules. For detailed fault forwarding policies, see Forwarding Upon Instance Faults.
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.
If Assign Read Weight is set to Assigned by system, newly purchased read-only instances will be assigned with the default weight based on their specification.
If Assign Read Weight is set to Custom, when newly purchased read-only instances are added, their weights will be 0 by default, which can be modified by clicking Adjust Configurations in Connection Address on the Database Proxy tab.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback