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 VPC.
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.
After a configuration change task is placed, it cannot be canceled directly. To restore the original configuration, wait for the current configuration change task to complete, and then initiate a reverse configuration change, such as a downgrade.
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.
NoteStorage 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.
For a cloud disk instance, click Upgrade if you only need to expand the storage space. The expansion takes effect immediately and does not interrupt services.
Use Change Disk Type only to convert an ESSD disk to an ESSD AutoPL disk. Do not use it for storage-only expansion.
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.
NoteFor 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 complete the payment as prompted.
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.
FAQ
Is high availability maintained during a cross-host configuration change of a local disk instance?
Yes. High availability (HA) is maintained during the migration of a hidden node. If the primary node fails, the replica set can elect another primary node and continue to provide read and write services. A hidden node cannot become the primary node, but it participates in voting. The system triggers an HA switchover to prioritize the availability of the primary node.
How is data synchronized during an ApsaraDB for MongoDB configuration change?
Data synchronization combines file-level copy with asynchronous oplog replication. Configure an oplog retention period of at least 24 hours, and ensure that it meets the following formula: Retention Period (hours) ≥ Used Data Space (GB) / 10 (GB/hour). Otherwise, oplog entries can be overwritten during migrations that involve large data volumes, which causes synchronization to fail. The underlying system has a retry mechanism, but you must provide a sufficient oplog retention window.
Related APIs
|
API |
Description |
|
Changes the instance specification or storage capacity of an ApsaraDB for MongoDB standalone or replica set instance. |