Updated on 2024-09-06 GMT+08:00

Enabling the Connection Pool for a Proxy Instance

A session-level connection pool helps reduce the database load caused by frequent establishment of short connections.

Connection Pool is disabled by default. You can enable a session-level connection pool.

A session-level connection pool is suitable for short connections. When your client disconnects from your database, the system checks whether the connection is idle. If it is, the system places the connection in the connection pool of a proxy instance and retains the connection for a short period of time. When your client re-initiates a connection, any available connection in the connection pool is used, reducing the overhead of establishing a new connection to the database. If no connections are available in the connection pool, a new connection will be established.

Constraints

To use a connection pool, the kernel versions of proxy instances must be 2.22.07.000 or later.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the target DB instance name to go to the Basic Information page.
  5. In the navigation pane on the left, choose Database Proxy.
  6. Click the name of a proxy instance.
  7. On the Basic Information page, click Change next to Connection Pool.
  8. Set Connection Pool to Session level and click OK.

    Figure 1 Configuring a connection pool