To connect to a PolarDB cluster, specify its endpoint. PolarDB provides private and public endpoints for the primary and cluster endpoints. This topic describes how to view and apply for an endpoint in the PolarDB console.
Endpoints
Endpoint type | Description | Supported network types |
Cluster endpoint (recommended) |
|
|
Primary endpoint | A PolarDB cluster supports only one primary endpoint. The primary endpoint has the following features:
| |
Custom endpoint |
Note You can associate a PolarDB custom endpoint with a single node. However, if the node fails, the endpoint may be unavailable for up to 1 hour. As such, this setup is not recommended for production environments. |
Private and public endpoints
Network type | Description | Scenarios |
Private |
| For example:
|
Public | For example, you can connect to your cluster by using a public endpoint to perform maintenance operations. |
View endpoints and ports
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. In the upper-left corner, select the region of the cluster. In the cluster list, find the cluster and click its ID to go to its Basic Information page.
In the Database Connections section of the Basic Information page, move your cursor over the desired endpoint. In the Network Information section in the dialog box that appears, you can view the endpoint and port number.
If you previously connected to your cluster by using a domain name and you want to retain the original domain name after the cluster is migrated to the cloud, you can click private domain names.
to bind the private domain name. Only Private endpoints support bindingApply for a public endpoint
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. In the upper-left corner, select the region of the cluster. In the cluster list, find the cluster and click its ID to go to its Basic Information page.
In the Database Connections section of the Basic Information page, find the desired endpoint and click Apply to apply for a public endpoint.
- Note
You can apply only for Public endpoints. Private endpoints are automatically created when you create a cluster or a custom endpoint. You do not need to apply for private endpoints.
In the dialog box that appears, set the endpoint prefix and click OK.
NoteThe endpoint prefix must meet the following requirements:
It must be 6 to 40 characters in length and can contain lowercase letters, digits, and hyphens (-).
It must start with a letter and end with a digit or a letter.
What to do next
Related API operations
Operation | Description |
Creates a public endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint. | |
Queries the endpoints of a PolarDB cluster. |