All Products
Search
Document Center

ApsaraDB for MongoDB:Change the configurations of a replica set instance

Last Updated:Dec 20, 2023

This topic describes how to change the configurations of a replica set instance. If an existing replica set instance no longer meets your business requirements, you can change the configurations of the instance.

Billing rules

For more information, see Configuration change fees.

Limits

  • If your instance has only Classic Network and VPC endpoints, you must apply for a public endpoint or release the classic network endpoint for the instance before you change the value of the Read-only Nodes parameter.

    Note

    You can go to the Database Connections page to view the types of networks that are enabled.

  • When you change the configurations of an instance, you cannot reduce the storage capacity of the instance. To reduce the storage capacity of the instance, you can create an instance and restore data stored in the existing instance to the new instance. For more information, see Overview.

  • When you change the configurations of an instance, the architecture or storage engine of the instance cannot be changed. For example, you cannot change a replica set instance into a sharded cluster one. To change the architecture or storage engine of the instance, you can create an instance and restore data stored in the existing instance to the new instance. For more information, see Overview.

Precautions

  • The amount of time required to perform a configuration change depends on factors such as the network conditions, task queue status, and data volume. We recommend that you change the configurations of an instance during off-peak hours and make sure that your application is configured to automatically reconnect to the instance.

  • If you scale up only the storage capacity of a general-purpose or dedicated instance that uses local disks and resides in a physical device that has sufficient resources, the scale-up is performed on the device without cross-host migration or switchover. The configuration change immediately takes effect regardless of the specified maintenance window and does not cause disconnections.

  • If you scale up only the storage capacity of an instance that uses cloud disks, the configuration change immediately takes effect regardless of the specified maintenance window and does not cause disconnections.

  • During a configuration change, you may experience one or two transient connections. Each transient connection lasts about 30 seconds. The Switching Time parameter specifies the time at which you want to apply the configuration change. You can set the parameter to an off-peak period of time to prevent service interruptions.

  • Configuration changes do not cause data loss.

  • If the minor version of an instance expires or is no longer maintained, ApsaraDB for MongoDB automatically updates the minor version of the instance to the latest version when you change the configurations of the instance.

Procedure

  1. Log on to the ApsaraDB for MongoDB console .

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

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

  4. Click the ID of the instance that you want to manage to go to the Basic Information page.

  5. Go to the page on which you can change the configurations of the instance. The available methods that you can use to change configurations vary with the billing method of the instance.

    • Subscription

      In the upper-right corner of the Specifications section, click Upgrade or Downgrade.

    • Pay-as-you-go

      In the upper-right corner of the Specifications section, click Change Configuration.

  6. Configure the parameters described in the following table.

    Change type

    Parameter

    Description

    • Upgrade

    • Downgrade

    Active-standby Nodes

    The number of nodes that can be selected when you change the configurations of the instance. Valid values:

    • Three Nodes Replicaset: cannot be downgraded.

    • Five Nodes Replicaset: can be downgraded to Three Nodes Replicaset.

    • Seven Nodes Replicaset: can be downgraded to Three Nodes Replicaset or Five Nodes Replicaset.

    Read-only Nodes

    The number of read-only nodes that can be selected when you change the configurations of the instance. Valid values: 0 to 5.

    If the instance has only classic network and VPC endpoints, you cannot configure this parameter. You can go to the Database Connections page to view the types of networks that are enabled.

    Specifications

    The new specifications of the instance. For more information about the specifications supported by replica set instances, see Instance types.

    Storage

    The storage capacity that can be selected when you change the configurations of the instance.

    Note
    • When you change the configurations of an instance, you cannot reduce the storage capacity of the instance. To reduce the storage capacity of the instance, you can create an instance and restore data stored in the existing instance to the new instance. For more information, see Overview.

    • This parameter specifies the storage capacity of each node, but not the total storage capacity of all nodes.

    Switching Time

    The time at which you want to apply the configuration change. Valid values:

    • Switch Immediately After Data Migration: ApsaraDB for MongoDB applies the configuration change immediately after you complete configuration change settings.

    • Switch Within Maintenance Window: ApsaraDB for MongoDB applies the configuration change within the maintenance window that you specify. You can use the current maintenance window or specify a new maintenance window by using the following method:

      1. Click Modify next to Switch Within Maintenance Window.

      2. In the Specification Information section, click Edit next to Maintenance Period to specify a maintenance window. For more information, see Specify a maintenance window.

    Note
    • If you scale up only the storage capacity of a general-purpose or dedicated instance that uses local disks and resides in a physical device that has sufficient resources, the scale-up is performed on the device without cross-host migration or switchover. The configuration change immediately takes effect regardless of the specified maintenance window and does not cause disconnections.

    • If you scale up only the storage capacity of an instance that uses cloud disks, the configuration change immediately takes effect regardless of the specified maintenance window and does not cause disconnections.

  7. Perform the corresponding operations based on the selected billing method.

    • If the billing method is pay-as-you-go, read and select MongoDB Replica Set (Pay-as-you-go) Terms of Service. Then, click Buy Now and the system automatically collects the amount in the next hour.

    • If the billing method is subscription, read and select MongoDB Replica Set (Subscription) Terms of Service, and click Buy Now. Then, complete the payment on the Purchase page.

    When the configuration change is being applied, the replica set instance is in the Changing Configuration state. When the configuration change is complete, the state of the instance changes to Running.

Related API operations

Operation

Description

ModifyDBInstanceSpec

Changes the specifications or storage space of a standalone, replica set, or serverless instance.