> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-zh/catalyst/realm-selection.md).

# Realm 选择

一种 [Catalyst](https://github.com/decentraland/catalyst) 是一个服务器，它打包了 Decentraland 世界所需的不同服务。该服务器的主要职责之一是管理去中心化存储，用于存放客户端所需的大部分内容，并协调各个 peer 之间的通信。

当进入 Decentraland 客户端时，你需要连接到一个特定的 Catalyst，以获得后端服务对 Content、Lambdas 和 Comms 的支持。需要使用 DAO Catalyst 之一，它可以随机选择，但这可能会导致用户连接到另一个后端服务时，却访问到一个延迟很高的后端服务或一个用户数量较少的 realm。

为缓解这一问题，Kernel 中实现了一个用于选择 realm 的算法，如 [ADR-86](https://rfc.decentraland.org/adr/ADR-86).

它是一个可配置的算法，按顺序使用一个不同标准的列表；如果其中某个条件足够强，可以直接做出决策，它就会选择一个 realm；否则就把决策交给下一个标准。如果没有任何条件足够强，就会做出默认决策（随机）。

默认配置如下：

1. 优先选择用户最多的 Catalyst 节点
2. 优先选择在已访问位置中用户更多的 Catalyst 节点

还可以使用的其他标准有：

* 高延迟：优先选择延迟更低的 Catalyst
* 负载均衡：这是一种轮询机制，用于在所有 Catalyst 之间分配所有 peer。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/contributor/contributor-zh/catalyst/realm-selection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
