All Products
Search
Document Center

ApsaraDB RDS:Use a database proxy endpoint to connect to a database

Last Updated:Jan 12, 2024

In business scenarios such as read/write splitting and processing of highly concurrent read operations, we recommend that you use a database proxy endpoint in your application to connect to your ApsaraDB RDS for MySQL instance. This way, the system can distribute requests based on the read and write attributes and the read weight that you configured for the database proxy endpoint to reduce the loads on the primary RDS instance. This topic describes how to view and manage database proxy endpoints and connect to an RDS instance by using a database proxy endpoint in the ApsaraDB RDS console and by calling API operations.

Prerequisites

The database proxy feature is enabled. For more information, see Enable the database proxy feature.

Procedure

View and manage the database proxy endpoint and port

You can view and manage the database proxy endpoint and the port that is associated with the database proxy endpoint for your RDS instance in the ApsaraDB RDS console by using one of the following methods:

Perform operations on the Database Proxy page

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Database Proxy.

  3. In the Connection Information section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.

Perform operations on the Database Connection page

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Database Connection.

  3. In the Database Connection section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.

Note

Connect to an RDS instance

After you obtain the database proxy endpoint and the port that is associated with the database proxy endpoint, you can use the database proxy endpoint to connect to your RDS instance by following instructions provided in the following topics:

References

Related operations

Operation

Description

DescribeDBProxy

Queries the details about the dedicated proxy of an ApsaraDB RDS instance.

DescribeDBProxyEndpoint

Queries the database proxy endpoint of an RDS instance.

ModifyDBProxyEndpoint

Modifies the connection settings for a database proxy endpoint of an instance.