All Products
Search
Document Center

ApsaraDB RDS:Change the network type

Last Updated:Jan 05, 2024

This topic describes how to change the network type of an ApsaraDB RDS for MySQL instance based on your business requirements.

For more information about how to change the network type of an RDS instance that runs a different database engine, see the following topics:

Impacts

The following table describes the impacts that a change in the network type may bring if the database proxy feature is enabled for your RDS instance. For more information, see Introduction to database proxies.

Proxy type

Impact

Shared proxy

After you change the network type of your RDS instance, the network type of the database proxy endpoint changes. For more information, see What are database proxies?

Note

Starting April 1, 2021, Alibaba Cloud has stopped the updates and maintenance for the shared proxy feature. We recommend that you upgrade the database proxy of your RDS instance from a shared proxy to a dedicated proxy at the earliest opportunity. For more information, see [EOS/Discontinuation] End of updates and maintenance for the shared proxy feature from April 01, 2021 and Upgrade the database proxy of an ApsaraDB RDS for MySQL instance from a shared proxy to a dedicated proxy.

Dedicated proxy and general-purpose proxy

After you change the network type of your RDS instance, the database proxy endpoint remains unchanged. For more information, see What are database proxies?

You can create database proxy endpoints of different network types. For example, you can create a database proxy endpoint of the classic network type and a database proxy endpoint of the VPC network type on the same RDS instance. For more information, see Manage the dedicated proxy endpoints of an ApsaraDB RDS for MySQL instance.

Note

You can view the type of the proxy that is enabled for your RDS instance on the Database Proxy page in the ApsaraDB RDS console. For more information, see What are database proxies?

Network types

  • Classic network: RDS instances in the classic network are not isolated. To block unauthorized access to these instances, you must configure IP address whitelists or security groups.

  • Virtual private cloud (VPC): Each VPC is an isolated virtual network. VPCs are more secure than the classic network. We recommend that you select the VPC network type.

    You can customize route tables, CIDR blocks, and gateways for a VPC. In addition, you can connect your data center to a VPC by using Express Connect circuits or VPNs. The data center and the VPC comprise a virtual data center. You can use the virtual data center to migrate your workloads to the cloud with no downtime.

Note
  • You can select the classic or VPC network type and switch your RDS instance between these network types free of charge.

  • After you change the network type of your RDS instance, you must add IP addresses to the IP address whitelists of the required network types. This applies if your RDS instance runs in enhanced whitelist mode. For more information, see Use a database client or the CLI to connect to an ApsaraDB RDS for MySQL instance.

View the network type

  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.

Change the network type from classic network to VPC

Note

Your RDS instance resides in the classic network.

  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.

  3. Click Switch to VPC.

    Note

    If the preceding button cannot be found, check whether your RDS instance resides in the classic network.

  4. In the dialog box that appears, select a VPC and a vSwitch and specify whether to retain the classic network endpoint.

    • Select a VPC. We recommend that you select the VPC in which the required ECS instance resides. If the ECS instance and the RDS instance reside in different VPCs, these instances can communicate over an internal network only if you use Cloud Enterprise Network (CEN) or VPN Gateway to enable network communication between the VPCs of these instances. For more information, see Overview of CEN or Establish IPsec-VPN connections between two VPCs.

    • Select a vSwitch. If no vSwitches are available in the selected VPC, create a vSwitch in the zone where the RDS instance resides. For more information, see Create and manage a vSwitch.

    • Clear or select Reserve original classic endpoint.

      Scaling policy

      Description

      Clear Reserve original classic endpoint

      The classic network endpoint is not retained and changes to a VPC endpoint.

      When you change the network type from the classic network to a VPC, an instance switchover occurs and ECS instances that reside in the classic network are immediately disconnected from the RDS instance. For more information about the impacts of an instance switchover, see Impacts of an instance switchover.

      Select Reserve original classic endpoint

      The classic network endpoint is retained, and a new VPC endpoint is generated. In this case, the RDS instance runs in hybrid access mode. ECS instances in the classic network and ECS instances in VPCs can connect to the RDS instance over an internal network. For more information, see Configure the hybrid access solution for an ApsaraDB RDS for MySQL instance.

      When you change the network type from classic network to VPC, no instance switchovers occur. The connection between each ECS instance of the classic network type and the RDS instance remains available until the classic network endpoint expires.

      Before the classic network endpoint expires, add the VPC endpoint to your application that runs on an ECS instance. This allows ApsaraDB RDS to migrate your workloads to the selected VPC with no downtime.

      For more information, see Configure the hybrid access solution.

  5. Add the private IP address of the required ECS instance of the VPC network type to an IP address whitelist of the VPC network type on the RDS instance. This way, the ECS instance can access the RDS instance over an internal network. If no IP address whitelists of the VPC network type are available, create one.

    Note

    You can go to the Instance Details tab of an ECS instance in the ECS console to view the private IP address of the ECS instance.

  6. Add the VPC endpoint of your RDS instance to the required ECS instance.

    • If you selected Reserve original classic endpoint, you must add the VPC endpoint to your application that runs on an ECS instance before the classic network endpoint expires.

    • If you cleared Reserve original classic endpoint, the connection between each ECS instance of the classic network type and the RDS instance over an internal network is immediately closed after the network type is changed. You must add the VPC endpoint of the RDS instance to your application that runs on the ECS instance.

    Note

    If the RDS instance resides in a VPC and you want to connect a classic network-hosted ECS instance to the RDS instance over an internal network, you can use ClassicLink to establish a connection. Alternatively, you can migrate the ECS instance to the same VPC as the RDS instance. For more information, see Overview of ClassicLink.

Change the VPC of an RDS instance

  • If your RDS instance supports changes to VPCs and vSwitches, you can directly change the VPC of the RDS instance. For more information, see Change the VPC and vSwitch.

  • If your RDS instance runs a minor engine version earlier than 20201031 and uses cloud disks, you cannot directly change the VPC of the RDS instance. If you want to change the VPC of the RDS instance, use the following methods:

Related operations

Operation

Description

ModifyDBInstanceNetworkType

Changes the network type of an ApsaraDB RDS instance.