This topic describes how to apply for a public endpoint for an RDS for MariaDB instance. Apsara for RDS supports two types of endpoints: internal endpoints and public endpoints. By default, the system provides you with an internal endpoint for connecting to your RDS instance. If you want to connect to your RDS instance through the Internet, you must apply for a public endpoint.

Internal and public endpoints

Endpoint type Description
Internal endpoint

The internal endpoint is generated by default.

Use the internal endpoint if all of the following conditions are met:

  • Your application is deployed on an ECS instance.
  • The ECS instance is located in the same region as your RDS instance.
  • The ECS instance has the same network type as your RDS instance.
We recommend that you use the internal endpoint to access your RDS instance because this is more secure and delivers optimal performance.
Public endpoint You must manually apply for a public endpoint. You can also release it anytime.

Use the public endpoint if you cannot access RDS through the intranet. Specific scenarios are as follows:

  • An ECS instance accesses your RDS instance but the ECS instance is located in a different region or has a network type different from your RDS instance.
  • A server or computer outside Alibaba Cloud accesses your RDS instance.
Note
  • The public endpoint and traffic are currently free of charge.
  • Using the public endpoint reduces security. Please exercise caution.
  • To guarantee high security and performance, we recommend that you migrate your application to an ECS instance that is in the same region and has the same network type as your RDS instance and then use the public endpoint.

Apply for a public endpoint

  1. Log on to the RDS consoleRDS console.
  2. In the upper-left corner, select the region where the target RDS instance is located.
    选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Database Connection.
  5. Click Apply for Public Endpoint.
    Apply for Public Endpoint
  6. In the displayed dialog box, click OK.

    A public endpoint is generated successfully.

  7. Optional. If you want to change the public endpoint or port number, click Change Endpoint. In the displayed dialog box, set the public endpoint and port number and click OK.
    • Connection Type: Select Public Endpoint.
      Note The Public Endpoint option is available only after you have applied for a public endpoint.
    • Endpoint: The endpoint contains 8 to 64 characters, including letters, digits, and hyphens (-). The prefix of the endpoint must start with a lowercase letter.
    • Port: The port number can be modified only when the RDS network type is classic network.

    Change Endpoint

APIs

API Description
AllocateInstancePublicConnection Used to apply for a public endpoint for an RDS instance.