Navigation

Configure a Global Cluster

On this page

This section covers enabling Global Writes on an Atlas cluster.

Considerations

  • Atlas supports enabling Global Writes when deploying an M30 or greater sharded cluster.
  • Once deployed, you cannot convert a Global Cluster to a standard sharded cluster. Thoroughly familiarize yourself with the Global Clusters Overview and Reference Documentation before creating a Global Cluster.
  • If this is the first 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.

Procedure

1

Enable Global Writes for your cluster.

  1. In the Create New Cluster dialog, click Global Cluster Configuration to expand the section.
  2. Toggle Enable Global Writes (M30 and Up) to On to display the Global Cluster configuration.
Screenshot of the Atlas Global Writes Dialog
2

Select your preferred cloud provider.

Note

Each cloud provider has a selection of global regions to which Atlas can deploy a zone. The choice of cloud provider may support or constrict your ability to deploy a zone to specific geographic locations. The configuration options available and the cost for running the cluster may also vary depending on cloud provider selection.

3

Configure your Global Cluster Zones.

Atlas provides three options for configuring your Global Cluster zones:

  • Configure Global Writes Zones Using a Template
  • Configure a Global Writes Single Region Zone
  • Configure a Global Writes Multi Region Zone

Select the appropriate tab based on how you would like to configure your Global Cluster zones.

Atlas provides two templates for configuring Global Writes zones for the cluster, each with a description of the purpose of its underlying configuration. Click on a template to view the Zone Map for that template. The Zone Map provides a visual description of the cluster zone configuration, including estimates of geographic latency and coverage.

Screenshot of the Atlas Global Templates

Click Zone configuration summary below the zone map to view a summary of each zone in the Global Cluster. Atlas provides the following validations for each zone:

Validation Guidance
Low latency reads and writes in <geography> Indicates the geographic locale for which the zone supports low latency reads and writes. The exact geographic locale specified depends on the preferred Region for that zone. You can modify the zone’s preferred region in the Zone Configuration section.
Local reads in all other zones

Indicates whether data in this zone is replicated to every other zone for local secondary reads by clients in those zones.

Click the Configure Local Reads in All Zones button in the Zone configuration summary to automatically configure every zone in the cluster for local reads.

(Not) Available during partial region outage

Indicates whether the zone supports high availability, such that a majority of electable nodes remain healthy and reachable in the event of a partial region outage. Regions marked as Recommended in the Atlas UI support high availability during partial regional outages.

For complete documentation on how Atlas ensures high availability in a single region, see

(Not) Available during full region outage Indicates whether the zone supports high availability, such that a majority of electable nodes remain healthy and rechable in the event of a complete regional outage.

By default each template deploys a series of single-region zones and builds a map of country and subdivision locations geographically near each zone. MongoDB uses this location-zone map to route read and write operations which contain location data to the shard or shards in the corresponding zone.

Click the Configure Location Mappings in the Zone Map to view the list of location-zone mappings. To customize the location-zone mapping, click the Zone dropdown for a given Location Name and select a new zone. Click the Reset button to reset a custom mapping for any given location. Click the Reset All Zone mappings button to reset all custom mappings for the cluster.

You can make additional configuration changes to each zone after selecting a zone template. For instructions, see the Single Region Zone tab.

You can also create Multi-region zones. For instructions, see the Multi-Region Zone tab. Clicking Configure Local Reads in All Zones converts all zones to multi-region.

Click View Zone Templates in the Zone Map to return to the template selection.

The Zone Configuration section allows you to configure each zone in your cluster. Atlas displays a drop-down box directly above the Zone Configuration that indicates the currently selected zone. Click the + Add a Zone button to add additional zones to the Global Cluster, up to a maximum of nine (9) zones.

Global Writes Single Region Config

The Zone Map updates as you modify each zone. If the Zone Map currently displays the template selection menu, click Configure Zones Myself to view the Zone map.

Click the Select the preferred region for your zone drop-down box and select a region as the Highest Priority region for each shard assigned to the zone. Atlas builds a map of countries and subdivisions that are geographically near the selected region. MongoDB uses this location-zone map to route read and write operations which contain location data to the shard or shards in the corresponding zone.

In the Zone Map, click Configure Location Mappings to view the list of location-zone mappings. To customize the location-zone mapping, click the Zone dropdown for a given Location Name and select a new zone. Click the Reset button to reset a custom mapping for any given location. Click the Reset All Zone mappings button to reset all custom mappings for the cluster.

For each shard in the zone, Atlas distributes the shard nodes with respect to the Zone Configuration. You can add additional shards to the zone by clicking Additional Options in the Zone Configuration section and selecting the total number of shards in the zone from the drop-down box. By default Atlas deploys one shard per zone. Atlas recommends creating additional zones to support heavy write load in a geographic region instead of adding multiple shards to a single zone. Atlas supports no more than 50 shards per Global Cluster.

Important

Selecting a zone template resets any configuration changes made in the Zone Configuration section to the default for the selected template.

The Zone Configuration section allows you to configure each zone in your cluster. Atlas displays a drop-down box directly above the Zone Configuration that indicates the currently selected zone. Click the + Add a Zone button to add additional zones to the Global Cluster, up to a maximum of nine (9) zones.

Global Writes Multi-Region Config

The Zone Map updates as you modify each zone. If the Zone Map currently displays the template selection menu, click Configure Zones Myself to view the Zone map.

Click the Select Multi-Region, Workload Isolation and Replication Options button to display the multi-region configuration controls. Zones for which you toggled the Configure Local Reads in All Zones in the Zone configuration summary display the multi-region zone controls by default.

Electable nodes for high availability

Configure the Highest Priority and Electable nodes in the zone. For more information on the Node Types, see Global Write Zones and Zone Mapping.

Having additional regions with electable nodes increases availability and helps better withstand data center outages.

The first row in the Electable nodes section lists the Highest Priority region. Atlas prioritizes nodes in this region for primary eligibility. For more information on priority in replica set elections, see Member Priority.

Click Add a 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. The total number of electable nodes across all regions in the zone must be 3, 5, or 7.

Atlas builds a map of countries and subdivisions geographically near the selected region for the Highest Priority node. MongoDB uses this location-zone map to route read and write operations which contain location data to the shard or shards in the corresponding zone.

Click the Configure Location Mappings in the Zone Map to view the list of location-zone mappings. To customize the location-zone mapping, click the Zone dropdown for a given Location Name and select a new zone. Click the Reset button to reset a custom mapping for any given location. Click the Reset All Zone mappings button to reset all custom mappings for the cluster.

Read-only nodes for optimal local reads

Configure the Read-only nodes in the zone. Each row represents one Region where Atlas deploys the configured Number of Nodes of the Read-only Node Type.

Click Add a region to add additional Read-only rows. Consider adding Read-only nodes in each region where you want to facilitate local secondary read operations.

Analytics nodes for workload isolation

Use analytics nodes to isolate queries which you do not wish to contend with your operational workload. Analytics nodes are useful for handling data analysis operations, such as reporting queries from BI Connector for Atlas. Analytics nodes have distinct replica set tags which allow you to direct queries to desired regions.

Click Add a region to select a region in which to deploy analytics nodes. Specify the desired number of Nodes for the region.

For each shard in the zone, Atlas distributes the shard nodes with respect to the Zone Configuration. You can add additional shards to the zone by clicking Additional Options in the Zone Configuration section and selecting the total number of shards in the zone from the drop-down box. By default Atlas deploys one shard per zone. Atlas recommends creating additional zones to support heavy write load in a geographic region instead of adding multiple shards to a single zone. Atlas supports no more than 50 shards per Global Cluster.

Important

Selecting a zone template resets any configuration changes made in the Zone Configuration section to the default for the selected template.

Removing Zones from an Existing Global Cluster

If you are using the standard connection string format rather than the DNS seedlist format, removing an entire zone from an existing global cluster may result in a new connection string. After deploying the changes verify the correct connection string by clicking Connect from the Clusters view.

4

Continue configuring your cluster.

Once you have configured your global cluster options, you can move on to the Cluster Tier step of cluster creation.