All Products
Search
Document Center

ApsaraDB RDS:View and change the endpoints and port numbers

Last Updated:Jan 11, 2024

This topic describes how to view and change the endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance.

Background information

You can use an endpoint and the port number of an RDS instance to connect to the instance. The parameters that you must configure to connect to the RDS instance vary based on the connection method. For more information, see Connect to an ApsaraDB RDS for PostgreSQL instance.

An RDS instance provides different types of endpoints for various scenarios. The following table describes the types of endpoints and the methods that you can use to view and change the endpoints.

Endpoint type

Description

Method to view and change an endpoint

Instance endpoint

This type of endpoint is suitable for all connection scenarios.

View and change the endpoints and port numbers of an RDS instance

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 read/write splitting performance and reduce the load on the primary RDS instance.

For more information, see What are database proxies?

Change the database proxy endpoint and port number of an RDS instance

Babelfish endpoint

If Babelfish is enabled for an RDS instance when you create the instance, you can use the instance endpoint and the TDS port number to connect to the RDS instance from an SQL Server client.

For more information about Babelfish, see Introduction to Babelfish.

Change the endpoints and port numbers of an RDS instance for which Babelfish is enabled

Change the endpoint and port number of an RDS instance

Prerequisites

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, click Database Connection to view the internal and public endpoints and port numbers of the RDS instance.

  3. In the Database Connection section, 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. The value of the Endpoint parameter that you can configure is the prefix of the endpoint.

    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.

    • If your RDS instance uses local SSDs, you cannot change the port numbers of the RDS instance.

Change the database proxy endpoint and port number of an RDS instance

Prerequisites

The database proxy feature is enabled for your RDS instance. For more information, see Enable the database proxy feature.

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, click Database Proxy.

  3. In the Connection Information section, find the required database proxy endpoint and click the image.png icon to the right of the database proxy endpoint.

  4. In the dialog box that appears, modify the values of Endpoint and Port. Then, click OK. The value of Endpoint that you can modify refers to the prefix of the database proxy endpoint.

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

    • The port number that is associated with a database proxy endpoint must be within the range of 1000 to 5999.

    • The value of Endpoint Type cannot be modified.

Change the endpoints and port numbers of an RDS instance for which Babelfish is enabled

Prerequisites

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, click Database Connection to view the internal and public endpoints and the Babelfish port numbers.

  3. Click Modify Endpoint.

  4. Set the Connection Type parameter to Internal Endpoint or Public Endpoint. Then, configure the Endpoint and Babelfish TDS Port parameters and click OK. The value of the Endpoint parameter that you can configure is the prefix of the endpoint. 修改Babelfish端口号

    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

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

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

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

    After you change an endpoint or a port number of your RDS instance, the change immediately takes effect. You do not need to restart your RDS instance.

  • 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. However, the IP addresses that are associated with the endpoints change. Your application can still connect to your RDS instance by using the endpoints.