AnalyticDB for PostgreSQL supports two types of endpoints: internal and public. By default, an internal endpoint is provided for you to connect to an AnalyticDB for PostgreSQL instance. If you want to connect to an AnalyticDB for PostgreSQL instance from your application that is deployed on an Elastic Compute Service (ECS) instance across regions or network types, you must apply for a public endpoint.
Scenarios
Scenario | Description |
---|---|
Only an internal endpoint is required | Your application is deployed on an ECS instance that is located within the same region and has the same network type as your AnalyticDB for PostgreSQL instance. |
Only a public endpoint is required |
|
Both an internal endpoint and a public endpoint are required |
|
Precautions
- Before you connect your application to your AnalyticDB for PostgreSQL instance, you must add the IP address or the corresponding CIDR block of the application to a whitelist of the instance. For more information, see Configure an IP address whitelist.
- If you use a public endpoint to connect to your instance, security is compromised. Proceed with caution. To improve security and accelerate data transfer, we recommend that you migrate your application to an ECS instance that is located within the same region as your AnalyticDB for PostgreSQL instance.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Database Connection.
- Click Apply for Public Endpoint or Release Public Endpoint to the right of Public Endpoint.
Related operations
Operation | Description |
---|---|
AllocateInstancePublicConnection | Applies for a public endpoint for an AnalyticDB for PostgreSQL instance. |
ReleaseInstancePublicConnection | Releases the public endpoint of an AnalyticDB for PostgreSQL instance. |