The database proxy distributes incoming requests across your primary and read-only instances based on the read/write attribute and read weight you configure. Use the database proxy endpoint instead of the primary endpoint when your application requires read/write splitting or needs to handle highly concurrent database operations.
Prerequisites
Before you begin, ensure that you have:
The database proxy feature enabled for your RDS instance. For more information, see Enable the database proxy feature.
Connection settings configured for the database proxy endpoint. For more information, see Configure the connection settings for a database proxy endpoint.
Find the database proxy endpoint and port
Find your database proxy endpoint and port using either of the following methods in the ApsaraDB RDS console.
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, note the database proxy endpoint and port.
NoteOn this page, you can also modify the endpoint prefix, change the port, and apply for a public endpoint. For details, see Manage the database proxy endpoints.
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, note the database proxy endpoint and port.
NoteOn this page, you can apply for and release a public endpoint, and perform additional management operations on the database proxy endpoint. For details, see Manage the database proxy endpoints.
Connect to the RDS instance
After you obtain the database proxy endpoint and port, use the endpoint to connect to your RDS instance. For connection methods using client tools or application code, see Connect to an ApsaraDB RDS for PostgreSQL instance.
What's next
API reference
| API | Description |
|---|---|
| DescribeDBProxy | Query the details of a database proxy |
| DescribeDBProxyEndpoint | Query the endpoint of a database proxy |
| ModifyDBProxyEndpoint | Modify the connection settings for a database proxy endpoint |