When you connect to a PolarDB cluster, you need to provide an endpoint for the PolarDB cluster. PolarDB provides private and public endpoints for cluster endpoints and primary endpoints. This topic describes how to view and apply for endpoints in the console.
Endpoints
|
Type |
Description |
Network type |
|
Cluster endpoint (recommended) |
|
|
|
Primary endpoint |
Each PolarDB cluster has only one primary endpoint. The primary endpoint has the following characteristics:
|
|
|
Custom endpoint |
Note
PolarDB allows you to create a custom endpoint that is associated with a single node. If this node fails, the endpoint might be unavailable for up to one hour. Do not use this configuration in production environments. |
Private and public endpoints
|
Network type |
Description |
Use cases |
|
Private |
|
Examples:
|
|
Public |
For example, you can access a database cluster over the internet for maintenance. |
View endpoints and ports
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters, select the region where the cluster is located, and then click the cluster ID to open the cluster details page.
-
On the Basic Information page, in the Database Connections section, hover over a target endpoint to view its Network Information, including the endpoint and port, in a tooltip. The Database Connection section displays the private endpoint (e.g.,
pc-xxx.polardb.rds.aliyuncs.com) and port (e.g.,1521). A public endpoint is not enabled by default. Click Apply to create one. The Database Connection section contains two types of endpoints: Primary Endpoint and Cluster Endpoint (Recommended). The default mode for the cluster endpoint is Read/Write (Automatic Read/Write Splitting). Each endpoint type displays its private endpoint, public endpoint, and EndpointId. You can also click Create Custom Endpoint to add a new custom endpoint.
If you previously connected to your database by using a domain name and want to keep using it after migrating to the cloud, click . Only Private endpoints can be bound to a private domain name.
Apply for a public endpoint
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters, select the region where the cluster is located, and then click the cluster ID to open the cluster details page.
-
On the Basic Information page, in the Database Connections section, in the row for the desired endpoint, click Apply in the Internet column.
NoteYou can apply only for a Internet endpoint. A Internal Network endpoint is automatically created when you create a cluster or a custom endpoint, so you do not need to apply for one.
-
In the dialog box, set the endpoint prefix and click OK.
NoteThe endpoint prefix must meet the following requirements:
-
It must be 6 to 40 characters long and contain only lowercase letters, digits, and hyphens (-).
-
It must start with a letter and end with a letter or a digit.
-
Next steps
Related APIs
|
API |
Description |
|
Creates a public endpoint for a PolarDB cluster's primary, default cluster, or custom endpoint. |
|
|
Retrieves endpoint information for a PolarDB cluster. |