All Products
Search
Document Center

ApsaraDB for MongoDB:Configure a hybrid access solution to switch the network type of an ApsaraDB for MongoDB instance from classic network to VPC

Last Updated:Feb 06, 2024

This topic describes how to configure a hybrid access solution to switch the network type of an ApsaraDB for MongoDB instance from classic network to Virtual Private Network (VPC) without transient connection and network interruptions.

Prerequisites

  • The ApsaraDB for MongoDB instance is a replica set instance or sharded cluster instance that runs MongoDB 4.2 or earlier and uses local disks. The protocol type of the sharded cluster instance is MongoDB.

  • The instance resides in the classic network.

  • A VPC is created in the same region as the ApsaraDB for MongoDB instance. For more information, see Create a VPC and Create a vSwitch.

Background information

  • In hybrid network access mode, you cannot switch the network type to classic network.

  • When you switch the network type of an ApsaraDB for MongoDB instance from classic network to VPC, you can choose to retain the internal endpoints on the classic network for up to 120 days. In hybrid network access mode, the instance supports access from Elastic Compute Service (ECS) instances in both the classic network and VPCs.

  • In hybrid network access mode, you can switch the network types of ECS instances and other Alibaba Cloud services from classic network to VPC until all services are deployed in VPCs.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.

  2. In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances.

  3. In the upper-left corner of the page, select the resource group and region to which the instance belongs.

  4. Click the ID of the instance that you want to manage or find the instance and click Manage in the Actions column.

  5. In the left-side navigation pane of the page that appears, click Database Connections.

  6. In the Internal Connections section, click Switch to VPC.

  7. In the VPC panel, configure the parameters described in the following table.

    Parameter

    Description

    VPC

    Select the ID of an existing VPC.

    VSwitch

    Select the ID of an existing vSwitch.

    Retain the connection address of the classic network

    Specify whether to retain the original endpoint of the classic network for the ApsaraDB for MongoDB instance.

    Expiration Time (Days)

    Select the period of time after which the classic network expires. Valid values:

    • 14

    • 30

    • 60

    • 120

  8. Click OK.