Atlas limits how many of each kind of component you can create, and the number of connections allowed to clusters. For clusters, the number of connections allowed is based on cluster tier. The following tables outline component and connection limits.
Important
If any of these limits present a problem for your organization, contact Atlas support.
Cluster Limits
Component | Limit |
|---|---|
30 | |
Shards in Single-region clusters | No hard limit, but contact MongoDB Support for more than 80 shards. |
Cross-region network permissions for a Multi-Region Cluster | 100 The total number of nodes between any two regions in a project must not exceed 100. You can't create a multi-region cluster if the project already has clusters with 100 or more cross-region nodes. |
Electable Nodes per Replica Set or Shard | 7 An Atlas Infinite cluster has exactly two electable nodes, and no more than seven nodes in total. To learn more, see Replication and Failover. |
Config Server Tier (minimum and maximum) |
|
Connection Limits and Cluster Tier
Atlas sets the limits for concurrent incoming connections based on the tier and class of your cluster. The net.maxIncomingConnections setting caps the total number of incoming connections that a node holds open at one time.
Atlas connection limits apply per node. For sharded clusters, Atlas connection limits apply per mongos router. The number of mongos routers is equal to the number of replica set nodes across all shards.
The following example describes an Atlas Core cluster. An Atlas Infinite cluster has two electable nodes, so the number of nodes that can serve reads depends on the read-only and analytics nodes that you add.
Atlas Infinite clusters use M10 through M60 cluster tiers, so the limits for larger tiers don't apply to them.
Example
Your M10 Atlas Core cluster has three nodes with a 1500 connection limit per node. Atlas reserves 10 connections per node. If you set your read preference to secondary, Atlas can read from the two secondary nodes for a combined 2980 connection limit.
For example, if you have a three-node M10 cluster with a 1500 connection limit per node, Atlas reserves 10 connections per node. If you set your read preference to secondary, Atlas can read from the two secondary nodes for a combined 2980 connection limit.
The cluster connection limits are enforced for AWS only when connecting over private link for clusters on the supported versions:
8.1 and v8.1.0+
8.0 and v8.0.10+
7.0 and v7.0.22+
Note
Atlas reserves a small number of connections to each Atlas cluster for supporting Atlas services. To learn more about Atlas reserved connections, contact Atlas support.
Choose your cloud provider to view the connection limits for each cluster tier and class:
Increase Connection Limit
Note
Atlas scales on memory and compute use, not on connections. However, increased active connections may increase load, which may create need to scale your cluster if other solutions are not viable.
If you are nearing or have reached the maximum number of connections your Atlas cluster can handle, choose one of the following options to redistribute connections or increase your limit:
Tune your application to optimize connection usage.
Enable connection pooling in your application.
Enable cluster auto-scaling to automatically scale your application as needed. This option is particularly helpful if your application dynamically creates additional connections. An elastic database worker pool would be an example of such an application.
Permanently scale your cluster tier.
Connection Rate Limits
Atlas applies connection rate limits to protect cluster availability and ensure optimal performance. A connection rate limit restricts the number of new incoming connections that each node in the cluster can accept per second. This limit is separate from the maximum number of connections that a node can hold open at one time, which is described in Connection Limits and Cluster Tier.
When a node reaches its connection rate limit, Atlas queues new connection attempts. If the period of overload is sustained, Atlas drops some connections. This behavior maintains cluster availability by preventing connection overload.
Whether connection rate limits apply depends on your cluster tier and MongoDB version:
M10andM20cluster tiers: always on.M30and higher cluster tiers running MongoDB 9.0 or later: always on.M30and higher cluster tiers running MongoDB versions earlier than 9.0: always off.
The following tables outline the connection rate limits for each cluster tier and storage class across all cloud providers:
Cluster Tier | Maximum New Connections Per Second Per Node |
|---|---|
| 15 |
| 15 |
| 24 |
| 85 |
| 170 |
| 320 |
| 1000 |
| 600 |
| 1360 |
| 1450 |
| 1500 |
| 1600 |
Cluster Tier | Maximum New Connections Per Second Per Node |
|---|---|
| 24 |
| 85 |
| 170 |
| 320 |
| 1000 |
| 1360 |
| 1450 |
| 1500 |
| 1600 |
Cluster Tier | Maximum New Connections Per Second Per Node |
|---|---|
| 24 |
| 85 |
| 170 |
| 320 |
| 1000 |
| 1360 |
| 1450 |
| 1500 |
Connection rate limits don't include connections from Atlas internal services.
Collection and Index Limits
This section applies to Atlas Core clusters.
While there is no hard limit on the number of collections in a single cluster, the performance of a cluster might degrade if it serves a large number of collections and indexes. Larger collections have a greater impact on performance.
The recommended maximum combined number of collections and indexes by Atlas cluster tier are as follows:
Cluster tier | Recommended maximum |
|---|---|
M10 | 5,000 collections and indexes |
M20 / M30 | 10,000 collections and indexes |
M40+ | 100,000 collections and indexes |
If you exceed the recommended maximum number of collections and indexes, database operations might run more slowly. Checkpoints take longer to complete, which reduces operation speed. In some cases, operations can stall if your usage exceeds your system's ulimit settings, which set limitations on the number of system resources that you can use.
Tip
To learn more about ulimit settings, see UNIX ulimit Settings for Self-Managed Deployments in the MongoDB Server Manual.
The performance impact of exceeding the recommended maximum resource number depends your collection usage. Performance impacts are more likely if you use the majority of the existing collections consistently.
Increase Collection and Index Limits
If you need to increase the number of collections or indexes in your Atlas cluster, consider upgrading your cluster tier.
MongoDB Search Index Limits
This section applies to Atlas Core clusters.
A high index count generates significant load on the base cluster and might disrupt your workload. The number of indexes your cluster can support depends on your cluster tier and workload. Smaller cluster tiers like M10 can experience performance degradation or out-of-memory errors as index count increases. Start with a small number of indexes and monitor your cluster's resource usage as you scale.
Organization and Project Limits
Component | Limit |
|---|---|
Database Users per Atlas Project | 100 |
Atlas Users per Atlas Project | 500 |
Atlas Users per Atlas Organization | 500 |
API Keys per Atlas Organization | 500 |
Access List Entries per Atlas Project | 200 |
Users per Atlas Team | 250 |
Teams per Atlas Project | 100 |
Teams per Atlas Organization | 250 |
Teams per Atlas User | 100 |
Organizations per Atlas User | 250 |
Linked Organizations per Atlas Paying Organization | 250 |
Clusters per Atlas Project | 25 |
Projects per Atlas User | 250 |
Projects per Atlas Organization | 250 |
Custom MongoDB roles per Atlas Project | 100 |
Assigned Custom Roles per Database User | 20 |
Federated database instances per Atlas Project | 25 |
Total Network Peering Connections per Atlas Project | 50 Atlas limits the number of nodes per Network Peering connection based on the CIDR block and the region selected for the project. |
Pending Network Peering Connections per Atlas Project | 25 |
AWS PrivateLink Addressable Target Nodes per Region | 50 |
Azure Private Link Addressable Target Nodes per Region | 150 |
Google Cloud GCP Private Service Connect Addressable Target Nodes per Region | 50 |
Global Cluster shard keys per Atlas Project | 40 |
Note
Addressable Target Nodes refer to the maximum number of MongoDB nodes that can be accessed through private endpoints per project, per region. Target nodes include mongod instances in replica sets, mongos instances in sharded clusters, and BI Connector for Atlas instances across all dedicated clusters in the project.
You can deploy only one Free cluster (formerly known as M0) per project. However, if you have sales contracts with MongoDB, you might be able to deploy more Free clusters per project. To learn more, contact a MongoDB sales representative.
Label Limits
Atlas limits the length of particular labels for components.
Component | Character Limit | RegEx Pattern |
|---|---|---|
Cluster Name | 64 [1] |
|
Project Name | 64 |
|
Organization Name | 64 |
|
API Key Description | 250 |
| [1] | If you have peering-only mode enabled, the cluster name character limit is 23. |
| [2] | Atlas uses the first 23 characters of a cluster name. These characters must be unique within the containing project. Cluster names with fewer than 23 characters can't end with a hyphen (-). Cluster names with more than 23 characters can't have a hyphen as the 23rd character. |
| [3] | (1, 2) Organization and Project names can include any Unicode letter or number plus the following punctuation: -_.(),:&@+'. |
Database User Privilege Limits
To learn more about unsupported commands, see the unsupported commands for free and flex clusters and paid clusters.
Multi-Cloud Deployment Limits
This section applies to Atlas Core clusters.
Multi-cloud deployments have different limits. To learn more, see Multi-Cloud Deployment Limits.