All Products
Search
Document Center

ApsaraDB RDS:View and change the endpoints and port numbers

Last Updated:Nov 06, 2023

You can change the internal and public endpoints and port numbers of an ApsaraDB RDS for SQL Server instance. This topic describes how to view and change the internal and public endpoints and port numbers.

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.

Different types of endpoints are provided for RDS instance to meet various connection requirements. You can view, modify, or disable an endpoint based on the connection scenario.

Endpoint type

Description

Method to view and modify endpoints

Internal and public endpoints

This type of endpoint is suitable for all connection scenarios.

View and change the internal and public endpoints and port numbers

Read-only routing endpoint

ApsaraDB RDS for SQL Server allows you to create read-only RDS instances for a primary RDS instance that runs SQL Server EE on 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 read-only routing endpoint in your application. For more information, see Enable the read-only routing endpoint to implement read/write splitting. 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 based on their weights.

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

View and change the internal and public endpoints and port numbers

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

Prerequisites

Usage notes

  • 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 and 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. 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 Cluster Management to view the read-only routing endpoint and port.

  3. In the Basic Information section, click Disable Readonly Splitting Address.

    image.png
  4. In the message that appears, click OK.