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
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.
In the left-side navigation pane, click Database Proxy.
In the Connection Information section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.
You can modify the prefix of the database proxy endpoint and the port that is associated with the database proxy endpoint. You can also apply for a public endpoint for the database proxy endpoint. For more information, see Manage database proxy endpoints.
If you want to configure connection settings for the database proxy endpoint, you can follow the instructions provided in Configure the connection settings for a database proxy endpoint.
Perform operations on the Database Connection page
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.
In the left-side navigation pane, click Database Connection.
In the Database Connection section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.
On the Database Connection page, you modify the database proxy endpoint and the port that is associated with the database proxy endpoint and apply for a public endpoint. To perform more operations, you can go to the Database Proxy page. For more information, see Manage the dedicated proxy endpoints.
If you want to configure connection settings for the database proxy endpoint, you can follow the instructions provided in Configure the connection settings for a database proxy endpoint.
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 |
Queries the details about the dedicated proxy of an ApsaraDB RDS instance. | |
Queries the database proxy endpoint of an RDS instance. | |
Modifies the connection settings for a database proxy endpoint of an instance. |