When you connect to a PolarDB for PostgreSQL cluster, an endpoint that is required to connect to the cluster. PolarDB for PostgreSQL provides cluster endpoints and primary endpoints. This topic describes how to view these endpoints in the console.

Procedure

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster is deployed.
  3. Find the cluster and click the cluster ID.
  4. On the Overview page, find the endpoints in the Endpoints section.

Endpoints

Endpoint Description Supported network
Cluster endpoint Each PolarDB cluster has a default cluster endpoint. An application can connect to multiple nodes by connecting to only one cluster endpoint. Cluster endpoints support read/write splitting. Write requests are forwarded to the primary node. Read requests are forwarded to the primary node or read-only nodes based on the load on each node. Public and internal networks
Primary endpoint A primary endpoint is used to connect to the primary node and supports read and write operations. If the primary node fails, the system fails over to the read-only node that is promoted to the primary node. Network traffic is routed to the new primary node through the primary endpoint. Public and internal networks

Internal and public endpoints

Endpoint Description Scenario
Internal endpoint
  • PolarDB clusters achieve optimal performance if the clusters are accessed through internal endpoints.
  • Internal endpoints cannot be released.
  • If your Elastic Computing Service (ECS) instance runs in the same virtual private cloud (VPC) as the PolarDB cluster, your ECS instance can access the cluster by using the internal endpoint.
  • You can use Data Management Service (DMS) to connect to clusters over VPCs.
Public endpoint
  • You must apply for public endpoints. You can also release the public endpoints.
  • Public endpoints can be used to enable access over the Internet. PolarDB clusters cannot achieve optimal performance if the clusters are accessed over public endpoints.
You can connect to your PolarDB cluster by using the public endpoint to manage databases.

Connect to a PolarDB for PostgreSQL cluster

Connect to a PolarDB for PostgreSQL cluster.

Related API operations

Operation Description
DescribeDBClusterEndpoints Queries the endpoint information of a specified PolarDB cluster.
CreateDBEndpointAddress Creates public-facing endpoints for a specified PolarDB cluster.
ModifyDBEndpointAddress Modifies the default cluster endpoint, custom cluster endpoint, primary endpoint, or private domain of a specified PolarDB cluster.
DeleteDBEndpointAddress Deletes an endpoint of a specified PolarDB cluster.