All Products
Search
Document Center

ApsaraDB RDS:apply for or release a public endpoint

Last Updated:Mar 30, 2026

ApsaraDB RDS for MariaDB provides two endpoint types: an internal endpoint (created by default) and a public endpoint. To connect to an RDS instance from outside the Alibaba Cloud internal network, apply for a public endpoint.

When to use a public endpoint

The internal endpoint is sufficient when your Elastic Compute Service (ECS) instance and RDS instance share the same region and network type. Traffic stays on the internal network — no public endpoint needed.

Apply for a public endpoint in these scenarios:

  • Your ECS instance is in a different region or uses a different network type than the RDS instance. For more information, see Network types.

  • You are connecting from a device outside Alibaba Cloud.

Endpoint comparison

Internal endpoint Public endpoint
Provisioned automatically Yes No — must be applied for manually
Can be released No Yes
Network type can be changed Yes
Network Internal network (private) Internet
Recommended for ECS instances in the same region and network type Cross-region, cross-network-type, or external clients
Important

If you use a public endpoint to connect to an RDS instance, data security is compromised. Proceed with caution. To reduce exposure, migrate your application to an ECS instance in the same region and network type as the RDS instance, and connect using the internal endpoint instead.

Apply for or release a public endpoint

Note

Applying for a public endpoint is free. Traffic generated through the public endpoint is also free.

  1. Go to the Instances page. In the top navigation bar, select the region where the RDS instance resides, then find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Database Connection.

  3. Do one of the following:

    • To apply: click Apply for Public Endpoint.

    • To release: click Disable Public Endpoint.

  4. In the confirmation dialog, click OK.

API reference

Operation API Description
Apply for a public endpoint AllocateInstancePublicConnection Applies for a public endpoint for an instance
Release a public endpoint ReleaseInstancePublicConnection Releases the public endpoint of an instance