This topic describes how to configure endpoints for an RDS for MariaDB instance. ApsaraDB for RDS provides two types of endpoints: internal endpoints and public endpoints.

Internal and public endpoints

Endpoint type Description
Internal endpoint
  • The internal endpoint is provided by default. You do not need to apply for it and cannot release it. However, you can change the network type.
  • If your application is deployed on an ECS instance that is in the same region and the network types of the ECS and RDS instances are both VPC, the ECS and RDS instances can communicate with each other by default. You do not need to apply for a public endpoint for the RDS instance.
  • Accessing an RDS instance through the internal endpoint achieves the high security and performance of the RDS instance.
Public endpoint
  • You must manually apply for a public endpoint. You can release the public endpoint if you do not need it.
  • When you cannot access an RDS instance through the internal endpoint, you must apply for a public endpoint. The specific scenarios are as follows:
    • When you access an RDS instance from an ECS instance, where the ECS instance and RDS instance are located in different regions, and their network types are different.
    • When you access an RDS instance from the third-party services or applications.
Note
  • For security purposes, exercise caution when you access your RDS instance through a public endpoint.
  • We recommend that you migrate your application to an ECS instance in the same region and with the same network type as your RDS instance, and then use the internal endpoint to access your application. This helps to improve transmission speed and data security.

Apply for or release a public endpoint

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target RDS instance is located.
    Select a region
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Database Connection.
    • If you have not applied for a public endpoint, click Apply for Public Endpoint.
    • If you have applied for a public endpoint, click Release Public Endpoint.

    申请外网地址
    释放外网地址
  5. In the message box that appears, click OK.

Change the internal and public endpoints

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target RDS instance is located.
    Select a region
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Database Connection.
  5. Click Change Endpoint.
  6. In the dialog box that appears, specify the internal and public endpoints, and click OK.
    变更连接地址
    Note
    • The prefix of the endpoint must be 8 to 64 characters in length and can contain letters, numbers, and hyphens (-). It must start with a lowercase letter.
    • In a VPC, either the internal port number or public port number cannot be changed.
    • In a classic network, either the internal port number or public port number can be changed.

APIs

Operation Description
AllocateInstancePublicConnection Used to apply for a public endpoint for an RDS instance.
ReleaseInstancePublicConnection Used to release the public endpoint of an RDS instance.