Navigation

Create a Cluster

Atlas-managed MongoDB deployments, or “clusters”, can be either a replica set or a sharded cluster. All Atlas clusters run using the WiredTiger storage engine.

Atlas provides an option to deploy one Free Tier replica set per project. Free Tier clusters use Atlas M0 instances and provide access to a subset of Atlas features and functionality. They are an ideal development sandbox. You can upgrade an M0 Free Tier cluster to an M2+ paid cluster at any time.

M2 and M5 instances are low-cost shared starter clusters with the same features as and functionality as M0, but with increased storage and the ability to deploy into a subset of regions on Amazon Web Service (AWS), Google Cloud Platform (GCP), and Microsoft Azure.

For a complete list of M0 (Free Tier), M2, and M5 limitations, see Atlas M0 (Free Tier), M2, and M5 Limitations.

Atlas M10 and larger instances are dedicated clusters that provide full access to Atlas features, configuration options, and operational capabilities.

An Atlas project can have multiple M2+ MongoDB clusters. M0, M2, and M5 are appropriate for starter environments. M10 and M20 instances are appropriate for low-traffic websites and applications. M30 or larger instances should be used for high-traffic websites, large data sets, and sharded clusters.

Beta

Support for M2 and M5 clusters is available as a Beta feature. These clusters do not yet support backups.

The following table highlights key differences between an M0 Free Tier cluster, an M2 or M5 shared starter cluster, and an M10+ dedicated cluster.

  Free Tier Cluster (M0) Shared Starter Cluster (M2 and M5) Dedicated Cluster (M10 and larger)
Storage
512 MB
M2: 2 GB
M5: 5 GB
10 - 1000 GB
Data Visualization No No Atlas Data Explorer
Metrics Limited Limited Full metrics, including the Real Time Performance Tab
VPC Peering (AWS clusters only) No No VPC Peering Connection wizard
Global Region Selection Atlas supports deploying M0 instances in a subset of regions in AWS only. Atlas supports deploying M2 and M5 clusters in a subset of regions in AWS, GCP, and Azure. Atlas supports deploying clusters globally on Amazon Web Services, Google Cloud Platform, and Microsoft Azure
Cross-Region Deployments No No Yes. Specify additional regions for high availability or local reads when creating or scaling a cluster.
Backups No No Yes, including queryable backups
Sharding No No Yes, for clusters using an M30+ instance
Dedicated Instance No, M0 Free Tier clusters run in a shared environment No, M2 and M5 clusters run in a shared environment Yes, M10+ clusters deploy each mongod process to its own instance.
Performance Advisor No No Yes

Create a Cluster

Before creating a cluster, check that you have the correct organization and project selected. Click the Context drop down in the top left corner to select a specific organization or project. For more information on creating and managing organizations and projects, see Organizations and Projects.

Important

Atlas supports creating VPC peering connections between your Atlas dedicated M10+ clusters and other AWS VPCs in the same region.

If this is the first M10+ dedicated paid cluster for the selected region or regions and you plan on creating one or more VPC peering connections, please review the documentation on VPC Peering Connections before continuing.

Atlas Configuration Options

Cluster Name The name of your cluster
MongoDB Version The MongoDB version of the cluster
Cloud Provider and Region

The Cloud Provider and region where Atlas deploys cluster.

For clusters with Instance Size of M10 or greater, you can specify additional regions to distribute your cluster across for high availability or local reads.

Instance Size The instance size of the cluster.
Replication Factor

The number of replica set nodes in the cluster. For sharded clusters, the number of replica set nodes in each shard.

Only available for clusters with an Instance Size of M10 or larger. Clusters with an Instance Size smaller than M10 have a fixed replication factor of 3

Do you want a sharded cluster? Deploys a sharded cluster. Only available for clusters with an Instance Size of M10 or larger.
Number of shards Configure the number of shards in the sharded cluster. This field appears only if the deployment is a sharded cluster.
Do you want to enable backup? Enables backup for the cluster. Only available for clusters with an Instance Size of M10 or larger.
Admin Username & Password Create the MongoDB administrative user for the cluster. Only visible if no other MongoDB users exist for the Atlas project.
Enter your payment information and deploy Enter your payment information and deploy your cluster.
Connect to your cluster Connect to your new cluster.

Walkthrough

The following sections provide a walkthrough of the cluster creation process, as well as complete documentation for each of the Atlas cluster configuration options.

A. Open the Build Your New Cluster modal

Go to the Clusters view and click the Add New Cluster or Build a New Cluster button to display the Build Your New Cluster modal. As you build your cluster, Atlas displays the associated costs.

B. Enter the Cluster Name

This is the cluster name as it appears in Atlas. You cannot change the cluster name once Atlas deploys the cluster.

C. Select the MongoDB Version of the cluster

The MongoDB version [1] for your cluster. Atlas always deploys the cluster with the latest stable release of the specified version.

Atlas supports creating M10+ paid tier clusters with the following MongoDB versions:

  • MongoDB 3.2
  • MongoDB 3.4
  • MongoDB 3.6

M0 Free Tier and M2/M5 shared tier clusters only support MongoDB 3.4.

As new maintenance releases become available, Atlas automatically upgrades to these releases via a rolling process to maintain cluster availability.

You can upgrade an existing Atlas cluster to a newer major MongoDB version, if available, when you scale a cluster. However, you cannot downgrade a cluster’s MongoDB version.

D. Select the Cloud Provider and Region of the cluster

The cloud provider and region, or physical location, of your MongoDB cluster. The choice of cloud provider and region affects the configuration options for the available instance sizes, network latency for clients accessing your cluster, and the cost of running the cluster.

For clusters with Instance Size of M10 or greater, you can specify additional regions to distribute your cluster across for high availability or local reads.

AWS Only

If this is the first M10+ dedicated paid cluster for the selected region or regions and you plan on creating one or more VPC peering connections, please review the documentation on VPC Peering Connections before continuing.

To deploy a cross-region cluster, click Enable cross-region configuration options. Cross-region clusters deploy with each node using the same configuration options as specified during cluster configuration.

Note

Having a large number of regions or having nodes spread across long distances may lead to long election times or replication lag.

Important

For a given region in an Atlas project with multi-region clusters, the total sum of MongoDB nodes on all other regions in that project cannot exceed 40. This limit applies across all cloud service providers.

For example, if an Atlas project has 20 nodes in Region A and 20 nodes in Region B, you can deploy no more than 20 additional nodes in that project in any given region. This limit applies even if Region A and Region B are backed by different cloud service providers.

For Atlas projects where every cluster is deployed to a single region, you cannot create a multi-region cluster in that project if there are already 40 or more nodes in that single region.

The following options are available when configuring cross-region clusters, and are only available for clusters using an Instance Size of M10 or greater:

Deploy across multiple regions

Toggle this field to Yes to enable distributing your cluster across multiple regions in the specified cloud provider, increasing availability of a cluster during a partial or total region outage. By default Atlas displays a Preferred Region, which replaces the Region dropdown. The Preferred Region is the region Atlas places your primary node on deployment.

Backup Data Center Location

If this cluster is the first backup-enabled cluster in the project, Atlas selects the backup data center location for the project based on the geographical location of the cluster’s Preferred Region. See Backup a Cluster for more information.

Click Add Region to add a new row for region selection and select the region from the dropdown. Specify the desired number of Nodes for the region.

Each node in the region can participate in elections, and can become the primary as long as the majority of nodes in the replica set are available. The total number of electable nodes across all regions, excluding read-only regions, must be 3, 5, or 7.

You can also use this option to increase the replication factor of single-region clusters by modifying the number of Nodes for your Preferred Region only. You do not have to add additional regions to modify the replication factor of your Preferred Region.

To remove a region, click the X next to that region. You cannot remove the Preferred Region.

Atlas provides checks for whether your selected cross-regional configuration provides availability during partial or whole regional outages.

Deploy read-only replicas

Toggle this field to Yes to enable creating regions for deploying read-only nodes for facilitating local secondary reads.

Click Add Read-Only Region to add a new row for region selection and select the region from the dropdown. Specify the desired number of Nodes for the region.

Each node in the region cannot participate in elections, and cannot become the primary. Read-only regions do not provide high availability.

To remove a read-only region, click the X next to that region.

Regions marked as Recommended provide higher availability compared to other regions. For more information, see:

The number of availability zones, zones, or fault domains in a region has no affect on the number of MongoDB nodes Atlas can deploy. MongoDB Atlas clusters are always made of replica sets with a minimum of three MongoDB nodes.

E. Select the Instance Size of the cluster

The memory, storage, and IOPS specification for each data-bearing server [2] for your Atlas cluster.

Atlas provides various instance sizes to support different use cases:

  • For starter environments, M0, M2, and M5 instance sizes. These instances provide access to a subset of Atlas features and functionality. For a complete list of M0, M2, and M5 instance limitations, see Atlas M0 (Free Tier), M2, and M5 Limitations.
  • For low traffic websites and development, M10 and M20 instance sizes.
  • For production environments that support high traffic applications or large datasets, M30 or larger instances sizes.

For a sharded cluster, the selected instance size must be M30 or larger.

Each instance size comes with a default set of resources. Depending on the selected cloud service provider and instance size, Atlas can provide the following configuration options:

  • Custom Storage Capacity: The size of the server root volume. Changes to storage capacity affects cost.

  • Custom Storage Speed: The input/output operations per second (IOPS) the system can perform. Changes to storage speed affects cost.

  • Use encrypted storage volumes: Encrypts root volume for data at rest inside the volume and all data moving between the volume and the instance.

    As of July 11th, 2017, new Atlas clusters are encrypted by default.

  • Auto-Expand Storage: When disk usage reaches 90%, automatically increase storage. For AWS and GCP, increase storage by an amount necessary to achieve 70% utilization. For Azure, scale the cluster to the next available size. This option is available only for M10 and larger clusters.

    Note

    If the size of the cluster oplog is small, Atlas may be unable to automatically expand disk capacity.

For more information on the default resources and available configuration options for each cloud service provider, see:

Free Tier

To deploy a Atlas M0 Free Tier cluster, you must select the M0 instance size. If the M0 option is greyed out, check that:

  • The MongoDB Version is MongoDB 3.4 with Wired Tiger,
  • The Cloud Provider is Amazon Web Services,
  • The Region is N. Virginia (us-east-1), and
  • There is not already an M0 Free Tier cluster in the Atlas project.

F. Select the replication factor of the cluster

The replication factor of your cluster is the number of replica set nodes in the cluster. Each node keeps a copy of your database, providing high availability and data redundancy. If your deployment is a sharded cluster, each shard is a replica set, and the replication factor determines the number of nodes in each shard replica set.

This option is only available for clusters using an Instance Size of M10 or greater.

To modify this value, under Region select Enable cross-region configuration options. Modify the number of Nodes for your Primary Region. You must select either 3, 5, or 7 nodes.

Each node runs on a separate instance. For details on how the number of server instances affects cost, see Number of Servers.

For more information on replica sets, see Replication in the MongoDB manual.

G. Deploy a sharded cluster

Toggle Do you want a sharded cluster? to Yes to deploy your cluster as a Sharded Cluster.

Sharded clusters support horizontal scaling and consists of shards, config servers and mongos routers .

For a sharded cluster, the selected instance size must be M30 or larger.

  • Atlas deploys each shard as a replica set, consisting of the number of nodes specified by the replication factor. The shard servers have the selected instance size. For cross-region clusters, the nodes of each shard replica set are distributed across the selected regions.
  • Atlas deploys the config servers as a three-node replica set. The config servers run on M30 instances. For cross-region clusters, the nodes of the config server replica set are distributed to ensure optimal availability. For example, Atlas might deploy the config servers across three distinct availability zones and three distinct regions, if possible.
  • Atlas deploys six routers (mongos programs) for a sharded cluster. Atlas runs the routers on the shard servers. For cross-region clusters, Atlas spreads the routers across the selected regions.

Atlas deploys mongod process to its own instance. For sharded clusters, the six routers (the mongos processes) run on six of the shard servers; i.e. each of the six mongos processes shares an instance with one mongod process.

For details on how the number of server instances affect cost, see Number of Servers.

For more information on sharded clusters, see Sharding in the MongoDB manual.

H. Configure the number of shards

This field is visible only if the deployment is a sharded cluster.

You can set the number of shards to deploy with the sharded cluster. You cannot have fewer than two shards.

H. Enable Backup for the cluster

Toggle Do you want to enable backup? to Yes to enable backups for the cluster. You cannot enable backups for clusters using an Instance Size smaller than M10.

If enabled, Atlas takes snapshots of your databases at regular intervals and retains them according to your project’s retention policy.

I. Configure your MongoDB Admin Username & Password

These fields appear only if no MongoDB user exists for your Atlas project, such as if you are creating the first cluster in the project and have not yet set up MongoDB users. Fill them in to create a MongoDB admin user with the specified username and password.

When creating a new admin user, be sure to save the credentials.

The admin user has the Atlas admin role for the Atlas project. This includes read and write access to any cluster in the project.

To have Atlas generate the password for the admin user, click Autogenerate Secure Password. If you choose to have Atlas generate the password, Atlas displays it only once.

J. Enter your payment information

Click Confirm & Deploy to enter payment information. For Atlas M0 Free Tier cluster, Atlas does not require payment information to deploy the cluster.

K. Connect to your cluster

Once Atlas deploys your cluster, click Connect on the cluster to open the Connect dialog. Follow the instructions to connect to your cluster. See Connect to a Cluster for more information.

Next Steps

To continue setting up the cluster, see:

To change the cluster configuration after deployment, see Scale a Cluster.

[1]Atlas does not support MongoDB Enterprise deployments.
[2]For replica sets, the data-bearing servers are the servers hosting the replica set nodes. For sharded clusters, the data-bearing servers are the servers hosting the shards. For sharded clusters, Atlas also deploys servers for the config servers; these are charged at a rate separate from the instance costs.