You can horizontally scale your Atlas deployment by sharding your cluster. Sharding allows you to distribute your data across multiple nodes or shards to efficiently handle growing data and workloads. To learn more, see Sharding. If your shard reaches capacity, you can configure autoscaling to independently scale your shards.
Considerations
When you configure shard scaling, keep the following in mind:
The number of electable, read-only, and analytic nodes on all shards must be the same.
For Global clusters, you can have a different number of nodes per zone.
The storage capacity on all shards must be the same.
The NVME tier on all shards must be the same.
If you enable compute auto-scaler:
The minimum and maximum tier applies at the cluster level.
The Atlas auto-scaler only allows a maximum of 2 tier gap between the shard with the highest cluster tier and the shard with the lowest cluster tier.
Note
You can't configure auto-scaling for each shard if the shards are on different cluster class. For example, you can't enable auto-scaling if one shard is on
M30
(General) and another shard is onM40
(Low-CPU).
Independent Shard Scaling
Independent shard scaling allows you to configure each shard separately to better meet the workload requirements of each shard. You can configure the cluster tier of each individual shard for a customized and optimized allocation of resources and cost for each shard. That is, on each shard, your electable and read-only nodes can be on a different cluster tier than analytic nodes. On AWS and Azure, you can also configure disk performance for each shard.
For example, for one shard, you can configure your electable and
read-only nodes (3 nodes) on M30
and analytics nodes (1 node) on
M40
while for another shard, you can configure your electable and
read-only nodes (3 nodes) on M40
and analytics nodes (1 node) on
M30
.
You can use the Atlas Cluster Builder UI to shard your cluster. Once your cluster is sharded, you can use the latest version of the Atlas Admin API, Atlas CLI, or HashiCorp Terraform MongoDB Atlas Provider to scale each shard independently. You can't use the Atlas UI to scale each shard independently. However, you can enable compute auto-scaling in the Atlas UI for shards to scale independently.
After you scale each shard independently using the Atlas Administration API, Atlas CLI, or Terraform, you can't manage your cluster by using the Atlas Cluster Builder UI.
Cluster Tier Scaling
You can use the Atlas Administration API, Atlas CLI, or Terraform to choose a different tier per shard. Analytics Nodes can also have independently selected tiers on all shards.
When you edit a sharded cluster with multiple shard tiers from the Atlas UI, changing the tier will change the tier of all shards.
IOPS
You can use the Atlas Administration API to specify different IOPS for each shard.
If your cluster is on AWS, choose between Standard IOPS and Provisioned IOPS for each shard. If a shard uses Provisioned IOPS, you can provision different IOPS for each shard. If a shard uses Standard IOPS, the Standard IOPS is tied to the storage size of the cluster.
If your cluster is on Azure in regions that support Extended Standard IOPS, you can provision different Standard IOPS for each shard. Otherwise, the Standard IOPS is tied to the storage size of the cluster's disk.
Cluster-Wide Shard Scaling
All shards in an Atlas cluster can scale uniformly to the same cluster tier. By default, sharded clusters created before Dec 9, 2024 use cluster-wide shard scaling. If you manage your cluster using Atlas Administration API, Atlas CLI, or Terraform, upgrade your Atlas Administration API, Atlas CLI, or Terraform to independently scale your shards. If you use the Atlas UI and you enabled compute autoscaling, to independently scale your shards, contact MongoDB support.
To learn more about sharding your M30
or larger cluster, see
Deploy a Sharded Cluster and
Modify the Number of Shards.