This document describes how to configure the connection pool feature for the database proxy.
Prerequisites
Enabling the Connection Pool Feature
1. Log in to the TDSQL-C for MySQL console, select the 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.
Notes:
You can also find the target access address under Database Proxy > Overview > Connection Address, and click Adjust Configurations in the Operation column.
4. In the pop-up window, enable the button behind Connection Pool Status, complete the settings for other items as needed, and click OK.
Connection Pool Status: Enable the connection pool.
Connection Pool Type: The options include session-level connection pool and transaction-level connection pool.
Session-level connection pool: It can effectively solve the problem of excessively high instance load caused by non-persistent connection services frequently establishing new connections.
Transaction-level connection pool: It is primarily used to reduce the number of business connections directly connected to the database and to mitigate the issue of excessively high load caused by frequent connection establishment in non-persistent connection scenarios.
Connection Pool Threshold (Supported only by session-level connection pools): This is the time threshold for which idle connections are retained in the proxy's connection pool after being placed there. The configurable range is from 0 seconds to 300 seconds.
Disabling the Connection Pool Feature
1. Log in to the TDSQL-C for MySQL console, select the 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 Configutation.
Notes:
You can also find the target access address under Database Proxy > Overview > Connection Address, and click Adjust Configurations in the Operation column.
4. In the pop-up window, disable the button behind Connection Pool Status, complete the settings for other items as needed, and click OK.
Related APIs
|
| This interface (ModifyProxyRwSplit) is used to configure read/write splitting for the database proxy. |