To connect to a PolarDB cluster, you need its endpoint and port. Each cluster has a private endpoint by default. Apply for a public endpoint only when connecting from outside a virtual private cloud (VPC), such as for local development or maintenance — private endpoints deliver better performance and are recommended for production workloads.
Endpoint types
PolarDB provides three endpoint types. The cluster endpoint handles most workloads and is recommended for general use.
| Endpoint type | Description | Supported network types | Custom domain name |
|---|---|---|---|
| Cluster endpoint (recommended) | The default cluster endpoint. All traffic is routed through PolarProxy, which automatically splits read/write traffic — writes go to the primary node, reads go to read-only nodes. | Private, Public | Supported (Private only) |
| Primary endpoint | One per cluster. Always connects to the primary node and supports both read and write operations. Automatically switches to the new primary node if failover occurs. | Private, Public | Supported (Private only) |
| Custom endpoint | Up to five custom endpoints per cluster. Traffic is routed through PolarProxy. Configure the read/write mode, load balancing policy, and the read-only nodes that handle requests. | Private | Supported (Private only) |
Associating a custom endpoint with a single node is not recommended for production environments. If that node fails, the endpoint may be unavailable for up to 1 hour.
Private and public endpoints
| Network type | Description | When to use |
|---|---|---|
| Private | Optimal performance. A default private endpoint is created when you create a cluster. You can modify it but cannot delete it. | ECS instances in the same VPC, or tools like Data Management (DMS) that support VPC access |
| Public | Apply for or delete as needed. Does not guarantee the same performance as a private endpoint. | Connecting from outside a VPC, such as for local development or maintenance |
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, move your cursor over the desired endpoint. The Network Information dialog appears, showing the endpoint address and port number.

To retain an existing domain name after migrating a cluster to the cloud, click> Bind Private Domain Name. Only Private endpoints support binding private domain names.
Apply for a public endpoint
Private endpoints are created automatically when you create a cluster or a custom endpoint — no action is required. Apply for a Public endpoint when you need to connect from outside a VPC.
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, find the desired endpoint and click Apply.

In the dialog box, set the endpoint prefix and click OK. The endpoint prefix must meet the following requirements:
6 to 40 characters in length
Lowercase letters, digits, and hyphens (-) only
Starts with a letter and ends with a letter or digit
What's next
API reference
| Operation | Description |
|---|---|
| CreateDBEndpointAddress | Creates a public endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint. |
| DescribeDBClusterEndpoints | Queries the endpoints of a PolarDB cluster. |