tencent cloud

TDSQL-C for MySQL

Viewing and Modifying Access Policies

Download
Focus Mode
Font Size
Last updated: 2026-06-09 17:01:04
AI-Translated
After you enable the database proxy for TDSQL-C for MySQL, a database proxy connection address is added by default. You can then add more connection addresses. By using different connection addresses, you can implement different business logics. The number of connection addresses you can create equals the number of database proxy nodes. You can view and modify the access policy for the database proxy connection address via the console.

Prerequisites

Viewing Access Policies

1. Log in to the TDSQL-C for MySQL console, select a cluster with the proxy enabled in the cluster list, and click the cluster ID to enter the cluster management page.
2. In the topology diagram under Cluster Management > Cluster Details, hover the mouse pointer over the database proxy section and click Details to enter the database proxy management page. Alternatively, you can directly select the Database Proxy tab on the cluster management page to enter the Database Proxy Management page.
3. On the database proxy management page, choose Database Proxy > Access Policy.


Modifying Access Policies

1. Log in to the TDSQL-C for MySQL console, select a cluster with the proxy enabled in the cluster list, and click the cluster ID to enter the cluster management page.
2. In the topology diagram under Cluster Management > Cluster Details, hover the mouse pointer over the database proxy section and click Details to enter the database proxy management page. Alternatively, you can directly select the Database Proxy tab on the cluster management page to enter the Database Proxy Management page.
3. On the database proxy management page, select Access Policy, find the target access policy, and click Adjust Configuration.
Note:
You can also find the target access address under Database Proxy > Overview > Connection Address, and click Adjust Configurations in the Operation column.
4. Modify the configuration of the specific policy in the pop-up window and click OK.
Step 1: Configure Policy
Parameter
Description
Read/Write Attribute
Select the Read/Write Separation of the proxy access address, which can be Read/Write Separation or Read-Only. If Read/Write Separation is selected, the Read/Write Separation feature will be enabled automatically.
Access Mode
Balanced distribution and nearby access are supported to set the connection link from the client to the database proxy. For details, see Access Mode.
Consistency Settings
If Read/Write Separation is selected, three consistency levels are provided: eventual consistency, session consistency, and global consistency. They can meet your consistency requirements in different scenarios. For details, see Consistency Level.
Note:
Changes to the consistency level take effect only for new connections. If you need the parameter to take effect immediately through resetting the connection, you can use the load rebalancing feature or restart the instance.
Timeout Period
If the consistency level is set to session consistency or global consistency, you need to set a timeout period for data replication between the read-write instance and read-only instances. The value ranges from 0 to 1,000,000 milliseconds. If it is set to 0, when a read-only instance experiences a delay that causes the consistency policy to be unsatisfied, the request will keep waiting. If it is set to a non-zero value, for example, 1000 milliseconds, when a read-only instance experiences a delay and the delay exceeds the set 1000 milliseconds, the request will be automatically forwarded to the primary instance by the system.
Note: Currently, the timeout period cannot be set separately for each database proxy instance under the same cloud account. The timeout period can only take effect uniformly for all database proxy instances. If you modify the timeout period for a single database proxy instance, the timeout period for all database proxy instances will be uniformly modified.
Adaptive Load Balancing
Determine whether to enable the adaptive CLB feature. Once it is enabled, requests are routed to instances with lower loads based on the backend load conditions to achieve load balancing for database instances. For details, see Adaptive CLB.
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 connection pools and transaction-level connection pools are supported. For details, see Connection Pool Overview.
Connection Pool Threshold
When the connection pool type is set to "session-level connection pool", set the connection pool threshold. The value ranges from 0 to 300 seconds.
Transaction Split
Determine whether to enable this feature. Once it is enabled, reads and writes in one transaction are split and executed on different instances. Read requests are forwarded to read-only instances to reduce the load on the primary instance. For details, see Transaction Split Feature.
Failover (Read/Write Separation selected)
Determine whether to enable this feature. Once it is enabled, the connection address will be routed to the read-write instance when the database proxy encounters faults.
Analysis Engine Failover (Read/Write Separation selected)
Determine whether to enable this feature (this setting is supported only in database proxy version 1.4.5 or later). Once it is enabled, when the accessed read-only analysis engine encounters a fault, requests are automatically forwarded to other read-only analysis engines according to the rules. For the detailed fault forwarding policy, see Instance Fault Forwarding.
Apply to Newly Added RO Instances
Determine whether to enable this feature. Once it is enabled, newly purchased read-only instances or read-only analysis engines will be automatically added to the database proxy.
If the read weight is automatically assigned by the system, a weight is assigned to newly purchased read-only instances according to the specification.
If the read weight is customized, the weight of newly purchased read-only instances is 0 by default when they are added. You can click Adjust Configuration on the Database Proxy > Connection Address page to modify the weight.
Step 2: Configure Weight
Parameter
Description
Assign Read Weight
The database proxy needs to distribute read requests to different instances. By assigning different read weights to each instance, the database proxy can decide to which instance to route the requests based on the weight values of the instances. 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. Below is the description related to enabling and configuring weights during the read weight assignment:
Enabling Status: If the status is Enabled, the corresponding instance will be assigned a weight for connection. If the status is Disabled, no weight will be assigned to the corresponding instance for connection.
Weight: Weight range: 0-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. 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 disable 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 disable.
The weight setting takes effect only for new connections. It does not take effect for existing data connections.
Weight description for the read-only analysis engine
When the database proxy contains a read-only analysis engine, SQL statements without specified Hint forwarding are not sent to the read-only analysis engine by default. The weight setting for the read-only analysis engine takes effect only when multiple read-only analysis engines exist.
Note:
The weight setting for the read-only analysis engine is supported only when the database proxy version is 1.4.5.
Unified Weight Management
Choose whether to enable unified weight management. When it is enabled, SQL statements without forwarding rules (Hint) will be automatically assigned to the read-only analysis engine based on the weight. In this case, the read-only analysis engine and common read-only instances perform SQL forwarding in the same Cloud Load Balancer (CLB) group.
Note:
This item is displayed only when the database proxy version is 1.4.5.

Related APIs

API
Description
This interface (ModifyProxyRwSplit) is used to configure read-write splitting for the database proxy.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback