您可以为 Atlas 集群配置以下附加设置。
注意
本页面同时适用于 Atlas Infinite 和 Atlas Core。
如果某项设置仅应用于一个版本,其章节会注明。
选择集群的 MongoDB 版本
要了解可用的 MongoDB 版本、发布节奏选项以及如何为集群选择版本,请参阅 Atlas 中的 MongoDB 版本。
配置集群的备份选项
本节介绍 Atlas 群集的备份配置选项。要更详细地了解 Atlas 备份,请参阅备份集群。
Flex 集群的备份选项
Atlas 会自动为 Flex 集群启用备份,并且无法将其禁用。要了解更多信息,请参阅 Flex 集群备份。
M10+ 层备份选项
要为 M10+ Atlas 集群启用云备份,请将 Turn on Cloud Backup 切换开关设为 On。如果启用,Atlas 会定期为数据库创建快照,并根据项目的备份策略予以保留。
To disable Cloud Backup for an M10+ Atlas cluster, set the Turn on Cloud Backup toggle to Off. This also disables Continuous Cloud Backup for the cluster. To retain any existing snapshots after Cloud Backup is disabled, set the Keep
existing snapshots after backups disabled? toggle to On before you apply your changes to the cluster. This option instructs Atlas to retain the existing snapshots and oplog for the cluster according to your cluster's backup policy.
注意
如果您已启用备份合规策略,则无法禁用云备份。如果备份合规策略将 Require Point in Time Restore to all clusters 选项设置为 On,那么在没有 MongoDB 支持人员协助的情况下,您也无法禁用连续云备份。要禁用连续云备份,根据备份合规策略指定的安全代表或法定代表必须请求支持并完成验证流程。
Atlas 为 M10+ 集群提供以下备份选项:
备份选项 | 说明 |
|---|---|
Atlas 会对集群中的数据拍摄增量快照,并允许您从这些快照中恢复数据。Atlas 将快照存储在与快照目标副本集成员相同的云提供商区域中。 | |
After Atlas restores a snapshot, Atlas replays the oplog to restore a cluster from a particular point in time within a window specified in the backup policy. |
Atlas Infinite 集群的备份选项
Atlas Infinite 集群包含 24 小时的连续云备份窗口。要将快照保留在该窗口之外,请使用 Additional Backup Retention 设置,Atlas 默认启用该设置。额外的备份保留会根据您的备份策略和工作负载产生额外费用。
在 Atlas Administration API 中,backupEnabled 字段控制 Atlas Infinite 集群上的 Additional Backup Retention。它不控制 Atlas 是否备份集群,因为连续备份窗口始终适用。
创建集群后,您可以配置快照保留策略。要了解更多信息,请参阅 管理备份策略。
终止保护
要为集群启用Termination Protection,请切换Termination Protection至Yes。
如果已启用,Atlas 会阻止用户删除集群。要删除已启用终止保护的集群,必须先禁用终止保护。默认情况下,Atlas 会禁用所有集群的终止保护。
要了解有关终止群集的更多信息,请参阅终止一个部署。
部署分片集群
提示
在 Atlas Core 集群上,您可以配置 在线存档,将 Atlas 集群中不常访问的数据转移到 MongoDB 托管的只读联合数据库实例,而不是对集合分片或升级集群层。在 Atlas Infinite 集群上,公共预览版不支持在线存档。要学习有关在线存档的更多信息,请参阅在 Atlas 中管理在线存档。
To deploy your cluster as a sharded cluster, toggle Shard your cluster (M30 and up) to Yes.
重要
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.
Sharded clusters support horizontal scaling and consist of shards, config servers and mongos routers. To learn more, see About Config Servers Deployment. Config servers must remain readable for sharded read operations to continue to function.
如果您启用 Atlas 托管的配置服务器,Atlas 可能会将配置服务器数据与应用程序数据放在一起,而不是使用专用的配置服务器。要了解更多信息,请参阅适用于分片集群的 Atlas 托管的配置服务器。
关于分片部署
Atlas deploys each shard as a three-node replica set, where each node deploys using the configured Cloud Provider & Region, Cluster Tier, and Additional Settings. Atlas deploys one mongod per shard node.
对于跨区域集群,每个分片的节点数等于所有配置区域中可选举节点和只读节点的总数。Atlas 会将分片节点分配到所选区域。
关于配置服务器部署
For dedicated config servers, Atlas deploys the config servers as a three-node replica set. The config servers run on M30 cluster tiers. In multi-region clusters, config servers are distributed across regions.
For cross-region clusters, Atlas distributes the config server replica set nodes to ensure optimal availability. For example, Atlas might deploy the config servers across three distinct availability zones and three distinct regions if supported by the selected cloud service provider and region configuration. Config servers must remain readable for sharded read operations to continue to function. To learn more, see Config Server Availability.
如果您启用 Atlas 托管的配置服务器,Atlas 可能会将配置服务器数据与应用程序数据放在一起,而不是使用专用的配置服务器。要了解更多信息,请参阅适用于分片集群的 Atlas 托管的配置服务器。
关于 mongos 部署
Atlas deploys one mongos router for each node in each shard. For cross-region clusters, this allows clients using a MongoDB driver to connect to the geographically "nearest" mongos.
To calculate the number of mongos routers in a cluster, multiply the number of shards by the number of replica set nodes per shard.
您无法将分片集群部署转换为副本集部署。
要进一步了解服务器实例数量如何影响成本,请参阅节点数量。
要了解有关分片集群的更多信息,请参阅 MongoDB 手册中的分片章节。
配置分片数量
仅当部署为分片集群时,此字段才可见。
您的集群可以包含 1 到 70 个分区(含 1 和 100)。
要将副本集扩展到多分片集群,必须首先扩展到单分片集群,重新启动应用程序并重新连接到集群,再添加其他分片。
如果不重新连接应用程序客户端,您的应用程序可能会出现数据服务中断。
将副本集集群扩展到单分片集群后,您可以设定要与分片集群一起部署的分片数量。
If you are reducing the number of shards in your sharded cluster, Atlas removes shards in descending order based on the number in the "_id" field (see Sharded Cluster Configuration). For example, consider a sharded cluster with the following three shards:
"shard0""shard1""shard2"
如果将分片数设置为 2,Atlas 将从集群中删除 "shard2"。
IMPORTANT: When you remove a shard in 8.0, Atlas uses the moveCollection command to move any unsharded collections in that shard to a remaining shard. All unsharded collections remain online during this process.
在分片删除进程中,所有分片的集合都保持在线且可用。您必须打开负载均衡器,以从已删除的分片分片的片集合。
Atlas moves any unsharded collections that can't be drained by
moveCollectioncommand by using the movePrimary command. To learn more about the limitations ofmoveCollection, see Restrictions.movePrimaryis an offline operation.有关分片删除的更多信息,请参阅从分片集群中删除分片。
将副本集转换为分片集群的注意事项
如果您的集群层为 M30 或更高,则可以将副本集转换为分片集群。
要将单个副本集集群转换为多分片的分分片集群,必须首先转换为单分片的分片集群,重新启动应用程序并重新连接到集群,然后添加其他分片。
如果不重新启动应用程序客户端,在 Atlas 开始跨分片分发数据后,您的数据可能会出现不一致。
如果不重新连接应用程序客户端,您的应用程序可能会出现数据服务中断。
If you are using a standard connection string, you must update your connection string to reflect your new cluster topology.
Starting in MongoDB 8.3, DDL operations and applyOps can only be run on a mongos for all sharded clusters. These operations may be temporarily unavailable while transitioning from a replica set to a sharded cluster.
转换后,您必须对集合分片并选择适当的分片键以跨分片分发数据。要学习;了解更多信息,请参阅将副本集转换为分片集群。
注意
当您将副本集转换为分片集群时,即使启用 Atlas 托管的配置服务器,生成的集群也始终使用专用配置服务器。如果转换后需要嵌入式配置服务器,请联系 MongoDB 支持部门。
配置智能工作负载管理
智能工作负载管理 (IWM) 是一项由 MongoDB Atlas 托管的可用性系统,即使在过载情况下,也能让 Atlas 集群保持响应迅速和运行状态可预测。当集群接收到的传入操作超过其资源所能处理的限度时,就会发生过载。
Intelligent Workload Management 部分显示在 M10 和更大的集群上。它包含两个设置,其可用性因集群层和MongoDB版本而异:
Load Shedding:控制智能工作负载管理 (IWM) 保护,当接收
mongod进程持续过载时,该保护会拒绝该进程中的传入数据库操作。它仅对运行MongoDB 9.0 或更高版本的M30+副本集集群生效。为获得最佳结果,请使用反压感知驱动程序。要学习;了解更多信息,请参阅卸载。
无论 IWM 设置如何,其他不拒绝操作的 IWM 保护在所有符合条件的集群上保持活动状态。要学习;了解有关始终在线 IWM 保护的更多信息,请参阅始终在线保护。
Load Shedding 设置接受以下值:
Atlas 托管(默认):Atlas 控制集群负载削减的有效状态。设置下方的 Effective state: 标签显示了该保护功能当前是否在您的集群上处于活动状态。
已启用:在长时间过载期间,Atlas 可以拒绝针对您的集群的传入操作。
已禁用:Atlas 无法拒绝发送到您集群的传入操作。
注意
在 M10 和 M20 集群上,Load Shedding 设置会出现,但不起作用。如果将 Load
Shedding 设置为 Enabled,则 Effective state: 保持为 Disabled。
启用 MongoDB SQL 接口
MongoDB SQL 界面可以让您通过 ODBC 和 JDBC 驱动程序,从 Tableau 和 Power BI 等 BI 工具查询集群,无需联合数据库实例。您可以在专用集群(M10 及更高版本)上启用 SQL Interface,该集群运行 MongoDB 6.0 或更高版本。
The toggle appears in the cluster configuration form only for eligible clusters. For the full list of requirements, and to compare the direct connection with a federated database instance, see the MongoDB SQL Interface overview.
You can also enable and disable the SQL Interface with the Atlas Administration API. To learn more, see the Server Setup page in the SQL Interface documentation.
BI Connector for Atlas 可用性
重要
The MongoDB Connector for Business Intelligence for Atlas and on-premises reached end of life (EOL) in September 2026 and is no longer supported. Use the MongoDB SQL Interface to connect to Atlas or Enterprise Advanced deployments. The SQL Interface provides a simpler, direct connection to your clusters without requiring a separate BI Connector instance, and it offers improved performance, a simplified setup, and enhanced features. To learn more, see MongoDB SQL Interface Overview.
集群配置表单限制 Atlas 的 BI Connector,因为它已达到 EOL:
如果集群尚未启用 BI Connector for Atlas,则不会显示 Enable Business Intelligence Connector 部分,且您无法启用它。
如果已启用 Atlas 的 BI Connector,该部分将显示弃用通知,并且您只能关闭 Atlas 的 BI Connector。禁用后,您无法重新启用它。Review Changes 页面显示相同的通知。
We recommend using the MongoDB SQL Interface (Atlas Dedicated) instead. To move an existing BI Connector for Atlas workload across, see the migration guide.
管理您自己的加密密钥
注意
此功能适用于 M10 集群或更高版本。要了解有关 Free 集群可用功能的更多信息,请参阅 Atlas Free Cluster Limits;有关 Flex 集群的更多信息,请参阅 Atlas Flex Limitations。
Atlas encrypts all cluster storage and snapshot volumes, ensuring the security of all cluster data at rest (Encryption at Rest). Atlas Project Owners can configure an added layer of encryption on their data at rest using the MongoDB Encrypted Storage Engine and their Atlas-compatible Encryption at Rest provider.
Atlas 支持以下静态加密提供程序:
先决条件
在为 Atlas 集群启用该功能之前,您必须使用密钥管理将 Atlas 项目配置为静态加密。要了解详情,请参阅使用客户密钥管理进行静态加密。
要将集群的一个静态加密提供切换到另一个,必须首先禁用集群的静态加密,然后使用所需的静态加密提供程序重新启用静态加密。要了解详情,请参阅使用客户密钥管理进行静态加密。
步骤
要开始管理此集群的加密密钥,请将 Encryption using your Key Management (M10 and up)(使用密钥管理加密”(M10 及更高版本))切换为 Yes(是)。
使用密钥管理的Atlas静态加密适用于 M10+副本集集群。 Atlas静态加密仅支持加密“备份集群”。
管理您自己的加密密钥会增加集群的每小时运行成本。要详细了解 Atlas 对高级安全功能的计费信息,请参阅高级安全。
重要
如果 Atlas 无法访问 Atlas 项目密钥管理提供程序或用于加密集群的加密密钥,该集群将变得无法访问且无法恢复。在修改、删除或禁用 Atlas 使用的加密密钥或密钥管理提供程序凭证之前,请务必小心谨慎。
配置其他选项
You can configure the following mongod runtime options on M10+ paid tier clusters.
Considerations
当您更改集群的存储大小时,Atlas 会动态修改副本集和分片集群的 Oplog Size。要详细了解 Atlas 如何管理 oplog 大小,请参阅 Oplog 大小行为。但对于 Minimum TLS Protocol Version(最低 TLS 协议版本)和 Allow Server-Side JavaScript(允许服务器端 Javascript)设置,它会对分片成员和配置服务器副本集执行滚动重启。要详细了解 Atlas 如何在维护操作期间支持高可用性,请参阅 MongoDB Atlas 如何提供高可用性?。
查看和编辑其他设置
要查看和编辑这些设置:
要使用 Atlas CLI 更新一个集群的高级配置设置,请运行以下命令:
atlas clusters advancedSettings update <clusterName> [options]
To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas clusters advancedSettings update.
在 Atlas Infinite 集群上,请改用 atlas api clusters updateClusterAdvancedConfiguration。atlas clusters 命令接受一组固定的选项,其中不包括 Atlas Infinite 字段。
要使用 Atlas 用户界面查看和编辑这些设置,请在集群表单中打开 Additional Settings 下的 More Configuration Options。
为 Atlas Core Amazon Web Services 集群启用更快的跨区域初始同步
注意
此功能不适用于 Atlas Infinite。要了解有关 Atlas Infinite 功能和行为的更多信息,请参阅 MongoDB Atlas Infinite:概述。
当您向 AWS 区域添加新节点时,Atlas 会执行基于云的初始同步,利用 AWS 原生的快照能力创建源节点快照,并将其恢复到新节点。
启用此设置后,Atlas 会使用 AWS 基于时间的快照副本为与源节点位于不同 AWS 区域的目标 AWS 节点执行基于云的初始同步。Atlas 优先考虑从主节点恢复而不是从从节点恢复,以最大限度地提高数据新鲜度。基于时间的快照复制操作可实现 500 MiB/s 的最大复制操作吞吐量。Atlas 始终根据快照的大小调整复制操作完成时间,从而最大限度地提高吞吐量。
Atlas supports cross-region Cloud-based initial sync for AWS and Google Cloud clusters only. For Azure clusters, Atlas performs a logical initial sync to add a node to a new region. You can add or replace nodes in your cluster when you edit the cluster configuration.
仅包含至少一个 AWS 节点的集群才能启用此设置。默认情况下,所有集群均处于未启用状态。如果您的 AWS 集群保持未启用此设置,Atlas 将使用 AWS 原生的非基于时间的快照复制方法执行跨区域云端初始同步。与基于时间的快照复制相比,非基于时间的快照复制速度很可能要慢得多。
启用更快的基于时间的跨区域初始同步会导致 AWS 产生额外费用。要了解有关 AWS 快照定价的更多信息,请参阅 Amazon EBS 定价页面。
Azure 集群的自适应容量
注意
此功能不适用于 Atlas Infinite。要了解有关 Atlas Infinite 功能和行为的更多信息,请参阅 MongoDB Atlas Infinite:概述。
Atlas 默认为在 Microsoft Azure 上拥有至少一个节点的集群启用 Adaptive Capacity。自适应容量在 M30 及更大的集群上生效。要了解更多信息,请参阅自适应容量。
要选择单个集群的自适应容量,或重新启用它,请使用 Atlas 用户界面 或 Atlas Administration API:
设置最小 Oplog 窗口
Modify the retention duration for oplog entries in the oplog of the cluster. By default, Atlas retains entries for 24 hours in Atlas Infinite and Atlas Core before the mongod removes them from the oplog.
This option corresponds to modifying the storage.oplogMinRetentionHours configuration file option for each mongod in the cluster.
要设置最小 oplog 窗口:
验证存储自动伸缩是否已启用并且您没有选择退出。Atlas 默认启用自动伸缩。
Set the minimum oplog window to the desired value. If you don't set this value, Atlas retains oplog entries for 24 hours in Atlas Infinite and Atlas Core before the
mongodremoves them from the oplog.
设置 Oplog 大小
注意
此功能不适用于 Atlas Infinite。要了解有关 Atlas Infinite 功能和行为的更多信息,请参阅 MongoDB Atlas Infinite:概述。
您可以设置固定的 oplog 大小,这在实时迁移或密集型数据加载期间很有帮助。
仅当您选择退出集群的存储自动扩展时,才能设置 Set Oplog Size 配置设置。在 Atlas 中,您无法使用 MongoDB 命令 replSetResizeOplog 来调整集群上 oplog 的大小。
对于已启用存储自动伸缩的集群,可改为设置 Minimum Oplog Window(最小 Oplog 窗口)。请参阅设置最小 oplog 窗口。Atlas 默认启用存储自动伸缩。
您可以设置的最小 oplog 大小为 990 MB。如果您选择的 oplog 大小会使集群的磁盘可用容量少于 25%,则 Atlas 会返回错误。
要检查当前 oplog 大小和复制延迟时间,请执行以下操作:
Connect to your cluster via
mongosh.Authenticate as a user with the
Atlas adminrole.Run the
rs.printReplicationInfo()method.
Atlas 可显示当前 oplog 的大小和复制延迟时间。
要设置固定的 oplog 大小,请执行以下操作:
选择退出存储自动伸缩。
将最小 Oplog 窗口设置为
0。确定所需的 oplog 大小:
在 Atlas UI 中监控迁移过程的延迟时间。
If the lag time shown in the Atlas UI during migration approaches the replication lag time that you obtained using the
rs.printReplicationInfo()method, increase the oplog size.
在输入框中指定所需的 Oplog Size 大小(以 MB 为单位)。此设置将配置 oplog 的未压缩大小,而不是磁盘上的大小。
对于分片集群部署,此选项会修改集群中每个分片的 oplog 大小。
This option corresponds to modifying the
replication.oplogSizeMBconfiguration file option for eachmongodin the cluster.警告
减少 oplog 的大小需要从 oplog 中删除数据。Atlas 无法访问或恢复因 oplog 缩减而删除的任何 oplog 条目。在缩减 oplog 之前,请考虑数据丢失的后果。
磁盘空间考虑因素
请勿通过减小 oplog 的大小来增加可用磁盘空间。只有 oplog 集合 (local.oplog.rs) 可以回收减少 oplog 大小所节省的空间。其他集合不会因减少 oplog 存储量而受益。
允许在服务器端执行 JavaScript
启用或禁用执行服务器侧执行 JavaScript 的操作。
If your cluster runs a MongoDB version less than 5.0, this option corresponds to modifying the
security.javascriptEnabledconfiguration file option for eachmongodin the cluster.If your cluster runs MongoDB version 5.0 or greater, this option corresponds to modifying the
security.javascriptEnabledconfiguration file option for eachmongodandmongosin the cluster.If your cluster runs MongoDB version 8.0, Allow Server-Side JavaScript is disabled by default to improve security and performance. This option corresponds to the
security.javascriptEnabledconfiguration file option for eachmongodandmongosin the cluster.
注意
In MongoDB version 7.0 and later, security.javascriptEnabled applies to mongos' as well.
启用日志校订和匿名查询数据的日志记录
在 MongoDB 日志中包含经编辑和匿名化的 $queryStats 输出。$queryStats 输出不包含文字或字段值。启用此设置可能会影响集群的性能。
注意
您只能为运行 MongoDB 7.1 或更高版本的 Atlas 集群启用查询数据日志记录。
设置最低 TLS 协议版本
Set the minimum TLS version that the cluster accepts for incoming connections. This option corresponds to configuring the net.tls.disabledProtocols configuration file option for each mongod in the cluster.
重要:Atlas 不再支持 TLS 1.0或1.1。所有集群都拒绝使用 TLS 1.0 或 1.1 进行连接的尝试。将您的集群的最低 TLS 版本设置为 1.2 或更高版本。
设置自定义密码套件配置
From a list of cipher suites, select which will be used for your cluster's node-to-node and client-to-Atlas communications. The list of available ciphers depends on the cluster's minimum TLS version.
注意
如果您有自定义的 TLS 1.2 密码配置,并且想要升级到 TLS 1.3,则必须更新该配置以包含 TLS 1.3 密码。
所有查询都需要索引
重要
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.
Enable or disable the execution of queries that require a collection scan to return results. This option corresponds to modifying the notablescan parameter via the setParameter command for each mongod in the cluster.
重要
If you're creating MongoDB Search indexes, you might need to disable this parameter. To learn more, see Considerations for MongoDB Search Indexes.
默认写关注
您无法在 Atlas Infinite 集群上设置默认写关注(write concern)。要了解写关注(write concern)如何在 Atlas Infinite 集群上工作,请参阅 Atlas Infinite 集群上的写关注(write concern)。
Set the default level of acknowledgment requested from MongoDB for write operations for this cluster.
The default write concern for clusters is majority.
设置事务生命周期
重要
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.
Set the maximum lifetime of multi-document transactions. This option corresponds to modifying the transactionLifetimeLimitSeconds parameter via the setParameter command for each mongod in the cluster.
重要
不能将事务生命周期设置为小于一秒。
集群的默认事务生命周期为 60 秒。
启用或禁用快速磁盘预热
注意
此功能不适用于 Atlas Infinite。要了解有关 Atlas Infinite 功能和行为的更多信息,请参阅 MongoDB Atlas Infinite:概述。
Atlas 提供 Fast Disk Pre-Warming 设置,用于托管在 `Amazon Web Services` 和 `Azure` 上的集群。Atlas 默认对这些集群实现快速磁盘预备。
要禁用快速磁盘预加载,对于 Amazon Web Services 或 Azure 集群,请在 Fast Disk Pre-Warming 设置下选择 Off 。要再次启用它,请选择 Fast Pre-Warming (Default)。
Due to the design of the underlying cloud provider infrastructure, disk pre-warming occurs whenever Atlas performs a Cloud-based initial sync, such as when Atlas adds a new node to an existing region in your cluster. During a Cloud-based initial sync, Atlas temporarily hides the new node to prevent it from serving reads until it is ready.
快速磁盘预热比背景磁盘预热更快。启用快速磁盘预加载时,新节点在预加载期间会消耗大部分预配的 IOPS,因此 Atlas 会将节点隐藏起来,直到预加载完成。当快速磁盘预加热被禁用时,Atlas 会在节点就绪就绪后立即将节点取消隐藏,并在背景中对磁盘进行加热,以便节点可以更快地显示出来。
在 M40+ AWS 不使用 NVMe 存储的集群上,Atlas 临时预配性能更高的 AWS 存储卷,以在基于云的初始同步过程中支持快速磁盘预加载。磁盘预加温完成后,Atlas 会将卷修改回节点的原始存储设置。此次修改使用了 AWS 在任何 24 小时内对每个 EBS 卷允许的四种 EBS 卷修改之一。要了解有关 EBS 卷体修改限制的更多信息,请参阅更改 AWS 上的存储容量或 IOPS。
预配更高性能的临时存储卷可能会暂时增加您在每月 Atlas 账单中集群的存储费用。要了解更多信息,请参阅存储容量。
请考虑以下建议:
如果工作负载需要一致的查询延迟,请启用此设置。
如果您的工作负载寻求最大可用性保证而不是一致的查询性能,而且您要求新添加或替换的节点立即处于活动状态并可见,请禁用此设置,并在进行预热的节点上使用带有标签的自定义连接字符串,直到完成预热进程。使用此连接字符串,可防止在节点的大部分 IOPS 被预热进程利用时对节点进行读取。
设置读取操作的默认超时
For clusters running MongoDB version 8.0+, you can specify the default maximum timeout in milliseconds of all read operations for these clusters. This protects your database against unintentional long-running queries. This option corresponds to the cluster parameter defaultMaxTimeMS.
配置副本集扩展模式
注意
此功能不适用于 Atlas Infinite。要了解有关 Atlas Infinite 功能和行为的更多信息,请参阅 MongoDB Atlas Infinite:概述。
Modify the replica set scaling mode for your cluster. Atlas uses the scaling mode In Parallel By Workload Type by default. Atlas can also scale a replica set with the In Parallel By Node Type and Sequential modes.
以下列表描述了可用的扩展模式:
In Parallel By Workload Type mode applies only to clusters with read-only operational nodes and analytics nodes. Atlas uses this scaling mode by default, unless you specify another scaling mode. In this mode, Atlas scales your analytics nodes in parallel with your operational nodes.
注意
If your cluster has only electable nodes, the scaling mode In Parallel By Workload Type doesn't affect cluster behavior.
Sequential 模式适用于执行对延迟敏感的从节点(secondary node from replica set)读取的稳态工作负载和应用程序。在此模式下, Atlas会按顺序扩展所有节点。
启用日志校订
Toggle this on to prevent logging of potentially sensitive information in field values. For more information, see Log Redaction.
启用和禁用日志校订需要滚动重启。
用于分片集群的 Atlas 托管的配置服务器
Enable or disable Atlas management of the config server type for a new sharded cluster. An Atlas-managed config server automatically switches the config server type based on criteria for optimal performance and cost savings. If you don't enable an Atlas-managed config server for a sharded cluster, Atlas always uses a dedicated config server for the cluster.
对于所有 8.0 Atlas分片的集群,Atlas 托管的配置服务器默认为 On。要禁用 Atlas 托管的配置服务器,设立为 Off。如果集群的分片和嵌入式配置服务器少于 11,关闭 Atlas 托管的配置服务器会立即将集群转换为专用配置服务器。
注意
Atlas 全球集群不支持嵌入式配置服务器或配置分片。
配置服务器类型
对于启用 Atlas 托管配置服务器的每个新分片集群, Atlas会为少于 11 分片的集群部署嵌入式配置服务器,并为超过 10 分片的集群部署专用配置服务器。
嵌入式配置服务器将您的应用程序数据与配置分片上的配置数据共置。嵌入式配置服务器集群的成本较低,因为它们使用的资源较少。
专用配置服务器为配置数据使用单独的专用配置服务器副本集。您的应用程序数据不会与专用配置服务器的配置数据位于同一位置。专用配置服务器集群的费用更高,因为它们使用额外的副本集。
在了解有关配置服务器类型注意事项的更多信息,请参阅配置服务器注意事项。
配置服务器更改标准
如果您启用 Atlas 托管的配置服务器, Atlas 会按如下方式确定初始集群配置服务器类型:
如果集群分片计数大于 10,则Atlas将使用专用配置服务器。
如果集群分片数为 10 或更少, Atlas将使用嵌入式配置服务器。
当您在启用 Atlas 托管配置服务器的情况下添加或删除分片时, Atlas 会使用相同的条件自动重新选择分分片的集群的配置服务器类型。
当您将现有的分片集群从 MongoDB 7.0 升级到 8.0 时,Atlas 会开启 Atlas 托管的配置服务器,但不会改变集群现有的配置服务器类型。这些标准仅适用于分片计数更改。
配置服务器的注意事项
所有版本低于 MongoDB 8.0 的集群都使用专用的配置服务器。
如果您使用以下任何功能,Atlas 不会更改您的配置服务器类型:
如果您的集群有超过 10 分片,并且由于使用这些功能而无法过渡到专用配置服务器,联系MongoDB支持部门更改您的配置服务器类型。
如果您启用 Atlas 托管的配置服务器,则以下注意事项适用:
对于运行 MongoDB 8.0 或更高版本的集群,副本集 ID 不反映存储在副本集上的数据类型。
在其副本集 ID 中包含术语
shard的副本集可能会存储应用程序数据、配置数据或两者兼而有之(示例:atlas-abc123-shard-0)。副本集 ID 中包含术语
config的副本集可能会存储应用程序数据(示例:atlas-abc123-config-0)。
备份快照注意事项
您只能将快照从具有专用配置服务器的集群恢复到也使用专用配置服务器的集群中。
您只能将快照从具有嵌入式配置服务器的集群恢复到也使用嵌入式配置服务器的集群中。