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 the endpoint and 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.
Endpoint type | Description | Method to view and change an endpoint |
---|---|---|
Instance endpoint | This type of endpoint is suitable for all connection scenarios. | Change the endpoint and port number 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 the read/write splitting performance and reduces the load on the primary RDS instance. For more information about database proxies, 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
- A whitelist is configured. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for PostgreSQL instance.
- A public endpoint for the RDS instance is available. You can apply for a public endpoint based on your business requirements. For more information, see Apply for or release a public endpoint on an ApsaraDB RDS for PostgreSQL instance.
Procedure
- 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.
- In the left-side navigation pane, click Database Connection to view the internal and public endpoints and port numbers of the RDS instance.
- Click Change Endpoint.
- 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.
- 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 and configure the database proxy feature for an ApsaraDB RDS for PostgreSQL instance.
Procedure
- 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.
- In the left-side navigation pane, click Database Proxy.
- In the Endpoint section of the Proxy tab, view the endpoint and port number of the proxy terminal. Find the endpoint that you want to change and click Change in the Actions column. Note A default proxy endpoint is provided for your RDS instance. The value of the Network Type parameter for the default proxy endpoint is Internal (VPC). You can create a public proxy endpoint and view or modify the created endpoint based on your business requirements. For more information, see Manage the database proxy endpoints of an ApsaraDB RDS for PostgreSQL instance.
- Change the values of the Endpoint and Port parameters and click OK. 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 must be within the range of 1000 to 5999.
- You cannot change the value of the Network Type parameter for the endpoint.
Change the endpoints and port numbers of an RDS instance for which Babelfish is enabled
Prerequisites
- Babelfish is enabled for an RDS instance when you create the instance. For more information, see Enable Babelfish for an ApsaraDB RDS for PostgreSQL instance.
- A whitelist is configured. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for PostgreSQL instance.
- A public endpoint for the RDS instance is available. You can apply for a public endpoint based on your business requirements. For more information, see Apply for or release a public endpoint on an ApsaraDB RDS for PostgreSQL instance.
Procedure
- 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.
- In the left-side navigation pane, click Database Connection to view the internal and public endpoints and the Babelfish port numbers.
- Click Change Endpoint.
- Set the Connection Type parameter to Internal Endpoint or Public Endpoint. Then, configure the Endpoint and Babelfish TDS 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
- After I change an endpoint or a port number of my RDS instance, do I need to update the endpoint or port number information in my application?
Yes, after you change an endpoint or a 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.
- 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 change the network type of a read-only RDS instance and retain the classic network endpoint.
- 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.