# 分布式

在最开始的章节中，我们曾经提到 Elasticsearch 可以被扩展到上百台（甚至上千台）服务器上，来处理PB级别的数据。我们的教程只提及了如何使用它，但是并没有提及到服务器方面的内容。Elasticsearch 是自动分布的，它在设计时就考虑到可以隐藏分布操作的复杂性。

Elasticsearch 的分布式部分很简单。你甚至不需要关于分布式系统的任何内容，比如分片、集群、发现等成堆的分布式概念。你可能在你的笔记本中运行着刚才的教程，如果你想在一个拥有100个节点的集群中运行教程，你会发现操作是完全一样的。

Elasticsearch 很努力地在避免复杂的分布式系统，很多操作都是自动完成的：

* 可以将你的文档分区到不同容器或者 *分片* 中，这些文档可能被存在一个节点或者多个节点。
* 跨节点平衡集群中节点间的索引与搜索负载。
* 自动复制你的数据以提供冗余副本，防止硬件错误导致数据丢失。
* 自动在节点之间路由，以帮助你找到你想要的数据。
* 无缝扩展或者恢复你的集群。

当你在阅读这本书时，你会发现到有关 Elasticsearch 的分布式特性分布式特性的补充章节。在这些章节中你会了解到如何扩展集群以及故障转移（《分布式集群》），如何处理文档存储（《分布式文档》），如何执行分布式搜索(《分布式搜索》）

这一部分不是必须要看的——你不懂它们也能正常使用 Elasticsearch。但是帮助你更加全面完整地了解 Elasticsearch。你也可以在之后需要的时候再回来翻阅它们。


---

# Agent Instructions: 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:

```
GET https://hezhiqiang.gitbook.io/elasticsearch/getting_started/distributed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
