All Products
Search
Document Center

ApsaraDB RDS:View and manage instance endpoints and ports

Last Updated:Mar 31, 2025

This topic describes how to view and manage the endpoints and ports of an ApsaraDB RDS for MySQL instance in the ApsaraDB RDS console.

RDS instances that run RDS Basic Edition and RDS High-availability Edition

Different types of endpoints are provided for RDS instances that run RDS Basic Edition and RDS High-availability Edition. You can view and change the endpoints based on your connection requirements. The following table describes the types of the endpoints.

Endpoint type

Description

Method to view and change the endpoint

Instance endpoint

The internal and public endpoints of the instance are provided.

  • Internal endpoint: offers stable connection to the RDS instance with low latency over an internal network, such as a virtual private cloud (VPC). An internal endpoint is automatically generated. For example, an Elastic Compute Service (ECS) instance can access an RDS instance within the same VPC by using the internal endpoint of the RDS instance.

  • Public endpoint: used to connect to the RDS instance over the Internet. You must manually apply for a public endpoint.

Provided in this topic.

Database proxy endpoint

If the database proxy feature is enabled for an RDS instance, we recommend that you use the database proxy endpoint to connect to the RDS instance. This helps improve the read/write splitting performance and reduces the load on the primary RDS instance. The database proxy feature is not supported for RDS Basic Edition but is supported for RDS High-availability Edition.

View the internal and public endpoints and port numbers of an RDS instance

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Basic Information section of the page that appears, click View Details next to Network Type.

    Note
    • The internal and public endpoints of an RDS instance are displayed only after you configure IP address whitelists for the instance.

    • The public endpoint of an RDS instance is displayed only after you apply for a public endpoint for the RDS instance.

    image.png

Change the internal or public endpoint and port number of an RDS instance

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

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

  3. On the page that appears, click Modify Endpoint. image

  4. In the dialog box that appears, select a connection type, enter the prefix of the new endpoint, specify the port number, and then click OK.

    Note

    The prefix is globally unique and cannot be configured or modified to the prefix of an existing endpoint.

RDS instances that run RDS Cluster Edition

The following types of endpoints are provided for RDS instances that run RDS Cluster Edition: read/write endpoint, read-only endpoint, direct node connection endpoint, and database proxy endpoint. You can view and change the endpoints based on your connection requirements. An RDS instance that runs RDS Cluster Edition is referred to as an RDS cluster. The following table describes the types of the endpoints.

Endpoint type

Description

Method to view and change the endpoint

Read/write endpoint

Each RDS cluster has only one read/write endpoint. You can use the read/write endpoint to connect to the primary node in an RDS cluster and perform read and write operations. Each read/write endpoint contains an internal endpoint that is automatically generated and a public endpoint that you must manually apply for.

  • Internal endpoint: offers stable connection to the instance with low latency over an internal network, such as a VPC. For example, an ECS instance can access an RDS instance within the same VPC by using the internal endpoint of the RDS instance.

  • Public endpoint: used to connect to an RDS instance over the Internet.

Read/write endpoint

Read-only endpoint

You can create only one read-only endpoint for each RDS cluster. You can use the read-only endpoint to access secondary nodes in an RDS cluster and implement load balancing. Each read-only endpoint contains an internal endpoint that is automatically generated during the creation of a read-only RDS instance and a public endpoint that you must manually apply for.

The number of secondary nodes that are added to the read-only endpoint is always the same as the user-defined number of secondary nodes to ensure availability.

  • If a secondary node fails, the secondary node is automatically rebuilt.

  • If a secondary node is promoted to serve as the primary node, a new secondary node is automatically added to the read-only endpoint.

Read-only endpoint

Direct node connection endpoint

You can use the direct node connection endpoint to connect to a node in an RDS cluster. If you connect to a primary node, read and write operations are supported. If you connect to a secondary node, only read operations are supported.

Each direct node connection endpoint contains an internal endpoint that is automatically generated during the creation of a direct node connection endpoint and a public endpoint that you must manually apply for.

Direct node connection endpoint

Database proxy endpoint

General-purpose database proxies are automatically enabled for RDS clusters. You can set the database proxy endpoint to Read/Write or Read-only.

  • Read/Write: You can use the endpoint to perform read/write splitting to implement linear business expansion. In this case, the database proxy endpoint supports features such as transaction splitting and connection pooling.

  • Read-only: You can use the endpoint to process only read requests, such as reporting.

Read/write endpoint

The read/write endpoint consists of the internal and public endpoints. After an RDS cluster is created, an internal endpoint is automatically generated. You can apply for a public endpoint based on your business requirements.

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Database Connection section of the Instance Topology Management section, view or change the read/write endpoint of the RDS cluster or apply for a public endpoint.

    • View the read/write endpoint: Move the pointer over the Read/Write Mode card and view the read/write endpoint in the tooltip that appears.

    • Change the read/write endpoint and apply for a public endpoint: Click Edit. In the dialog box that appears, perform the required operations based on your business requirements. You can click Change Connection, Change VPC, or Apply for Public Endpoint.

    image

Read-only endpoint

Create, view, and delete the read-only endpoint

Note
  • When you create or delete the read-only endpoint of an RDS cluster, the read/write endpoint of the RDS cluster is not affected.

  • After you delete the read-only endpoint of an RDS cluster, the internal and public endpoints of the read-only endpoint are released, and the connections that are established by using the read-only endpoint are interrupted.

  • You can configure up to one read-only endpoint for an RDS cluster. You can use the read-only endpoint for multiple secondary nodes in the RDS cluster to implement load balancing.

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Database Connection section of the Instance Topology Management section, perform the following operations based on your business requirements:

    • Create an endpoint

      Click Add Endpoint. In the dialog box that appears, configure the Internal Endpoint Prefix, Port, VPC, and vSwitch parameters, add the secondary node that you want to access, and then click OK.

    • Delete an endpoint

      In the Read-only Mode card, click Delete. In the message that appears, click OK.

  3. View the read-only endpoint: In the Database Connection section of the Instance Topology Management section, move the pointer over the Read-only Mode card to view the read-only endpoint in the tooltip that appears.

    image

Adjust the settings of the nodes added to the read-only endpoint

Note
  • Add secondary nodes and adjust node weights: The operations do not affect existing connections. If new connections are established by using the read-only endpoint of your RDS cluster, requests are forwarded based on the new weights to implement load balancing.

  • Remove secondary nodes: At least one secondary node must be retained in an RDS cluster. If you remove a secondary node from your RDS cluster, a transient connection that lasts for 30 seconds to 120 seconds occurs on the node that you remove, and other nodes are not affected.

  • When you adjust the weights of secondary nodes in an RDS cluster, make sure that the weight of at least one secondary node is greater than 0.

  • The node settings of the read-only endpoint of an RDS cluster take effect on both the internal and public endpoints of the read-only endpoint.

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Read-only Mode card in the Database Connection section of the Instance Topology Management section, click Edit.

    image

    • Add nodes and adjust weights: In the dialog box that appears, select the nodes that you want to add to the endpoint and click the 加入 icon. Then, adjust the weights of the nodes based on your business requirements and click OK.

    • Remove nodes: In the dialog box that appears, select the nodes that you want to remove from the endpoint, click the 删除 icon, and then click OK.

    image

Direct node connection endpoint

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Database Connection section of the Instance Topology Management section, create, view, and change the direct node connection endpoint of the RDS cluster or apply for a public endpoint for the RDS cluster.

    • Create a direct node connection endpoint: In the required node section, click Create Node Endpoint. In the dialog box that appears, configure the internal network information and click OK.

    • View and change the direct node connection endpoint or apply for a public endpoint: Click Manage. In the dialog box that appears, perform the required operations based on your business requirements. You can click Change Endpoint, Change VPC, or Apply for Public Endpoint.

    image

FAQ

RDS Basic Edition and RDS High-availability Edition

  • After I change a specific endpoint or port number of my RDS instance, do I need to update the endpoint or port number information on my application?

    Yes, after you change a specific endpoint or port number of your RDS instance, you must update the endpoint or port number information on your application. Otherwise, your application cannot connect to your RDS instance.

  • After I change a specific endpoint or port number of my RDS instance, does the change immediately take effect? Do I need to restart my RDS instance?

    No, you do not need to restart your RDS instance. The change takes effect immediately.

  • After I change or release an endpoint of my RDS instance, can I use the endpoint for another RDS instance?

    Yes, you can use the endpoint for another RDS instance.

  • Does a primary/secondary switchover trigger changes to the endpoints of my RDS instance?

    No, a primary/secondary switchover does not trigger changes to the endpoints of your RDS instance. After the primary/secondary switchover is complete, the original secondary RDS instance becomes the primary RDS instance, and your application is automatically connected to the new primary RDS instance.

RDS Cluster Edition

  • Why are the CPU utilization and memory usage different on nodes that have the same weight?

    Server Load Balancer (SLB) balances the connections on nodes. However, the CPU and memory resources that are consumed by the connections may be different from each other.

  • Are existing connections affected when I adjust the weights of nodes? Does my database system become unavailable?

    No, existing connections are not affected, and your database system does not become unavailable. When you adjust the weights of nodes, only new connections to the nodes are affected.

  • Can I set the weights of all nodes to 0?

    No, you cannot set the weights of all nodes to 0. You must set the weight of at least one node to a value that is greater than 0.

  • Can I remove all nodes from the read-only endpoint of an RDS cluster?

    No, you cannot remove all nodes from the read-only endpoint of an RDS cluster. At least one node must be added to the read-only endpoint of the RDS cluster.

Related operations

Operation

Description

CreateDBInstanceEndpoint

Creates an endpoint for an ApsaraDB RDS for MySQL instance that runs RDS Cluster Edition.

DeleteDBInstanceEndpoint

Deletes an endpoint of an ApsaraDB RDS for MySQL instance that runs RDS Cluster Edition.

ModifyDBInstanceEndpointAddress

Modifies information about the endpoint of an ApsaraDB RDS for MySQL instance that runs RDS Cluster Edition.