For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Auto-Scaling for Cluster Storage

This page covers cluster storage on each database edition. How storage grows depends on the edition. On an Atlas Core cluster, Atlas auto-scales the storage attached to each node. On an Atlas Infinite cluster, storage grows with your data.

For cluster tier auto-scaling, which applies to both database editions, see Compute Auto-Scaling on Atlas Core and Compute Auto-Scaling on Atlas Infinite.

Atlas uses storage auto-scaling to help you automatically increase your cluster storage capacity. The following sections describe how Atlas scales storage on an Atlas Core cluster and how storage scaling can change the cluster tier.

This section applies to Atlas Core clusters. On an Atlas Core cluster, cluster storage is the disk attached to each node, and diskSizeGB sets its size. Atlas enables cluster storage auto-scaling by default. Atlas automatically increases cluster storage when disk space used reaches 90% for any node in the cluster.

To opt out of cluster storage scaling, un-check the Storage Scaling checkbox in the Auto-scale section.

The following considerations apply:

  • Atlas auto-scales cluster storage up only. You can manually reduce your cluster storage from the Edit Cluster page.

  • On AWS, Azure, and GCP clusters, Atlas increases cluster storage capacity to achieve 70% disk space used. To learn more, see Change Storage Capacity or IOPS on AWS, Change Storage Capacity and IOPS on Azure, and Change Storage Capacity on Google Cloud.

  • Avoid high-speed write activity if you plan to scale up clusters. Scaling up a cluster to greater storage capacity requires sufficient time to prepare and copy data to new disks. If a cluster receives a burst of high-speed write activity, such as a bulk insert, automatic scaling might not occur due to a temporary spike in disk storage capacity. To reduce the risk of running out of disk storage, plan to scale up clusters in advance of bulk inserts and other instances of high-speed write activity.

  • Atlas disables disk auto-scaling if you specify one cluster tier class for the base nodes and another, different cluster tier class for the analytics nodes. For example, if you specify a General cluster class for operational nodes in the Base Tier, and a Low-CPU cluster class for analytics nodes in the Analytics Tier, Atlas disables disk auto-scaling with the following error message: Disk auto-scaling is not yet available for clusters with mixed instance classes.

  • After disk auto-scaling triggers, subsequent disk auto-scaling and manual disk scaling may be unavailable for a few hours.

Note

This section applies to Atlas Core only.

This section describes Atlas Core cluster behavior. Because storage doesn't scale on Atlas Infinite clusters, this parallel scaling behavior doesn't apply to them. To learn more, see Compute Auto-Scaling on Atlas Infinite.

When Atlas attempts to automatically scale your cluster storage capacity as part of auto-scaling, it might need to scale your storage outside of the bounds that your current cluster tier supports. To help ensure that your cluster doesn't experience any downtime, Atlas scales your cluster tier (in addition to cluster storage) to accommodate the new storage capacity.

Note

In an auto-scaling event, Atlas might increase the cluster tier even if Cluster Tier Scaling is disabled, if the current tier doesn't have the required storage capacity.

On Azure, if you enable auto-scaling on a cluster deployed in one of the regions that support Extended Storage/IOPS, and the current IOPS is lower than the default IOPS for the auto-scaled disk size, Atlas increases the alloted number of IOPS in the IOPS slider and notifies you in the UI. To learn more, see Configure Extended Storage/IOPS on Azure.

Example

The maximum storage capacity for an M30 cluster is 480 GB. If you have an M30 cluster with the maximum storage allocated and your disk space used reaches 90%, a storage auto-scaling event requires raising your storage capacity to 600 GB. In this case, Atlas scales your cluster tier up to M40 because this is the lowest cluster tier that can support the new required storage capacity. On Azure, if you deployed the cluster in one of the regions that support Extended Storage/IOPS, Atlas also automatically increases IOPS to match the IOPS level for that tier's cluster. To learn more, see Configure Extended Storage/IOPS on Azure.

In the event that your specified maximum cluster tier can't support the new storage capacity, Atlas:

  1. Raises your maximum cluster tier to the next lowest tier that can accommodate the new storage capacity.

  2. Scales your cluster tier to that new maximum tier.

Note

When Atlas overrides your maximum cluster tier, it also disables your cluster from automatically scaling down. To re-enable downward auto-scaling, configure it in Cluster Settings. See also Considerations for Downward Scaling of Cluster Tier.

If Atlas attempts to scale your cluster tier down and the target tier can't support your current disk capacity, provisioned IOPS, or both, Atlas doesn't scale your cluster down. In this scenario, Atlas updates your auto-scaling settings based on the relationship between your current cluster tier and the configured maximum cluster tier:

  • If the cluster is currently at the configured maximum cluster tier, Atlas disables the cluster from automatically scaling down because all smaller tiers wouldn't be able to accommodate the necessary storage settings. If you want to re-enable downward auto-scaling, you must do so manually from your Cluster Settings.

  • If the cluster isn't currently at the configured maximum cluster tier, Atlas raises the minimum cluster tier to the current cluster tier. In this case, Atlas doesn't disable downward auto-scaling.

This auto-scaling logic reduces the downtime in cases when your storage settings don't match your workload.

On an Atlas Core cluster, depending on whether you choose to use storage auto-scaling, Atlas manages the oplog entries based on either the minimum oplog retention window, or the oplog size. To learn more, see Oplog Size Behavior. Atlas enables storage auto-scaling by default.

Storage on an Atlas Infinite cluster grows with your data, so there is no storage auto-scaling to configure or opt out of. To control costs, you set a maximum storage size when you create or modify the cluster. Atlas blocks writes when the cluster reaches that limit.

Important

During public preview, Atlas might throttle writes before your cluster reaches the limit that you set, to preserve system availability. If this happens, contact MongoDB Support through chat or by opening a support case. To learn more, see Request Support.