All Products
Search
Document Center

ApsaraDB RDS:View and manage the endpoints and port numbers

Last Updated:Oct 30, 2024

This topic describes how to view and manage the internal and public endpoints and port numbers of ApsaraDB RDS for SQL Server instances.

Background information

ApsaraDB RDS for SQL Server provides endpoints and ports for RDS instances. The endpoints and ports of an RDS instance are used to configure connection-based parameters when you connect to the RDS instance. Connection-based parameters vary based on the method that is used to connect to an RDS instance. For more information, see Connect to an ApsaraDB RDS for SQL Server instance.

The following table describes the endpoint types supported by ApsaraDB RDS for SQL Server and their applicable scenarios. You can view, modify, or disable different types of endpoints based on your requirements.

Endpoint type

Description

Method to view and modify endpoints

Internal and public endpoints

This type of endpoint is suitable for all connection scenarios.

Read-only routing endpoint

ApsaraDB RDS for SQL Server allows you to create read-only RDS instances for a primary RDS instance that runs RDS Cluster Edition. After you create read-only RDS instances, you can enable the read-only routing endpoint and configure the endpoint of the primary RDS instance and the read-only routing endpoint in your application. After you complete the configuration, write requests are forwarded to the primary RDS instance, and read requests are automatically forwarded to the read-only routing endpoint and distributed to read-only RDS instances.

For more information, see Overview of read/write splitting.

Note

You can configure the read-only routing endpoint of a primary RDS instance in your application. This way, when the application client sends a read request to the read-only routing endpoint, the request is automatically distributed to the secondary nodes and all specified read-only RDS instances of the primary RDS instance.

If you configure only the internal or public endpoint of the primary RDS instance in your application, all requests sent by the application client are distributed only to the primary RDS instance.

View and change the internal and public endpoints and port numbers

Prerequisites

Usage notes

If you change the endpoint or port number of your RDS instance, you must update the endpoint or port number information on your application. If you do not update the information, your application cannot connect to your RDS instance.

Procedure

  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 of the page that appears, click Database Connection to view the internal and public endpoints and ports of the RDS instance.

  3. In the Database Connection section of the page that appears, click Modify Endpoint.

  4. Set the Connection Type parameter to Internal Endpoint or Public Endpoint. Then, configure the Endpoint and Port parameters and click Ok.

    Note
    • The prefix of an endpoint must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). The prefix must start with a lowercase letter.

    • The port number must be within the range of 1000 to 5999.

FAQ

  • Do I need to modify the endpoint or port number in my application after I modify the endpoint or port number of an RDS instance?

    Yes, you must modify the endpoint or port number in the application after you have modified them. Otherwise, the application cannot connect to the RDS instance.

  • Does the modification of the endpoint immediately take effect? Do I need to restart my RDS instance?

    No, you do not need to restart the instance. The modification 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 changed or released endpoint for another RDS instance.

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

    No, a primary/secondary switchover does not trigger changes to the endpoints of your RDS instance. However, the IP addresses that are associated with the endpoints change. Your application can still connect to your RDS instance by using the endpoints.

View or disable a read-only routing endpoint (for RDS instances that run RDS Cluster Edition)

Prerequisites

Read/write splitting is enabled for the RDS instance. For more information, see Enable read/write splitting by enabling the read-only routing endpoint.

Usage notes

  • After you disable read/write splitting by disabling the read-only routing endpoint, your application can no longer connect to the read-only RDS instance by using the read-only routing endpoint. However, the endpoints of the primary and read-only instances remain unchanged. If you enable read/write splitting again, the read-only routing endpoint may change.

  • When you disable the read-only routing endpoint for your RDS instance, a transient connection that lasts 30 seconds or less occurs. We recommend that you disable the read-only routing endpoint during off-peak hours. Make sure that your application is configured to automatically reconnect to the RDS instance. This prevents interruptions to your workloads.

  • After you disable the read-only routing endpoint, it becomes invalid. Before you disable the read-only routing endpoint, make sure that your application no longer uses this endpoint.

Procedure

  1. Log on to the ApsaraDB RDS console and 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 instance ID.

  2. In the left-side navigation pane, click Cluster Management to view the read-only routing endpoint and port.

  3. In the Basic Information section, click Disable Read-only Routing Endpoint.

    image.png

  4. In the message that appears, click OK.