PolarDB clusters support the following types of endpoints: primary endpoint, cluster endpoint (also known as the default cluster endpoint), and custom endpoint. You can use one of the preceding endpoint types to connect to a PolarDB cluster. We recommend that you use the default cluster endpoint.
Endpoints
PolarDB for PostgreSQL centralized cluster whose Database Edition is Enterprise Edition or Standard Edition
PolarDB for PostgreSQL distributed cluster
Endpoint | Description | Network type |
Cluster endpoint (recommended) | Each PolarDB for PostgreSQL centralized cluster whose Database Edition is Enterprise Edition or Standard Edition has a default cluster endpoint. PolarProxy provides services to support the default cluster endpoint. The default 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 PolarProxy, see PolarProxy. Note A PolarDB for PostgreSQL distributed cluster does not have a default cluster endpoint. |
|
Primary endpoint | Each PolarDB cluster supports only a single primary endpoint. The primary endpoint has the following features:
| |
Custom endpoint |
|
Private endpoints and public endpoints
Network type | Description | Scenario |
Private network |
| Examples:
|
Public network |
| Example: You can connect to a cluster over the public network to perform maintenance operations. |
View endpoints and ports
Log on to the PolarDB console. Click Clusters in the left-side navigation pane. In the upper-left corner of the page, select the region in which the cluster resides, and then click the ID of the cluster to go to the Basic Information page.
Select a method to view the endpoint and port based on the cluster type.
PolarDB for PostgreSQL centralized cluster
PolarDB for PostgreSQL centralized clusters refer to clusters whose Database Edition is Enterprise Edition or Standard Edition.
In the Database Connections section of the Basic Information page, move the pointer over an endpoint. Then, you can view the endpoints and port numbers in the Network Information section in the dialog box that appears.
NoteIf you use a domain name to connect to a database, you can click Bind Private Domain Name to bind the domain name to a private endpoint. This way, you can retain the original database domain name after the database is migrated to the cloud. You can bind private domain names only to Private endpoints. For more information, see Private domain names.
PolarDB for PostgreSQL distributed cluster
In the Database Connection section, move the pointer over the private network or public endpoint. Then, you can view the endpoint and port number in the dialog box that appears.
Apply for a public endpoint
Log on to the PolarDB console. Click Clusters in the left-side navigation pane. In the upper-left corner of the page, select the region in which the cluster resides and click the ID of the cluster to go to the Basic Information page.
Apply for an endpoint based on the cluster type.
PolarDB for PostgreSQL centralized cluster
PolarDB for PostgreSQL centralized clusters refer to clusters whose Database Edition is Enterprise Edition or Standard Edition.
In the Database Connections section of the Basic Information page, find the endpoint and click Apply to the right of the Public parameter.
NoteYou can apply only for Public endpoints. When you create a cluster or a custom endpoint, a private endpoint is automatically created. You do not need to apply for this endpoint.
In the dialog box that appears, specify a prefix for the endpoint and click OK.
NoteThe prefix of the endpoint must meet the following requirements:
The prefix must be 6 to 40 characters in length and can contain lowercase letters, digits, and hyphens (-).
The prefix must start with a letter and end with a digit or a letter.
PolarDB for PostgreSQL distributed cluster
In the Database Connections section of the Basic Information page, find the endpoint and click Apply to the right of Public Endpoint parameter.
In the dialog box that appears, specify a prefix for the endpoint and click OK.
NoteThe prefix of the endpoint must meet the following requirements:
The prefix must be 6 to 40 characters in length and can contain lowercase letters, digits, and hyphens (-).
The prefix must start with a letter and end with a digit or a letter.
What to do next
Connect to the cluster. For more information, see Connect to a cluster
Related API operations
Operation | Description |
Queries the endpoints of a specified PolarDB cluster. | |
Creates a public endpoint for a PolarDB cluster. | |
Modifies the endpoints of a PolarDB cluster. | |
Deletes the public endpoints of a PolarDB cluster. |