All Products
Search
Document Center

PolarDB:View or apply for an endpoint

Last Updated:Jun 20, 2026

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)

  • Each cluster includes a default cluster endpoint. The service for this endpoint is provided by PolarProxy.

  • 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.

  • Private

  • Public

Primary endpoint

Each PolarDB cluster has only one primary endpoint. The primary endpoint has the following characteristics:

  • It always connects to the primary node and supports both read and write operations.

  • If the primary node fails, the primary endpoint automatically fails over to the new primary node.

Custom endpoint

  • You can create up to five additional custom endpoints. The services for these endpoints are also provided by PolarProxy.

  • You can configure the read/write mode and load balancing policies for a custom endpoint to implement read/write splitting or support read-only workloads.

  • A custom endpoint must be associated with at least one read-only node. Requests sent to this endpoint are routed only to the associated nodes.

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

  • A private endpoint offers the best performance for PolarDB.

  • A private endpoint is created by default when you create a cluster. You can modify this endpoint, but you cannot release it.

Examples:

  • If an ECS instance and the database cluster are in the same VPC, the ECS instance can access the database cluster using a private endpoint.

  • Accessing a database cluster using Data Management (DMS).

Public

  • You can apply for or release a public endpoint.

  • Public endpoints connect over the internet. Access over the internet does not provide the optimal performance of PolarDB.

For example, you can access a database cluster over the internet for maintenance.

View endpoints and ports

  1. 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.

  2. 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.

Note

If you previously connected to your database by using a domain name and want to keep using it after migrating to the cloud, click More > Bind Private Domain Name. Only Private endpoints can be bound to a private domain name.

Apply for a public endpoint

  1. 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.

  2. On the Basic Information page, in the Database Connections section, in the row for the desired endpoint, click Apply in the Internet column.

    Note

    You 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.

  3. In the dialog box, set the endpoint prefix and click OK.

    Note

    The 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

Connect to a database cluster

Related APIs

API

Description

CreateDBEndpointAddress

Creates a public endpoint for a PolarDB cluster's primary, default cluster, or custom endpoint.

DescribeDBClusterEndpoints

Retrieves endpoint information for a PolarDB cluster.