A PolarDB cluster has three types of endpoints: primary endpoints, cluster endpoints, and custom endpoints. When you connect to a PolarDB cluster, you can use one of the three types of endpoints of the PolarDB cluster. We recommend that you use the cluster endpoint.
Endpoints
-
Centralized PolarDB for PostgreSQL cluster (Product version is Enterprise Edition or Standard Edition)
-
PolarDB for PostgreSQL distributed cluster
|
Type |
Description |
Network types |
|
Cluster endpoint (Recommended) |
When you create a centralized PolarDB for PostgreSQL cluster (where the product version is Enterprise Edition or Standard Edition), each cluster includes a default cluster endpoint. A database proxy serves this endpoint. The cluster endpoint supports automatic read/write splitting. Write requests are routed to the primary node, and read requests are routed to read-only nodes. For more information about the database proxy, see Database proxy. Note
PolarDB for PostgreSQL distributed clusters do not include this default cluster endpoint. |
|
|
Primary endpoint |
Each PolarDB cluster has a single primary endpoint with the following features:
|
|
|
Custom endpoint |
|
Private and public endpoints
|
Network type |
Description |
Use cases |
|
Private network |
|
For example:
|
|
Public network |
|
For example: Access the database cluster over the public network for maintenance. |
View endpoints and ports
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where your cluster is located, and then click the cluster ID.
-
You can view the endpoint and port based on your cluster type.
Centralized PolarDB for PostgreSQL clusters
A centralized PolarDB for PostgreSQL cluster refers to a cluster whose product edition is Enterprise Edition or Standard Edition.
In the Database Connections section, hover over the target endpoint. A dialog box appears showing the Network Information, which includes the endpoint and port number.
This section displays the Primary endpoint and the Cluster endpoint (Recommended). The cluster endpoint operates in Read/Write (automatic read/write splitting) mode. For each endpoint, you can view the private endpoint, public endpoint, and EndpointId. You can also click Create custom endpoint to add a new connection.
NoteIf you previously connected to your database by using a domain name, you can click Bind Private Domain Name to retain the original database domain name after you migrate the database to the cloud. You can bind a Private only to a private endpoint. For more information, see Private domain names.
PolarDB PostgreSQL Distributed Edition Cluster
In the Database Connections section, hover over the target private or public endpoint. A dialog box appears, showing the endpoint and port number.
The expanded Endpoints panel contains fields for Public Endpoint (click Apply if none is available), Private Endpoint, and EndpointId. The Create custom endpoint option is also available on the right.
Apply for a public endpoint
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where your cluster is located, and then click the cluster ID.
-
You can apply for an endpoint based on your cluster type.
Centralized PolarDB for PostgreSQL cluster
A centralized PolarDB for PostgreSQL cluster refers to a cluster whose product edition is Enterprise Edition or Standard Edition.
-
On the Basic Information page, in the Database Connections section, find the desired endpoint and click Apply to the right of Public.
NoteYou can only apply for a Public endpoint. When you create a cluster or a custom endpoint, a Private endpoint is generated by default, so you do not need to apply for one.
-
In the dialog box that appears, set a prefix for the endpoint and click OK.
NoteThe endpoint prefix must meet the following requirements:
-
Must be 6 to 40 characters long and contain only lowercase letters, digits, and hyphens (-).
-
Must start with a letter and end with a letter or a digit.
-
PolarDB for PostgreSQL (Distributed Edition) clusters
-
On the Basic Information page, in the Database Connections section, find the desired endpoint and click Apply to the right of Public Endpoint.
-
In the dialog box that appears, set a prefix for the endpoint and click OK.
NoteThe endpoint prefix must meet the following requirements:
-
Must be 6 to 40 characters long and contain only lowercase letters, digits, and hyphens (-).
-
Must start with a letter and end with a letter or a digit.
-
-
Next steps
Related APIs
|
API |
Description |
|
Queries the endpoint information of a cluster. |
|
|
Creates a public endpoint for a cluster. |
|
|
Modifies the endpoint of a cluster. |
|
|
Deletes a public endpoint of a cluster. |