重要
The feature described on this page is not currently supported on Atlas Infinite clusters during public preview. For the features supported in public preview, see Public Preview Availability.
使用以下资源配置和管理 Atlas 全球集群。有关常规集群配置,请参阅管理集群。
Atlas Global Clusters require that you define single or multi-region Zones, where each zone supports write and read operations from geographically local shards. You can also configure zones that support global low-latency secondary reads. To learn more about Global Cluster zones and how to configure them, see Global Write Zones and Zone Mapping.
全局写入区域和区域映射
每个 Atlas 全球集群最多支持九个不同区域。每个区域由一个 Highest Priority 地区和一个或多个 Electable、Read-only 或 Analytics 地区组成。可用地区取决于所选的云服务提供商。
地区类型 | 说明 |
|---|---|
Highest Priority | Region where Atlas deploys the primary replica set member for the shard or shards associated with that zone. Clients can issue write operations only to the primary. Atlas 使用 Highest Priority 地区的地理位置,绘制出地理位置相近的国家和分区地图。全局写入集群使用此地图将写入操作定向到正确的区域。 为了便利本地从节点以低延迟读取全球分布的数据,对于集群中的每个区域,在每个间隔集群区域的 Highest Priority 地区中添加一个 Read-only 节点。 |
Electable | Region where Atlas deploys the electable secondary replica set members for the shard or shards associated to that zone. Electable regions add additional fault tolerance in the event of a partial or total regional outage in the Highest Priority region. |
Read-only | Region where Atlas deploys the non-electable secondary replica set members for supporting secondary read operations. |
Analytics |
分片分布
对于与区域关联的每个分片,A 分片Atlas分分片节点分布在配置的地区中。 如果您的集群位于广阔的地理大陆,请创建多个区域,将全局写入定向到距离用户更近的分片。
注意
无论区域数量有多少, Atlas支持每个分片集群最多 70 个分片。如果您需要在全局集群中添加更多分片,联系支持。
在 Atlas 中,前往 Support 页面。
如果尚未显示,组织从导航栏中的Organizations菜单。
单击导航栏中的 Support 图标。
单击 View plan(连接)。
The Support page displays.
Atlas 集群构建器包含模板,用于自动为全局集群配置全局写入区域。每个模板都提供集群区域配置的可视化描述,包括地理延迟和覆盖范围的估计。
配置区域映射
在为全球集群配置区域映射之前,必须先创建全球集群。
要配置现有全局集群:
AtlasGoClusters在Atlas中,Go项目的 页面。
如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
在侧边栏中,单击 Database 标题下的 Clusters。
会显示集群页面。
配置现有的全局集群。
单击Edit Config ,然后从下拉菜单中选择要修改的集群。
In the dialog box that appears, complete the steps to configure your zones.
注意
Atlas doesn't automatically configure or shard collections. You can use the Atlas UI to shard a global collection for global writes if your global cluster uses Atlas-Managed Sharding and the collection meets the compatibility requirements.
Considerations
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.
要在部署更改后验证正确的连接字符串:
1AtlasGoClusters在Atlas中,Go项目的 页面。
如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
在侧边栏中,单击 Database 标题下的 Clusters。
会显示集群页面。
启用全局写入后,Atlas 全球集群不支持专用搜索节点。
Flex 集群目前不支持 Atlas全球集群。要了解更多信息,请参阅 Atlas Flex 限制。