> 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-pt/catalyst/realm-selection.md).

# Seleção de Realm

A [Catalyst](https://github.com/decentraland/catalyst) é um Server que agrega diferentes Services necessários ao World da Decentraland. Algumas das principais responsabilidades do Server são a gestão do armazenamento descentralizado da maior parte do Content necessário ao Client e a orquestração das comunicações entre peers.

Ao entrar num Decentraland Client, é necessário ligar-se a um Catalyst específico para o suporte de serviços de backend Content, Lambdas e Comms. Um dos Catalysts da DAO precisa de ser usado; ele pode ser escolhido aleatoriamente, mas isso pode levar o user a aceder a um backend service com grande latency ou a um realm com um baixo número de users enquanto está ligado a outro.

Para mitigar isto, é implementado no Kernel um algoritmo de seleção de realm, como descrito em [ADR-86](https://rfc.decentraland.org/adr/ADR-86).

É um algoritmo configurável que usa diferentes critérios numa lista ordenada; se uma das condições for suficientemente forte para tomar uma decisão, então escolhe um realm; caso contrário, delega a decisão para os critérios seguintes. Se nenhuma condição for suficientemente forte, é tomada uma decisão predefinida (aleatória).

A configuração predefinida é:

1. Prioriza os Catalyst Nodes com o maior número de users
2. Prioriza os Catalyst Nodes com mais users na localização visitada

Outros critérios que podem ser usados são:

* Large Latency: Prioriza os Catalysts com a menor latency
* Load Balancing: É um mecanismo Round Robin para distribuir todos os peers entre todos os Catalysts.


---

# 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-pt/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.
