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 configure for the database proxy endpoint to reduce the loads on the primary RDS instance. This topic describes how to view, manage, and use database proxy endpoints.
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
Log on to the ApsaraDB RDS console and 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, you can use a client, the CLI, or an application to connect to your RDS instance. You cannot use the internal endpoint of the obtained database proxy endpoint to connect to your RDS instance in the Data Management (DMS) console. For more information about connection methods, see the following topics:
References
Related operations
Operation | Description |
Queries the details about the database proxy of an instance. | |
Queries the database proxy endpoint of an instance. | |
Modifies the connection settings for a database proxy endpoint of an instance. |