In business scenarios such as read/write splitting and processing of highly concurrent read and write operations, we recommend that you use a database proxy endpoint in your application to connect to your ApsaraDB RDS for PostgreSQL instance. This way, the system can allocate requests based on the read/write attribute and read weight that you configured for the database proxy endpoint to reduce the loads on the primary RDS instance. This topic describes how to connect to an RDS instance by using a database proxy endpoint.
Prerequisites
The database proxy feature is enabled for your RDS instance. For more information, see Enable the database proxy feature.
The connection settings are configured for the database proxy in your RDS instance. For more information, see Configure the connection settings for a database proxy endpoint.
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 ID of the instance.
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 endpoint.
NoteYou 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 the 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 ID of the instance.
In the left-side navigation pane, click Database Connection.
In the Database Proxy Endpoint section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.
NoteOn the Database Connection page, you can apply for and release a public endpoint.
On the Database Connection page, you can perform more operations that are related to the database proxy endpoint. For more information, see Manage the 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.
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 endpoint to connect to your RDS instance. For more information, see Connect to an ApsaraDB RDS for PostgreSQL instance.
References
Related operations
API | Description |
Queries the details of a database proxy. | |
Queries the endpoint of a database proxy. | |
Modifies the connection settings for a database proxy endpoint. |