Scale an ApsaraDB for MongoDB replica set instance up or down by modifying its configuration.
Billing
Limitations
-
To change the number of read-only nodes on an instance in a Classic Network, first enable a public endpoint or switch to a Read-only Nodes.
-
Storage space cannot be decreased during a configuration change. Instead, create a new instance with smaller storage and migrate your data. Scenarios and solutions for other configuration changes.
-
Instance type (for example, replica set to sharded cluster) and storage type cannot be changed during a configuration change. Instead, create a new instance and migrate your data. Scenarios and solutions for other configuration changes.
Considerations
-
Configuration change duration depends on network conditions, queue length, and data volume. Perform this operation during off-peak hours and ensure your application supports automatic reconnection.
-
For General-purpose or Dedicated local disk instances, storage-only expansions are performed in place if the host has sufficient resources. This avoids cross-host migration and service switchovers, and takes effect immediately without connection interruptions, regardless of the switchover time setting.
-
For cloud disk instances, storage-only expansions take effect immediately without connection interruptions, regardless of the switchover time setting.
-
Expect one or two brief disconnections of about 30 seconds each during the change. To reduce impact, schedule the change using the Switch time option.
-
A configuration change does not cause data loss.
-
Modifying a local disk instance automatically upgrades its minor database version to the latest version.
-
Local disk instance modifications take significantly longer than cloud disk modifications, which typically complete within one hour.
Procedure
-
Navigate to the ApsaraDB for MongoDB Replica Set Instances page, select a resource group and region at the top, and then click the ID of the target instance.
-
In the Specification Information section, open the configuration change page based on your billing method.
-
Subscription instances
In the upper-right corner of the Specification Information section, click Upgrade or Downgrade.
-
Pay-as-you-go instances
In the upper-right corner of the Specification Information section, click Change Configurations.
-
-
On the configuration change page, configure the following parameters.
Change type
Parameter
Description
-
Upgrade
-
Downgrade
Active-standby Nodes
The number of primary and secondary nodes. Valid values:
-
Three Replica Set Nodes: Downgrades are not supported.
-
5: You can downgrade to a Three Replica Set Nodes instance.
-
7: You can downgrade to a Three Replica Set Nodes or 5 instance.
Read-only Nodes
The number of read-only nodes. Valid values: 0 to 5.
Specifications
The instance class. For supported replica set instance classes, see Instance types.
Storage Space
The storage space of the instance.
Note-
Storage space cannot be decreased during a configuration change. Instead, create a new instance with smaller storage and migrate your data. Scenarios and solutions for other configuration changes.
-
Storage space is the capacity per node, not the total across all nodes.
Switch time
Select when the configuration change takes effect.
-
Switch Immediately After Data Migration: Applies the change immediately after data migration completes.
-
Switch Within Maintenance Window: Applies the change within the maintenance window. You can keep the current window or set a new one.
-
Click Switch Within Maintenance Window next to Modify.
-
In the Specification Information section, click Maintenance Window next to Edit to set the switchover time. Set a maintenance window.
-
Note-
For General-purpose or Dedicated local disk instances, storage-only expansions are performed in place if the host has sufficient resources. This avoids cross-host migration and service switchovers, and takes effect immediately without connection interruptions, regardless of the switchover time setting.
-
For cloud disk instances, storage-only expansions take effect immediately without connection interruptions, regardless of the switchover time setting.
-
Read and agree to the terms of service, click Buy Now, and then follow the on-screen instructions to complete the payment.
During the configuration change, the instance status is In the process of matching. When the status changes to Running, the configuration change is complete and the new configuration takes effect.
Related APIs
API | Description |
Changes the instance specification or storage capacity of an ApsaraDB for MongoDB standalone or replica set instance. |