对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

在 Atlas 用户界面中配置读取首选项

默认情况下,Atlas UI 从集群的主成员读取数据。要将读取操作发送到其他成员(例如分析节点) ,请为连接设置读取首选项。

重要

您的阅读偏好设置仅适用于当前浏览器会话。关闭或重新加载页面后,Atlas 用户界面将再次使用默认阅读偏好设置。

To configure a read preference, you must have at least Project Data Access Read Only access to the project.

1
  1. 如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含项目的组织。

  2. 如果尚未显示,请从导航栏的 Projects 菜单中选择您的项目。

  3. 在侧边栏中,单击 Database 标题下的 Data Explorer。

    显示数据浏览器。

重要提示:您还可以单击集群的名称以打开 Cluster侧边栏,然后单击Data Explorer Shortcuts标题下的 。

2

You can't edit an active connection. In the Connections sidebar, click the icon next to your cluster. In the drop-down menu that appears, click Disconnect.

3

Click the icon next to your cluster. In the drop-down menu that appears, click Edit connection.

4

Under Read Preference, select one of the following modes:

  • Default这样一来,读取首选项就未设置,因此 Atlas UI 会从主目录读取数据。

  • Primary
  • Primary Preferred
  • Secondary
  • Secondary Preferred
  • Nearest

要了解每种模式如何路由读取操作,请参阅读取首选项模式。

5

If you select Primary Preferred, Secondary, Secondary Preferred, or Nearest, you can also set the following fields:

  • Read Preference Tags: Enter each tag set as comma-separated key:value pairs, such as nodeType:ANALYTICS,region:US_EAST_1. To add another tag set, click the icon.

    Atlas UI 会按顺序尝试匹配标签集。如果找不到与您的标签集匹配的成员,请将最后一个标签集留空,以便回退到任何符合条件的成员。要了解 Atlas 为您的集群节点应用了哪些标签,请参阅“使用预定义的副本集标签进行查询”。

  • Max Staleness Seconds: The maximum replication lag, in seconds, that a secondary can have and still be eligible for reads. You must set Max Staleness Seconds to at least 90.

6

Atlas UI 会重新连接到您的集群,并根据您的读取偏好路由读取操作。

To read only from the analytics nodes in your cluster, set the following values in the Edit Connection dialog box:

  • Read Preference: Secondary

  • Read Preference Tags: nodeType:ANALYTICS

给本页内容打分