> 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 World 所需的多种服务。该服务器的主要职责之一是管理客户端所需大部分内容的去中心化存储，以及协调各个节点之间的通信。

当进入 Decentraland Client 时，你需要连接到特定的 Catalyst，以获得后端服务 Content、Lambdas 和 Comms 的支持。应使用 DAO 的某个 Catalyst，可以随机选择，但这可能会导致用户连接到另一个后端服务时访问的是延迟很高的服务，或者连接到另一个领域时该领域的用户数量很少。

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

这是一种可配置算法，按顺序使用不同的条件列表；如果某个条件足够强以作出决策，就会选择一个 realm；否则就将决策交给后续条件。如果没有任何条件足够强，则会做出默认决策（随机）。

默认配置如下：

1. 优先选择用户数量最多的 Catalyst 节点
2. 优先选择在所访问位置拥有更多用户的 Catalyst 节点

还可以使用的其他条件有：

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


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
